facebookresearch / facebookresearch/segment-anything
Sam to TorchScript
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 54.9k
- Forks
- 6.4k
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I wanted to share my implementation of the SAM model in Java thought TorchScript. This is meant to be a working prototype to show how it can be done as well as a starting point.
I've added a short guide on how to convert the model with minimal work. In reality, a lot of the logic should be either made TorchScript compatible or rewritten in another language.
It includes the python code and modifications to the segment_anything library through mocking.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked djl-image-sam repository, its short conversion guide, and the included Python code and segment_anything modifications. The issue presents a prototype rather than naming a scoped change, target files, tests, or acceptance criteria, so the intended definition of done needs clarification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, python
- Domain
- ai, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100