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 segmentation mask to inference output #242

Merged
merged 5 commits into from
Apr 22, 2022

Conversation

ashwinvaidya17
Copy link
Collaborator

Description

image

Note

I haven't tested this with OpenVINO as the installation is broken on my windows machine.

Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 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

@ashwinvaidya17 ashwinvaidya17 added the Enhancement New feature or request label Apr 20, 2022
@@ -124,7 +124,7 @@ def infer(image_path: Path, inferencer: Inferencer, save_path: Optional[Path] =
# path is provided, `predict` method will read the image from
# file for convenience. We set the superimpose flag to True
# to overlay the predicted anomaly map on top of the input image.
output = inferencer.predict(image=image_path, superimpose=True)
output = inferencer.predict(image=image_path, superimpose=True, overlay_mask=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think if overlay_mask should always be True or optional?

Copy link
Contributor

@djdameln djdameln left a comment

Choose a reason for hiding this comment

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

Minor detail, but can you increase the line thickness of the segmentation prediction? It's a bit hard to distinguish currently.

@ashwinvaidya17
Copy link
Collaborator Author

Done!
image

Copy link
Contributor

@djdameln djdameln left a comment

Choose a reason for hiding this comment

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

Much better, thanks!

@samet-akcay
Copy link
Contributor

This looks good! I'm not sure if it's only me but I do hate opencv fonts, which looks archaic! Of course, this is for another PR, but I feel like it would be nice if we have a polished output image with a moderner font.

@samet-akcay samet-akcay merged commit cab7aa2 into development Apr 22, 2022
@samet-akcay samet-akcay deleted the feature/av/inferencer_heatmap branch April 22, 2022 14:10
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.

Show segmentation mask during inference
3 participants