EstebanOlmedo / melanoma-tt

MIT License
0 stars 2 forks source link

Migrate segmentation to Meta's SAM #46

Closed EstebanOlmedo closed 11 months ago

EstebanOlmedo commented 11 months ago

Add SAM segmentation

To use local segmentation move sam_vit_h_4b8939.pth file to ./backend/sam_segmentation/ folder and use the segment function.

# mask and score of segmentation
sam_msk, score = segment(img)

To use online segmentation file use the segment_online function.

# mask and score of segmentation
sam_msk, score = segment_online(img)