|
|
--- |
|
|
license: apache-2.0 |
|
|
tags: |
|
|
- onnx |
|
|
- segmentation |
|
|
- sam2 |
|
|
- ezonnx |
|
|
--- |
|
|
### EdgeTAM |
|
|
ONNX models for inference with [EZONNX](https://github.com/ikeboo/ezonnx) |
|
|
|
|
|
|
|
|
- Model type: |
|
|
Segmentation |
|
|
|
|
|
- Official repository: |
|
|
[EdgeTAM](https://github.com/facebookresearch/EdgeTAM) |
|
|
- Setup |
|
|
``` |
|
|
pip install git+https://github.com/ikeboo/ezonnx.git |
|
|
``` |
|
|
- Usage |
|
|
```python |
|
|
from ezonnx import EdgeTAM, visualize_images |
|
|
tam = EdgeTAM() |
|
|
res = tam.set_image("images/cat.jpg") |
|
|
# add point with positive or not and its label |
|
|
res = tam.set_point((240, 180), True, 1) |
|
|
res = tam.set_point((50,50), True, 2) |
|
|
res = tam.set_point((400,50), True, 2) |
|
|
res = tam.set_point((150, 330), True, 3) |
|
|
visualize_images("Masked Image",res.visualized_img) |
|
|
``` |