Qsingle / LearnablePromptSAM

Try to use the SAM-ViT as the backbone to create the learnable prompt for semantic segmentation
Apache License 2.0
77 stars 13 forks source link

The important of num classes argument #3

Open thangngoc89 opened 1 year ago

thangngoc89 commented 1 year ago

May I ask the importance of the num classes argument? Without seeing example training data, it’s hard to know why the default is 12 classes. TIA

Qsingle commented 1 year ago

We do not use the mask decoder, so we use one segmentation head to fine-tune the model. So we must tell the task head how many classes it needs to output. Because in one of our tasks, the number of types is 12. If you want to use the code in the current version, you can set it based on your task.

thangngoc89 commented 1 year ago

@Qsingle Thank you for your reply. In my case, each image has about 10-14 structures of the same class (the exact number is unknown unless I run some object detection algorithm over first), should the number of classes be 10-14 or one?

Qsingle commented 1 year ago

@Qsingle Thank you for your reply. In my case, each image has about 10-14 structures of the same class (the exact number is unknown unless I run some object detection algorithm over first), should the number of classes be 10-14 or one?

If you want to classify each structure as an individual class, you can set it to 10-14. Or you can set it to 2 (see the background as one class).

thangngoc89 commented 1 year ago

@Qsingle Thank you for your reply. In my case, each image has about 10-14 structures of the same class (the exact number is unknown unless I run some object detection algorithm over first), should the number of classes be 10-14 or one?

If you want to classify each structure as an individual class, you can set it to 10-14. Or you can set it to 2 (see the background as one class).

Thank you very much for your answers and for releasing the code