Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akashAD98/YOLOV8_SAM
yolov8 model with SAM meta
https://github.com/akashAD98/YOLOV8_SAM
meta sam segmentation yolo yolov5 yolov8
Last synced: 2 months ago
JSON representation
yolov8 model with SAM meta
- Host: GitHub
- URL: https://github.com/akashAD98/YOLOV8_SAM
- Owner: akashAD98
- License: mit
- Created: 2023-04-14T16:24:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-14T04:45:38.000Z (about 1 year ago)
- Last Synced: 2024-08-02T01:24:04.943Z (6 months ago)
- Topics: meta, sam, segmentation, yolo, yolov5, yolov8
- Language: Jupyter Notebook
- Homepage:
- Size: 3.03 MB
- Stars: 111
- Watchers: 4
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-yolo-object-detection - akashAD98/YOLOV8_SAM
README
# YOLOV8_SAM
yolov8 model with SAM metaUse yolov8 & SAM model to get segmention for custom model
# installation
```
pip install ultralytics
pip install 'git+https://github.com/facebookresearch/segment-anything.git'```
## Download weights
```
!wget -P images https://raw.githubusercontent.com/facebookresearch/segment-anything/main/notebooks/images/truck.jpg
!wget -P images https://raw.githubusercontent.com/facebookresearch/segment-anything/main/notebooks/images/groceries.jpg
!wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth
```## Test on image
```
python detect_multiple_object_SAM.py
```## visulise the results
```
python3 visulise_mask.py
```## Results
Bounding box: [478, 1280, 182, 76]
Segmentation mask:
[631, 1280, 630, 1281, 629, 1281, 628, 1282, 626, 1282, 625, 1283, 622, 1283, 621, 1284, 619, 1284, 618, 1285, 615, 1285, 614, 1286, 612, 1286, 611, 1287, 609, 1287, 608, 1288, 607, 1288, 606, 1289, 604, 1289, 603, 1290, 602, 1290, 601, 1291, 599, 1291, 598, 1292, 596, 1292, 595, 1293, 593, 1293, 592, 1294]### Save the result in yolo format for training Mask segmentation model.
yolo format = [0 0.529687 0 0.014815 0 0.529167 0 0.015741 0 0.525521 0 0.015741 0 0.525000 0 0.016667 0 0.519792 0 0.016667 0 0.519271 0 0.017593 0 0.513021 0 0.017593 0 0.512500 0 0.018519 0 0.505208 0 0.018519]
### TODO
```
- Doing annotations on multiple images - Done
- Add support for saving annotations in yolo format -Done
- Support jsno format for segmentation model trainig```
### refrence
```
https://github.com/facebookresearch/segment-anything
https://github.com/ultralytics/ultralytics
````