-
Notifications
You must be signed in to change notification settings - Fork 659
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
Request for SAM2 Model in ONNX Format and Synset File for Classification Output #3483
Comments
Thank you for adding support for SAM2's ONNX model. The demo effect is very good. I have an additional question: how did you manage to split the model into two parts, one for encoding (sam2-hiera-large), using the approach of tracing the model? Could you explain the steps or method you used to achieve this separation? |
You can take a look at this python code: https://github.com/deepjavalibrary/djl/blob/master/examples/docs/trace_sam2_img.py#L37 You can create a wrapper model, it contains two method: |
@frankfliu The segmentation effect is very good,but I’m a bit unsure about how to implement object tracking across video frames. I would like to understand if it’s possible to track objects using SAM2, particularly in consecutive video frames, and how to maintain consistent identification of the same object over time. |
This demo is an object tracking implementation using Sam2, link. |
Description
Hello DJL Team,
I am currently using the SAM2 model from the DJL ModelZoo for inference purposes. However, I have encountered a couple of limitations that I would like to request your support in resolving:
ONNX Model Format: Currently, the SAM2 model is only available in the PyTorch (.pt) format. For broader compatibility and ease of integration with other frameworks, I would like to request that an ONNX (.onnx) format version of the SAM2 model be added to the ModelZoo.
Classification Output and Synset File: It appears that the SAM2 model's inference results do not provide classification outputs. To facilitate classification tasks, could you please provide a synset.txt file or any relevant label mapping file for this model, so that users can easily interpret the classification results?
These features would greatly enhance the usability and flexibility of the SAM2 model in a variety of projects.
Thank you for your work and consideration!
The text was updated successfully, but these errors were encountered: