Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object Detection From Webcam Stream Guide #9336

Merged
merged 42 commits into from
Sep 19, 2024
Merged

Conversation

freddyaboulton
Copy link
Collaborator

Description

Adds an a guide on detecting objects from the webcam stream. Also adds a "Streaming" section to the guides.

🎯 PRs Should Target Issues

Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.

Not adhering to this guideline will result in the PR being closed.

Tests

  1. PRs will only be merged if tests pass on CI. To run the tests locally, please set up your Gradio environment locally and run the tests: bash scripts/run_all_tests.sh

  2. You may need to run the linters: bash scripts/format_backend.sh and bash scripts/format_frontend.sh

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Sep 12, 2024

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Website ready! Website preview
Storybook ready! Storybook preview
🦄 Changes detected! Details

Install Gradio from this PR

pip install https://gradio-pypi-previews.s3.amazonaws.com/dd97fb5ef830c4066dccff167d1c23af0ecbc07f/gradio-4.44.0-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@dd97fb5ef830c4066dccff167d1c23af0ecbc07f#subdirectory=client/python"

Install Gradio JS Client from this PR

npm install https://gradio-npm-previews.s3.amazonaws.com/dd97fb5ef830c4066dccff167d1c23af0ecbc07f/gradio-client-1.6.0-beta.1.tgz

Use Lite from this PR

<script type="module" src="https://gradio-lite-previews.s3.amazonaws.com/dd97fb5ef830c4066dccff167d1c23af0ecbc07f/dist/lite.js""></script>

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Sep 12, 2024

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
gradio minor
  • Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

Object Detection From Webcam Stream Guide

Maintainers or the PR author can modify the PR title to modify this entry.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

@freddyaboulton freddyaboulton marked this pull request as ready for review September 12, 2024 21:40
abidlabs and others added 10 commits September 16, 2024 11:01
* clients

* add changeset

---------

Co-authored-by: gradio-pr-bot <[email protected]>
* Delete js/lite/src/theme.css from the Git managed file tree as it's dynamically generated

* Remove lite-related npm scripts from spa/package.json

* add changeset

---------

Co-authored-by: gradio-pr-bot <[email protected]>
* first draft

* add code

* tip

* add changeset

* delete dead code

* Type check notebook

* consolidate like section with guide

* Add comments

* add value

* Lint

* lint

* guide

---------

Co-authored-by: gradio-pr-bot <[email protected]>
Co-authored-by: Abubakar Abid <[email protected]>
* * update icon buttons
* add image editor specific icon button

* tweak hover

* margin tweak

* add changeset

* improve gr.Video button UI

* radius tweak

* ensure even spacing

* fix typechecks

* add changeset

* revert irrelevant changes

* typefix

* fix image editor buttons

* fix download link icon

* disable undo if no change events dispatched in model3d and video

* use icons with iconbuttonwrapper

* add iconbuttonwrapper around gallery share btn

* Revert "add iconbuttonwrapper around gallery share btn"

This reverts commit 4605302.

* add changeset

* design fixes

* add changeset

* move status tracker progress to  bottom of component

* add changeset

* use iconbutton for like/dislike

* fix lint error

* fix type errors

* type errors

* fix test

* revert undo icon change

* btn spacing

---------

Co-authored-by: gradio-pr-bot <[email protected]>
* Added gradio-in-r

* add changeset

* section

* remove

* tweaks

* delete changeset

* R

* Updated using-gradio-in-other-programming-languages.md

---------

Co-authored-by: Abubakar Abid <[email protected]>
Co-authored-by: gradio-pr-bot <[email protected]>
* Add Lite E2E test to check a matplotlib problem which was fixed in #9312

* Restore js/app/test/image_remote_url.spec.ts, which was deleted in #8716

* Fix tootils import

* Format

* Fix processing_utils.resolve_with_google_dns to use the HTTPX client instead of urllib so it works on Lite

* add changeset

* add changeset

* Move js/app/test/image_remote_url.spec.ts -> js/spa/test/image_remote_url.spec.ts

* Use pyodide.http in resolve_with_google_dns on Lite

---------

Co-authored-by: gradio-pr-bot <[email protected]>
…iles explicitly allowed by developer (#9348)

* changes

* add changeset

* format

* fix type

* type

* add test

---------

Co-authored-by: gradio-pr-bot <[email protected]>
* fix markdown overflowing table

* add changeset

* revert undo icon

* add changeset

* Revert "revert undo icon"

This reverts commit 855b012.

* add changeset

---------

Co-authored-by: gradio-pr-bot <[email protected]>
@abidlabs
Copy link
Member

This looks great @freddyaboulton. I agree about creating a separate section on Streaming for visbility. However, right now, it only contains example applications. What do you think about moving the two streaming guides (streaming inputs and streaming outputs) to this section as well?

@abidlabs
Copy link
Member

For the demo, I experienced a ton of lag, but it could be because I was on a pretty bad wifi connection. Nevertheless, could you try the demo on a slower connection through the browser and see how it works for you? If there's anything we can do to optimize the experience for slow connections, I think that'd be great

image

If the deme is running well for you, LGTM, everything else is pretty minor

hannahblair and others added 13 commits September 18, 2024 18:44
* remove unnecessary redirects

* add changeset

* fix

* formatting

---------

Co-authored-by: gradio-pr-bot <[email protected]>
* changes

* add changeset

---------

Co-authored-by: gradio-pr-bot <[email protected]>
…n `gr.Chatbot` (#9358)

* change format

* format

* add changeset

* revert

* revert

---------

Co-authored-by: gradio-pr-bot <[email protected]>
* update package.json

* add changeset

* add changeset

* update pnpm lock

* add changeset

---------

Co-authored-by: gradio-pr-bot <[email protected]>
* fix wrap alignment

* add changeset

---------

Co-authored-by: gradio-pr-bot <[email protected]>
* fix sha

* fix name

* fix name
@freddyaboulton
Copy link
Collaborator Author

Thank you @abidlabs for the review! Yes the lag on spaces is on my radar.

@abidlabs
Copy link
Member

Sweet, I'll take another pass very shortly

@freddyaboulton
Copy link
Collaborator Author

What do you think about moving the two streaming guides (streaming inputs and streaming outputs) to this section as well?

I like where the streaming guides currently are. What I decided to do is link from the basic streaming guides to the "end-to-end" example guides.

Copy link
Member

@abidlabs abidlabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @freddyaboulton! Great demos and docs

@abidlabs abidlabs merged commit 736046f into 5.0-dev Sep 19, 2024
20 checks passed
@abidlabs abidlabs deleted the object-detection-guide branch September 19, 2024 05:51
@freddyaboulton
Copy link
Collaborator Author

Thank you for catching the typos!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants