yolov8 model with SAM meta
Use yolov8 & SAM model to get segmention for custom model
pip install ultralytics
pip install 'git+https://github.com/facebookresearch/segment-anything.git'
!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
python detect_multiple_object_SAM.py
python3 visulise_mask.py
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]
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]
- Doing annotations on multiple images - Done
- Add support for saving annotations in yolo format -Done
- Support jsno format for segmentation model trainig
https://github.com/facebookresearch/segment-anything
https://github.com/ultralytics/ultralytics