facebookresearch / facebookresearch/segment-anything

Sam to TorchScript

Open
#266 0 comments 5 reactions 0 assignees View on GitHub

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.

https://github.com/csia-pme/djl-image-sam

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.