'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)


Solution 1:[1]

It depends on the network architecture you choose to use. If you use the "MaskRCNN", 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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Shawn Jiang