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

How to apply inferred mask to image #581

Open
simonmelouah opened this issue Jan 1, 2024 · 0 comments
Open

How to apply inferred mask to image #581

simonmelouah opened this issue Jan 1, 2024 · 0 comments

Comments

@simonmelouah
Copy link

Following along with the multiclass segmentation example, the model performs fairly well on a custom dataset however when I try to use the mask on the original image using OpenCV's bitwise_and function I get

error: OpenCV(4.8.0) [/Users/runner/work/opencv-python/opencv-python/opencv/modules/core/src/arithm.cpp:230](https://file+.vscode-resource.vscode-cdn.net/Users/runner/work/opencv-python/opencv-python/opencv/modules/core/src/arithm.cpp:230): error: (-215:Assertion failed) (mtype == CV_8U || mtype == CV_8S) && _mask.sameSize(*psrc1) in function 'binary_op'

Is there some post processing required to be able to use the inferred masks output by the trained model (apologies for the noise, have exhausted all possible other resources to try and figure it out)?

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

No branches or pull requests

1 participant