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

Add Gradio #283

Merged
merged 6 commits into from
Apr 29, 2022
Merged

Add Gradio #283

merged 6 commits into from
Apr 29, 2022

Conversation

julien-blanchon
Copy link
Contributor

@julien-blanchon julien-blanchon commented Apr 26, 2022

Add Simple Gladio support

Add new tool inference_gladio.py for gladio integration

optional arguments:
  -h, --help            show this help message and exit
  --config CONFIG       Path to a model config file
  --weight_path WEIGHT_PATH
                        Path to a model weights
  --threshold THRESHOLD
                        Value to threshold anomaly scores into 0-100 range

Example

python tools/inference_gradio.py --config ./anomalib/models/padim/config.yaml --weight_path ./results/padim/mvtec/bottle/weights/model.ckpt

Changes

  • Add Gladio Support
  • Add gradio>=2.9.4 dependencies
  • This change requires a documentation update

Checklist

  • My code follows the pre-commit style and check guidelines of this project.
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes

@julien-blanchon
Copy link
Contributor Author

#275

Copy link
Collaborator

@ashwinvaidya17 ashwinvaidya17 left a comment

Choose a reason for hiding this comment

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

Thanks for this contribution! I have a minor comment. This would help with the checks: pre-commit https://openvinotoolkit.github.io/anomalib/guides/using_pre_commit.html

tools/inference_gradio.py Outdated Show resolved Hide resolved
@ashwinvaidya17 ashwinvaidya17 added the Enhancement New feature or request label Apr 26, 2022
Copy link
Contributor

@samet-akcay samet-akcay left a comment

Choose a reason for hiding this comment

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

Thanks @julien-blanchon! This is a great addition! 🔥

I only have a few comments, hopefully wouldn't require so much of your time. If yes, we could do those changes as well. Thanks!

tools/inference_gradio.py Outdated Show resolved Hide resolved
tools/inference_gradio.py Outdated Show resolved Hide resolved
tools/inference_gradio.py Outdated Show resolved Hide resolved
@julien-blanchon
Copy link
Contributor Author

I will make a new commit this tomorrow with some patch

@julien-blanchon
Copy link
Contributor Author

I've just push a typo fix, feel free to reformat get_inferencer and to move it as an utils.

@julien-blanchon
Copy link
Contributor Author

The infer function may also be moved outside and reused.

Maybe a better description and interface could be done.

@samet-akcay
Copy link
Contributor

The infer function may also be moved outside and reused.
Maybe a better description and interface could be done.

@julien-blanchon thanks a lot! Yeah, I agree, we could do another round of refactoring to re-use some of these across other inference stuff. This is the scope of another PR that we could create in the future, though.

Really appreciate your efforts here. Thanks again!

@samet-akcay samet-akcay merged commit edf9393 into openvinotoolkit:development Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants