Add files using upload-large-folder tool
Browse files- LICENSES.md +15 -0
- MANIFEST.json +68 -0
- README.md +125 -0
- mobile_sam_20230629.zip +3 -0
- sam2_hiera_base_plus.zip +3 -0
- sam2_hiera_large.zip +3 -0
- sam2_hiera_small.zip +3 -0
- sam2_hiera_tiny.zip +3 -0
LICENSES.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Model licenses and attribution
|
| 2 |
+
|
| 3 |
+
All five bundles are distributed under the Apache License 2.0 terms of their
|
| 4 |
+
respective upstream projects. The archives are byte-for-byte mirrors of the
|
| 5 |
+
pinned source revisions recorded in `MANIFEST.json`.
|
| 6 |
+
|
| 7 |
+
| Model | Upstream project | License |
|
| 8 |
+
| --- | --- | --- |
|
| 9 |
+
| SAM 2 Hiera-Tiny/Small/Base+/Large | [facebookresearch/sam2](https://github.com/facebookresearch/sam2) | [Apache License 2.0](https://github.com/facebookresearch/sam2/blob/main/LICENSE) |
|
| 10 |
+
| MobileSAM encoder | [ChaoningZhang/MobileSAM](https://github.com/ChaoningZhang/MobileSAM) | [Apache License 2.0](https://github.com/ChaoningZhang/MobileSAM/blob/master/LICENSE) |
|
| 11 |
+
| SAM decoder used by MobileSAM | [facebookresearch/segment-anything](https://github.com/facebookresearch/segment-anything) | [Apache License 2.0](https://github.com/facebookresearch/segment-anything/blob/main/LICENSE) |
|
| 12 |
+
|
| 13 |
+
Copyright remains with the original authors and contributors. AnyLearning and
|
| 14 |
+
Neural Research Lab do not claim ownership of the underlying model research or
|
| 15 |
+
weights.
|
MANIFEST.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema_version": 1,
|
| 3 |
+
"created_at": "2026-08-30",
|
| 4 |
+
"files": {
|
| 5 |
+
"mobile_sam_20230629.zip": {
|
| 6 |
+
"archive_members": [
|
| 7 |
+
"config.yaml",
|
| 8 |
+
"mobile_sam.encoder.onnx",
|
| 9 |
+
"sam_vit_h_4b8939.decoder.onnx"
|
| 10 |
+
],
|
| 11 |
+
"sha256": "41aff2660b7531becfee21fb257c49933ddc892c554507bdb775bf504d443942",
|
| 12 |
+
"size_bytes": 36655105,
|
| 13 |
+
"source_filename": "mobile_sam_20230629.zip",
|
| 14 |
+
"source_repo": "vietanhdev/segment-anything-onnx-models",
|
| 15 |
+
"source_revision": "9effc01a9e135621d710d49159f1ffb0b6f724dc"
|
| 16 |
+
},
|
| 17 |
+
"sam2_hiera_base_plus.zip": {
|
| 18 |
+
"archive_members": [
|
| 19 |
+
"config.yaml",
|
| 20 |
+
"sam2_hiera_base_plus.decoder.onnx",
|
| 21 |
+
"sam2_hiera_base_plus.encoder.onnx"
|
| 22 |
+
],
|
| 23 |
+
"sha256": "c56282103c2bf99bdab07d2dddb1be67c03d71659ade3f9dcf1d7001fda582fb",
|
| 24 |
+
"size_bytes": 360422777,
|
| 25 |
+
"source_filename": "sam2_hiera_base_plus.zip",
|
| 26 |
+
"source_repo": "vietanhdev/segment-anything-2-onnx-models",
|
| 27 |
+
"source_revision": "071f58077599431edd0e5d2ac52ecca4c78f1cab"
|
| 28 |
+
},
|
| 29 |
+
"sam2_hiera_large.zip": {
|
| 30 |
+
"archive_members": [
|
| 31 |
+
"config.yaml",
|
| 32 |
+
"sam2_hiera_large.decoder.onnx",
|
| 33 |
+
"sam2_hiera_large.encoder.onnx"
|
| 34 |
+
],
|
| 35 |
+
"sha256": "a967ef6e54794e9494c8b71201766532b7b2929fe18f56b8e63940e97dc671ac",
|
| 36 |
+
"size_bytes": 910003530,
|
| 37 |
+
"source_filename": "sam2_hiera_large.zip",
|
| 38 |
+
"source_repo": "vietanhdev/segment-anything-2-onnx-models",
|
| 39 |
+
"source_revision": "071f58077599431edd0e5d2ac52ecca4c78f1cab"
|
| 40 |
+
},
|
| 41 |
+
"sam2_hiera_small.zip": {
|
| 42 |
+
"archive_members": [
|
| 43 |
+
"config.yaml",
|
| 44 |
+
"sam2_hiera_small.decoder.onnx",
|
| 45 |
+
"sam2_hiera_small.encoder.onnx"
|
| 46 |
+
],
|
| 47 |
+
"sha256": "4ef9047eb7fc7e36041c88a9f968c3c0b1d1640b88ef66d754b7d558a10cee38",
|
| 48 |
+
"size_bytes": 183345019,
|
| 49 |
+
"source_filename": "sam2_hiera_small.zip",
|
| 50 |
+
"source_repo": "vietanhdev/segment-anything-2-onnx-models",
|
| 51 |
+
"source_revision": "071f58077599431edd0e5d2ac52ecca4c78f1cab"
|
| 52 |
+
},
|
| 53 |
+
"sam2_hiera_tiny.zip": {
|
| 54 |
+
"archive_members": [
|
| 55 |
+
"config.yaml",
|
| 56 |
+
"sam2_hiera_tiny.decoder.onnx",
|
| 57 |
+
"sam2_hiera_tiny.encoder.onnx"
|
| 58 |
+
],
|
| 59 |
+
"sha256": "7454c3afd835b2acaad863afe3acb11f4e4af039c96e886989ad3873a338e1ec",
|
| 60 |
+
"size_bytes": 154902833,
|
| 61 |
+
"source_filename": "sam2_hiera_tiny.zip",
|
| 62 |
+
"source_repo": "vietanhdev/segment-anything-2-onnx-models",
|
| 63 |
+
"source_revision": "071f58077599431edd0e5d2ac52ecca4c78f1cab"
|
| 64 |
+
}
|
| 65 |
+
},
|
| 66 |
+
"license": "Apache-2.0",
|
| 67 |
+
"repository": "nrl-ai/anylearning-labeling-models"
|
| 68 |
+
}
|
README.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
pipeline_tag: image-segmentation
|
| 4 |
+
library_name: onnx
|
| 5 |
+
tags:
|
| 6 |
+
- anylearning
|
| 7 |
+
- onnx
|
| 8 |
+
- onnxruntime
|
| 9 |
+
- segment-anything
|
| 10 |
+
- segment-anything-2
|
| 11 |
+
- image-segmentation
|
| 12 |
+
- promptable-segmentation
|
| 13 |
+
- edge-ai
|
| 14 |
+
authors:
|
| 15 |
+
- Neural Research Lab
|
| 16 |
+
- Viet-Anh Nguyen
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# AnyLearning labeling models
|
| 20 |
+
|
| 21 |
+
Versioned ONNX model bundles used by
|
| 22 |
+
[AnyLearning](https://github.com/nrl-ai/anylearning-oss) for local,
|
| 23 |
+
prompt-guided image segmentation.
|
| 24 |
+
|
| 25 |
+
This repository contains the five models currently offered by AnyLearning:
|
| 26 |
+
|
| 27 |
+
| File | Model | Download size | SHA-256 |
|
| 28 |
+
| --- | --- | ---: | --- |
|
| 29 |
+
| `mobile_sam_20230629.zip` | MobileSAM | 36,655,105 bytes | `41aff2660b7531becfee21fb257c49933ddc892c554507bdb775bf504d443942` |
|
| 30 |
+
| `sam2_hiera_tiny.zip` | SAM 2 Hiera-Tiny | 154,902,833 bytes | `7454c3afd835b2acaad863afe3acb11f4e4af039c96e886989ad3873a338e1ec` |
|
| 31 |
+
| `sam2_hiera_small.zip` | SAM 2 Hiera-Small | 183,345,019 bytes | `4ef9047eb7fc7e36041c88a9f968c3c0b1d1640b88ef66d754b7d558a10cee38` |
|
| 32 |
+
| `sam2_hiera_base_plus.zip` | SAM 2 Hiera-Base+ | 360,422,777 bytes | `c56282103c2bf99bdab07d2dddb1be67c03d71659ade3f9dcf1d7001fda582fb` |
|
| 33 |
+
| `sam2_hiera_large.zip` | SAM 2 Hiera-Large | 910,003,530 bytes | `a967ef6e54794e9494c8b71201766532b7b2929fe18f56b8e63940e97dc671ac` |
|
| 34 |
+
|
| 35 |
+
Each ZIP contains a small AnyLearning model configuration and one encoder plus
|
| 36 |
+
one decoder ONNX model. `MANIFEST.json` records the exact source revision,
|
| 37 |
+
archive size, checksum, and expected members.
|
| 38 |
+
|
| 39 |
+
## Provenance
|
| 40 |
+
|
| 41 |
+
The files are byte-for-byte mirrors of ONNX exports published by Viet-Anh
|
| 42 |
+
Nguyen:
|
| 43 |
+
|
| 44 |
+
- SAM 2 bundles: source revision
|
| 45 |
+
`071f58077599431edd0e5d2ac52ecca4c78f1cab` from
|
| 46 |
+
`vietanhdev/segment-anything-2-onnx-models`.
|
| 47 |
+
- MobileSAM bundle: source revision
|
| 48 |
+
`9effc01a9e135621d710d49159f1ffb0b6f724dc` from
|
| 49 |
+
`vietanhdev/segment-anything-onnx-models`.
|
| 50 |
+
|
| 51 |
+
Original model projects:
|
| 52 |
+
|
| 53 |
+
- [Segment Anything 2](https://github.com/facebookresearch/sam2)
|
| 54 |
+
- [Segment Anything](https://github.com/facebookresearch/segment-anything)
|
| 55 |
+
- [MobileSAM](https://github.com/ChaoningZhang/MobileSAM)
|
| 56 |
+
|
| 57 |
+
These mirrors do not change the weights or model graphs.
|
| 58 |
+
|
| 59 |
+
## Secure and reproducible download
|
| 60 |
+
|
| 61 |
+
Pin a repository revision and verify the SHA-256 value from `MANIFEST.json`
|
| 62 |
+
before extracting or loading a model. Consumers should reject absolute paths,
|
| 63 |
+
parent traversal, links, unexpected archive members, and files exceeding their
|
| 64 |
+
configured size limits.
|
| 65 |
+
|
| 66 |
+
```python
|
| 67 |
+
from hashlib import sha256
|
| 68 |
+
from pathlib import Path
|
| 69 |
+
|
| 70 |
+
from huggingface_hub import hf_hub_download
|
| 71 |
+
|
| 72 |
+
path = Path(
|
| 73 |
+
hf_hub_download(
|
| 74 |
+
repo_id="nrl-ai/anylearning-labeling-models",
|
| 75 |
+
filename="sam2_hiera_tiny.zip",
|
| 76 |
+
revision="v1.0.0",
|
| 77 |
+
)
|
| 78 |
+
)
|
| 79 |
+
|
| 80 |
+
expected = "7454c3afd835b2acaad863afe3acb11f4e4af039c96e886989ad3873a338e1ec"
|
| 81 |
+
assert sha256(path.read_bytes()).hexdigest() == expected
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
AnyLearning performs the full image encoding, prompt conversion, mask decoding,
|
| 85 |
+
and editable-shape conversion. These archives are not standalone applications.
|
| 86 |
+
|
| 87 |
+
## Intended use and limitations
|
| 88 |
+
|
| 89 |
+
- Intended for interactive point/rectangle-prompt segmentation in AnyLearning.
|
| 90 |
+
- Results require human review before becoming dataset labels.
|
| 91 |
+
- Quality and latency vary with image content, hardware, execution provider, and
|
| 92 |
+
model size.
|
| 93 |
+
- These models can reproduce biases and limitations of their original training
|
| 94 |
+
data.
|
| 95 |
+
- Do not use segmentation output as the sole basis for safety-critical,
|
| 96 |
+
medical, legal, or similarly consequential decisions.
|
| 97 |
+
|
| 98 |
+
## License
|
| 99 |
+
|
| 100 |
+
The model code and weights are distributed under Apache License 2.0 by their
|
| 101 |
+
respective upstream projects. See `LICENSES.md` for source and attribution links.
|
| 102 |
+
|
| 103 |
+
## Citation
|
| 104 |
+
|
| 105 |
+
For SAM 2, cite:
|
| 106 |
+
|
| 107 |
+
```bibtex
|
| 108 |
+
@article{ravi2024sam2,
|
| 109 |
+
title={SAM 2: Segment Anything in Images and Videos},
|
| 110 |
+
author={Ravi, Nikhila and others},
|
| 111 |
+
journal={arXiv:2408.00714},
|
| 112 |
+
year={2024}
|
| 113 |
+
}
|
| 114 |
+
```
|
| 115 |
+
|
| 116 |
+
For SAM, cite:
|
| 117 |
+
|
| 118 |
+
```bibtex
|
| 119 |
+
@article{kirillov2023segment,
|
| 120 |
+
title={Segment Anything},
|
| 121 |
+
author={Kirillov, Alexander and others},
|
| 122 |
+
journal={arXiv:2304.02643},
|
| 123 |
+
year={2023}
|
| 124 |
+
}
|
| 125 |
+
```
|
mobile_sam_20230629.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:41aff2660b7531becfee21fb257c49933ddc892c554507bdb775bf504d443942
|
| 3 |
+
size 36655105
|
sam2_hiera_base_plus.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c56282103c2bf99bdab07d2dddb1be67c03d71659ade3f9dcf1d7001fda582fb
|
| 3 |
+
size 360422777
|
sam2_hiera_large.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a967ef6e54794e9494c8b71201766532b7b2929fe18f56b8e63940e97dc671ac
|
| 3 |
+
size 910003530
|
sam2_hiera_small.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4ef9047eb7fc7e36041c88a9f968c3c0b1d1640b88ef66d754b7d558a10cee38
|
| 3 |
+
size 183345019
|
sam2_hiera_tiny.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7454c3afd835b2acaad863afe3acb11f4e4af039c96e886989ad3873a338e1ec
|
| 3 |
+
size 154902833
|