uni-medical / SAM-Med3D

SAM-Med3D: An Efficient General-purpose Promptable Segmentation Model for 3D Volumetric Medical Image
Apache License 2.0
483 stars 64 forks source link

Handling Images without Tumors for Model Training and Testing #52

Closed zhou07 closed 1 month ago

zhou07 commented 6 months ago

Hi,

Wonderful job! But when I ran your project, I have a question. My data includes some images that do not contain tumors; therefore, their masks are entirely zero. For these images, is the code unable to generate prompt points during training and testing?

zhou07 commented 6 months ago

Hi,

When I input an image without a tumor, the code crashes. The error shown is: error

blueyo0 commented 1 month ago

Hi, since this work is a promptable segmentation model, at least one prompt point is needed. So, if your label is totally empty, our code will crash. If you have to infer without label, you can try this experimental script https://github.com/uni-medical/SAM-Med3D/blob/main/infer_sequence.sh