OpenGVLab / SAM-Med2D

Official implementation of SAM-Med2D
Apache License 2.0
892 stars 85 forks source link

Why does the training use BGR input instead of the original SAM's RGB input? #20

Closed klykq111 closed 1 year ago

klykq111 commented 1 year ago

Why does the training use BGR input instead of the original SAM's RGB input? https://github.com/OpenGVLab/SAM-Med2D/blob/3a7ccebd1a20c2173d2b1a60d005f997ee12f6c7/DataLoader.py#L142 There is no operation of converting BGR to RGB.

Cjl-MedSeg commented 1 year ago

The majority of our training dataset consists of single-channel images, so whether we convert BGR images to RGB or leave them unchanged, the actual effect is the same. Additionally, if you intend to fine-tune SAM-Med2D on a dataset similar to natural images, you can consider converting BGR images to RGB. Currently, we have not observed any significant impact on performance from such a conversion.

klykq111 commented 1 year ago

Thank you for your response.