Commit ·
43c1f04
0
Parent(s):
Duplicate from apple/coreml-sam2-small
Browse filesCo-authored-by: Christopher Fleetwood <FL33TW00D-HF@users.noreply.huggingface.co>
- .gitattributes +35 -0
- README.md +36 -0
- SAM2SmallImageEncoderFLOAT16.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
- SAM2SmallImageEncoderFLOAT16.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
- SAM2SmallImageEncoderFLOAT16.mlpackage/Manifest.json +18 -0
- SAM2SmallMaskDecoderFLOAT16.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
- SAM2SmallMaskDecoderFLOAT16.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
- SAM2SmallMaskDecoderFLOAT16.mlpackage/Manifest.json +18 -0
- SAM2SmallPromptEncoderFLOAT16.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
- SAM2SmallPromptEncoderFLOAT16.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
- SAM2SmallPromptEncoderFLOAT16.mlpackage/Manifest.json +18 -0
.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
pipeline_tag: mask-generation
|
| 4 |
+
library_name: coreml
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# SAM2 Small Core ML
|
| 8 |
+
|
| 9 |
+
SAM 2 (Segment Anything in Images and Videos), is a collection of foundation models from FAIR that aim to solve promptable visual segmentation in images and videos. See the [SAM 2 paper](https://arxiv.org/abs/2408.00714) for more information.
|
| 10 |
+
|
| 11 |
+
This is the Core ML version of [SAM 2 Tiny](https://huggingface.co/facebook/sam2-hiera-tiny), and is suitable for use with the [SAM2 Studio demo app](https://github.com/huggingface/sam2-studio). It was converted in `float16` precision using [this fork](https://github.com/huggingface/segment-anything-2/tree/coreml-conversion) of the original code repository.
|
| 12 |
+
|
| 13 |
+
## Download
|
| 14 |
+
|
| 15 |
+
Install `huggingface-cli`
|
| 16 |
+
|
| 17 |
+
```bash
|
| 18 |
+
brew install huggingface-cli
|
| 19 |
+
```
|
| 20 |
+
|
| 21 |
+
```bash
|
| 22 |
+
huggingface-cli download --local-dir models coreml-projects/coreml-sam2-small
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
## Citation
|
| 26 |
+
|
| 27 |
+
To cite the paper, model, or software, please use the below:
|
| 28 |
+
```
|
| 29 |
+
@article{ravi2024sam2,
|
| 30 |
+
title={SAM 2: Segment Anything in Images and Videos},
|
| 31 |
+
author={Ravi, Nikhila and Gabeur, Valentin and Hu, Yuan-Ting and Hu, Ronghang and Ryali, Chaitanya and Ma, Tengyu and Khedr, Haitham and R{\"a}dle, Roman and Rolland, Chloe and Gustafson, Laura and Mintun, Eric and Pan, Junting and Alwala, Kalyan Vasudev and Carion, Nicolas and Wu, Chao-Yuan and Girshick, Ross and Doll{\'a}r, Piotr and Feichtenhofer, Christoph},
|
| 32 |
+
journal={arXiv preprint arXiv:2408.00714},
|
| 33 |
+
url={https://arxiv.org/abs/2408.00714},
|
| 34 |
+
year={2024}
|
| 35 |
+
}
|
| 36 |
+
```
|
SAM2SmallImageEncoderFLOAT16.mlpackage/Data/com.apple.CoreML/model.mlmodel
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6b83f9fd856c10d562bb4996b88913229d200326cd583520ecaa8aec944b7d83
|
| 3 |
+
size 204453
|
SAM2SmallImageEncoderFLOAT16.mlpackage/Data/com.apple.CoreML/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bea4817bcb35157b9d89cff1d5667f2749652461e9e4eb5a32d0ddf58f519c43
|
| 3 |
+
size 81268288
|
SAM2SmallImageEncoderFLOAT16.mlpackage/Manifest.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"fileFormatVersion": "1.0.0",
|
| 3 |
+
"itemInfoEntries": {
|
| 4 |
+
"080B3774-D9C5-4AEB-8F4C-EDE7D8AADE19": {
|
| 5 |
+
"author": "com.apple.CoreML",
|
| 6 |
+
"description": "CoreML Model Weights",
|
| 7 |
+
"name": "weights",
|
| 8 |
+
"path": "com.apple.CoreML/weights"
|
| 9 |
+
},
|
| 10 |
+
"F62C1320-194D-47A9-A270-7D7DA551C88D": {
|
| 11 |
+
"author": "com.apple.CoreML",
|
| 12 |
+
"description": "CoreML Model Specification",
|
| 13 |
+
"name": "model.mlmodel",
|
| 14 |
+
"path": "com.apple.CoreML/model.mlmodel"
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
"rootModelIdentifier": "F62C1320-194D-47A9-A270-7D7DA551C88D"
|
| 18 |
+
}
|
SAM2SmallMaskDecoderFLOAT16.mlpackage/Data/com.apple.CoreML/model.mlmodel
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a5f385afb0c2658a7181e807d58381afdfcc44cff2bf089036b90aa52eeadd2e
|
| 3 |
+
size 75239
|
SAM2SmallMaskDecoderFLOAT16.mlpackage/Data/com.apple.CoreML/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c2244ed5ca08e5b7b88eaa2981cb06a1b6345569057bb807ab0bc23639d75c21
|
| 3 |
+
size 10222400
|
SAM2SmallMaskDecoderFLOAT16.mlpackage/Manifest.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"fileFormatVersion": "1.0.0",
|
| 3 |
+
"itemInfoEntries": {
|
| 4 |
+
"06518824-20AF-45D9-972D-1964E9FC111B": {
|
| 5 |
+
"author": "com.apple.CoreML",
|
| 6 |
+
"description": "CoreML Model Specification",
|
| 7 |
+
"name": "model.mlmodel",
|
| 8 |
+
"path": "com.apple.CoreML/model.mlmodel"
|
| 9 |
+
},
|
| 10 |
+
"36C7CAC9-F303-41DA-A8EE-72FBAC9BF916": {
|
| 11 |
+
"author": "com.apple.CoreML",
|
| 12 |
+
"description": "CoreML Model Weights",
|
| 13 |
+
"name": "weights",
|
| 14 |
+
"path": "com.apple.CoreML/weights"
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
"rootModelIdentifier": "06518824-20AF-45D9-972D-1964E9FC111B"
|
| 18 |
+
}
|
SAM2SmallPromptEncoderFLOAT16.mlpackage/Data/com.apple.CoreML/model.mlmodel
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fb590eaae4bcf5e522b6c5c1f22b8b399cc90f02d0a56d9cc7e2934817429614
|
| 3 |
+
size 20804
|
SAM2SmallPromptEncoderFLOAT16.mlpackage/Data/com.apple.CoreML/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7227cf25b79591d5a9d314ea76dfa5045c511c43460022493631137b9ec87cfa
|
| 3 |
+
size 2101056
|
SAM2SmallPromptEncoderFLOAT16.mlpackage/Manifest.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"fileFormatVersion": "1.0.0",
|
| 3 |
+
"itemInfoEntries": {
|
| 4 |
+
"6694C8A6-B062-4B46-990D-B2D32F509C64": {
|
| 5 |
+
"author": "com.apple.CoreML",
|
| 6 |
+
"description": "CoreML Model Specification",
|
| 7 |
+
"name": "model.mlmodel",
|
| 8 |
+
"path": "com.apple.CoreML/model.mlmodel"
|
| 9 |
+
},
|
| 10 |
+
"8A5F42DE-5C16-4ABB-AD38-C7FC24905FE6": {
|
| 11 |
+
"author": "com.apple.CoreML",
|
| 12 |
+
"description": "CoreML Model Weights",
|
| 13 |
+
"name": "weights",
|
| 14 |
+
"path": "com.apple.CoreML/weights"
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
"rootModelIdentifier": "6694C8A6-B062-4B46-990D-B2D32F509C64"
|
| 18 |
+
}
|