uni-medical / SAM-Med3D

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

one-hot-labels #74

Closed RRouhi closed 2 months ago

RRouhi commented 4 months ago

Thanks for sharing your code. From the documentation, I understand that the mask needs to be in binary format. For multi-label segmentation, the masks need to be encoded in a one-hot format. Could you please provide guidance on how the folder containing one-hot encoded data should be organized? Additionally, is it possible to include a relevant function in your repository? I am working on a segmentation task that requires distinguishing three labels: 0 for background, 1 for left hippocampus, and 2 for right hippocampus. Could you please guide me on how to generate the binary masks?

Thanks.

MinxuanQin commented 3 months ago

Hi! You can follow the preprocessing steps described in readme.md. The relevant functions and steps locate in utils/prepare_data_from_nnUNet.py.