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

Optimize gradio demo #44

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

akaday
Copy link

@akaday akaday commented Oct 28, 2024

No description provided.

Update `gradio_demo.py` to use OpenCV for image processing and optimize the `process` function.

* Replace PIL library with OpenCV for image processing tasks.
* Modify `process` function to work with images in memory using in-memory operations.
* Set models to use the appropriate device (`cuda` or `cpu`) based on availability.
* Enable mixed precision training and inference using `torch.autocast` and `torch.inference_mode` decorators in `process` function.
* Utilize efficient image processing techniques such as resizing, cropping, and converting images to different formats using OpenCV functions.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/akaday/OmniParser?shareId=XXXX-XXXX-XXXX-XXXX).
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.

1 participant