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

instance segmentation support/example using C API #41

Closed
tehkillerbee opened this issue Jan 4, 2022 · 6 comments
Closed

instance segmentation support/example using C API #41

tehkillerbee opened this issue Jan 4, 2022 · 6 comments

Comments

@tehkillerbee
Copy link
Contributor

Describe the feature
Instance segmentation does not appear to be supported by the C API at this point. This would be a very welcome addition.

Motivation
I looked at the MMDeploy SDK C code and noticed that the examples do not cover Instance segmentation.

However, it is possible to deploy a model for instance segmentation (Mask RCNN) using TensorRT backend. The resulting TensorRT model works correctly. Visualizing the output shows identical output for PyTorch/TensorRT (albeit with incorrect CLASSES, since I use custom classes). Running the same model with the "object_detection.cpp" does work, although with no masks.

If this feature is already supported internally by the C API, feel free to point me in the right direction so I can make an example application myself.

@lvhan028
Copy link
Collaborator

lvhan028 commented Jan 5, 2022

Hi, @tehkillerbee. Please refer to detector.h. It supports both object detection and instance segmentation.

@tehkillerbee
Copy link
Contributor Author

tehkillerbee commented Jan 6, 2022

@lvhan028 Thank you for your advice, I managed to get it working - I should've looked closer in detector.h. Should I update the object_detection.cpp example accordingly or should I add a separate instance segmentation example?

@lvhan028
Copy link
Collaborator

lvhan028 commented Jan 6, 2022

I think it's better to update object_detection.cpp. For one thing, it is consistent with the header file , for another the user document won't be changed:)

@tehkillerbee
Copy link
Contributor Author

Ok! I need to make sure the example still works with mmdetection models that does not use mask output. Can I assume that "bboxes[i].mask" will be a nullptr, if the mask is not used?

@lvhan028
Copy link
Collaborator

lvhan028 commented Jan 7, 2022

Ok! I need to make sure the example still works with mmdetection models that does not use mask output. Can I assume that "bboxes[i].mask" will be a nullptr, if the mask is not used?

sure

@lvhan028
Copy link
Collaborator

pr #55

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

2 participants