Skip to content

Commit

Permalink
Merge pull request #82 from luca-medeiros/feat/sam2.1
Browse files Browse the repository at this point in the history
feat: SAM2.1
  • Loading branch information
luca-medeiros authored Oct 18, 2024
2 parents 3347db9 + 3be067c commit d201935
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Language Segment-Anything is an open-source project that combines the power of i

- Zero-shot text-to-bbox approach for object detection.
- GroundingDINO detection model integration.
- SAM 2.
- SAM 2.1
- Batch inference support.
- Easy endpoint deployment using the Lightning AI litserve platform.
- Customizable text prompts for precise object segmentation.
Expand Down
24 changes: 12 additions & 12 deletions lang_sam/models/sam.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@


SAM_MODELS = {
"sam2_hiera_tiny": {
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_tiny.pt",
"config": "sam2_hiera_t.yaml",
"sam2.1_hiera_tiny": {
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_tiny.pt",
"config": "configs/sam2.1/sam2.1_hiera_t.yaml",
},
"sam2_hiera_small": {
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_small.pt",
"config": "sam2_hiera_s.yaml",
"sam2.1_hiera_small": {
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_small.pt",
"config": "configs/sam2.1/sam2.1_hiera_s.yaml",
},
"sam2_hiera_base_plus": {
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_base_plus.pt",
"config": "sam2_hiera_b+.yaml",
"sam2.1_hiera_base_plus": {
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_base_plus.pt",
"config": "configs/sam2.1/sam2.1_hiera_b+.yaml",
},
"sam2_hiera_large": {
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_large.pt",
"config": "sam2_hiera_l.yaml",
"sam2.1_hiera_large": {
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_large.pt",
"config": "configs/sam2.1/sam2.1_hiera_l.yaml",
},
}

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ gradio==5.0.2
litserve==0.2.3
opencv-python-headless==4.10.0.84
pydantic==2.9.2
sam-2 @ git+https://github.com/facebookresearch/segment-anything-2@7e1596c0b6462eb1d1ba7e1492430fed95023598
sam-2 @ git+https://github.com/facebookresearch/segment-anything-2@c2ec8e14a185632b0a5d8b161928ceb50197eddc
supervision==0.23.0 ; python_full_version > '3.10'
transformers==4.44.2
uvloop==0.20.0
Expand Down

3 comments on commit d201935

@Jaid844
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not downloading the model as expected from my end .Image

@luca-medeiros
Copy link
Owner Author

@luca-medeiros luca-medeiros commented on d201935 Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use 'sam2.1_hiera_small' not 'sam2_hiera_small'.

@luca-medeiros
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will fix the default code

Please sign in to comment.