-
Notifications
You must be signed in to change notification settings - Fork 512
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from dhkim2810/master
Add Gradio Demo
- Loading branch information
Showing
14 changed files
with
1,022 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
*.7z filter=lfs diff=lfs merge=lfs -text | ||
*.arrow filter=lfs diff=lfs merge=lfs -text | ||
*.bin filter=lfs diff=lfs merge=lfs -text | ||
*.bz2 filter=lfs diff=lfs merge=lfs -text | ||
*.ckpt filter=lfs diff=lfs merge=lfs -text | ||
*.ftz filter=lfs diff=lfs merge=lfs -text | ||
*.gz filter=lfs diff=lfs merge=lfs -text | ||
*.h5 filter=lfs diff=lfs merge=lfs -text | ||
*.joblib filter=lfs diff=lfs merge=lfs -text | ||
*.lfs.* filter=lfs diff=lfs merge=lfs -text | ||
*.mlmodel filter=lfs diff=lfs merge=lfs -text | ||
*.model filter=lfs diff=lfs merge=lfs -text | ||
*.msgpack filter=lfs diff=lfs merge=lfs -text | ||
*.npy filter=lfs diff=lfs merge=lfs -text | ||
*.npz filter=lfs diff=lfs merge=lfs -text | ||
*.onnx filter=lfs diff=lfs merge=lfs -text | ||
*.ot filter=lfs diff=lfs merge=lfs -text | ||
*.parquet filter=lfs diff=lfs merge=lfs -text | ||
*.pb filter=lfs diff=lfs merge=lfs -text | ||
*.pickle filter=lfs diff=lfs merge=lfs -text | ||
*.pkl filter=lfs diff=lfs merge=lfs -text | ||
*.pt filter=lfs diff=lfs merge=lfs -text | ||
*.pth filter=lfs diff=lfs merge=lfs -text | ||
*.rar filter=lfs diff=lfs merge=lfs -text | ||
*.safetensors filter=lfs diff=lfs merge=lfs -text | ||
saved_model/**/* filter=lfs diff=lfs merge=lfs -text | ||
*.tar.* filter=lfs diff=lfs merge=lfs -text | ||
*.tar filter=lfs diff=lfs merge=lfs -text | ||
*.tflite filter=lfs diff=lfs merge=lfs -text | ||
*.tgz filter=lfs diff=lfs merge=lfs -text | ||
*.wasm filter=lfs diff=lfs merge=lfs -text | ||
*.xz filter=lfs diff=lfs merge=lfs -text | ||
*.zip filter=lfs diff=lfs merge=lfs -text | ||
*.zst filter=lfs diff=lfs merge=lfs -text | ||
*tfevents* filter=lfs diff=lfs merge=lfs -text | ||
assets/sa_1309.jpg filter=lfs diff=lfs merge=lfs -text | ||
assets/sa_192.jpg filter=lfs diff=lfs merge=lfs -text | ||
assets/sa_414.jpg filter=lfs diff=lfs merge=lfs -text | ||
assets/sa_862.jpg filter=lfs diff=lfs merge=lfs -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: MobileSAM | ||
emoji: 🐠 | ||
colorFrom: indigo | ||
colorTo: yellow | ||
sdk: gradio | ||
python_version: 3.8.10 | ||
sdk_version: 3.35.2 | ||
app_file: app.py | ||
pinned: false | ||
license: apache-2.0 | ||
--- | ||
|
||
# Faster Segment Anything(MobileSAM) | ||
|
||
Official PyTorch Implementation of the <a href="https://github.com/ChaoningZhang/MobileSAM">. | ||
|
||
|
||
**MobileSAM** performs on par with the original SAM (at least visually) and keeps exactly the same pipeline as the original SAM except for a change on the image encoder. | ||
Specifically, we replace the original heavyweight ViT-H encoder (632M) with a much smaller Tiny-ViT (5M). On a single GPU, MobileSAM runs around 12ms per image: 8ms on the image encoder and 4ms on the mask decoder. | ||
|
||
## To run on local PC | ||
First, mobile_sam must be installed to run on pc. [Instructions](https://github.com/dhkim2810/MobileSAM/tree/master#installation) | ||
Then run the following | ||
|
||
``` | ||
python app.py | ||
``` | ||
|
||
## License | ||
|
||
The model is licensed under the [Apache 2.0 license](LICENSE). | ||
|
||
|
||
## Acknowledgement | ||
|
||
- [Segment Anything](https://segment-anything.com/) provides the SA-1B dataset and the base codes. | ||
- [TinyViT](https://github.com/microsoft/Cream/tree/main/TinyViT) provides codes and pre-trained models. | ||
|
||
## Citing MobileSAM | ||
|
||
If you find this project useful for your research, please consider citing the following BibTeX entry. | ||
|
||
```bibtex | ||
@article{mobile_sam, | ||
title={Faster Segment Anything: Towards Lightweight SAM for Mobile Applications}, | ||
author={Zhang, Chaoning and Han, Dongshen and Qiao, Yu and Kim, Jung Uk and Bae, Sung Ho and Lee, Seungkyu and Hong, Choong Seon}, | ||
journal={arXiv preprint arXiv:2306.14289}, | ||
year={2023} | ||
} | ||
``` |
Oops, something went wrong.