Skip to content

CSPDarkNet

CSPDarkNet backbone based on YOLOX: Exceeding YOLO Series in 2021.

CSPDarkNet is a modified model from Darknet53 by adopting the strategy of CSPNet. Therefore, the structure of the model is fixed, and neither the number of stages nor type of blocks can be changed. The size of the model is determined by two values, which define the feature dimensions within the model and the repetition of CSPLayers.

Compatibility matrix

Supporting necks Supporting heads torch.fx NetsPresso
FPN
YOLOPAFPN
FC
ALLMLPDecoder
AnchorDecoupledHead
AnchorFreeDecoupledHead
Supported Supported

Field list

Field Description
name (str) Name must be "cspdarknet" to use CSPDarkNet backbone.
params.dep_mul (float) Multiplying factor determining the repetition count of CSPLayer in the backbone.
params.wid_mul (float) Multiplying factor adjusting the input/output dimensions of convolutional layers throughout the backbone.
params.act_type (str) Type of activation function for the model. Supporting activation functions are described in [here].

Model configuration examples

CSPDarkNet-s
model:
  architecture:
    backbone:
      name: cspdarknet
      params:
        dep_mul: &dep_mul 0.33
        wid_mul: 0.5
        act_type: &act_type "silu"
      stage_params: ~
CSPDarkNet-m
model:
  architecture:
    backbone:
      name: cspdarknet
      params:
        dep_mul: &dep_mul 0.67
        wid_mul: 0.75
        act_type: &act_type "silu"
      stage_params: ~
CSPDarkNet-l
model:
  architecture:
    backbone:
      name: cspdarknet
      params:
        dep_mul: &dep_mul 1.0
        wid_mul: 1.0
        act_type: &act_type "silu"
      stage_params: ~
CSPDarkNet-x
model:
  architecture:
    backbone:
      name: cspdarknet
      params:
        dep_mul: &dep_mul 1.33
        wid_mul: 1.25
        act_type: &act_type "silu"
      stage_params: ~