Deci-AI / super-gradients

Easily train or fine-tune SOTA computer vision models with one open source training library. The home of Yolo-NAS.
https://www.supergradients.com
Apache License 2.0
4.59k stars 510 forks source link

Is there support for 2 channel and 4 channel training #916

Closed ajithkumarmcw closed 1 year ago

ajithkumarmcw commented 1 year ago

In Yolov8 we can train 2 channel images or 4 channel images by adding ch:2 or ch:4 parameter to yolov8s.yaml file . Does Yolo-NAS also have similar support if so where should we change it

dagshub[bot] commented 1 year ago

Join the discussion on DagsHub!

ofrimasad commented 1 year ago

Hi @ajithkumarmcw . It seems like we have a bug in not passing the in_channel parameter on instantiation. a ticket was opened, and this will be fixed in the coming patch version.

you can work around it by changing the default value in the code of super_gradients.training.models.detection_models.yolo_nas.yolo_nas_variants.YoloNAS_S or super_gradients.training.models.detection_models.yolo_nas.yolo_nas_variants.YoloNAS_M or super_gradients.training.models.detection_models.yolo_nas.yolo_nas_variants.YoloNAS_L

simply change in_channels: int = 3 to in_channels: int = 2

please note that changing the input channels will prevent you from using the pre-trained weights, of course. Hope that helps.

ajithkumarmcw commented 1 year ago

thanks for adding support