Please note that we use the method of Grounded SAM 2 and we modified to generate the masks of the objects in RGB images
datasets/
│
├── ds01/
│ ├── images
python grounded_sam2_hf_model_imgs_MaskExtract.py --path {PATH}
Saving the masks in datasets/{PATH}/masks
and the annotated images in datasets/{PATH}/annotated
datasets/
│
├── ds01/
│ ├── images
│ ├── masks
│ └── annotated