How define the number of class in Detectron2 bounding box predict Pytorch?
Where should i define the number os classes ?
ROI HEAD or RETINANET ?
Or both should have the same value ?
cfg.MODEL.RETINANET.NUM_CLASSES =int( len(Classe_list)-1)

cfg.MODEL.ROI_HEADS.NUM_CLASSES=int( len(Classe_list)-1)


It depends on the network architecture you choose to use. If you use the &quot;MaskRCNN&quot;, then you should set the cfg.MDOEL.ROI_HEADS.NUM_CLASSES.
The deep reason is that ROI_HEAD is the component used by MaskRCNN. If you use different network, you may need to change different things dependent on their implementation
