rtdetr-resnet50.yaml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
  2. # Ultralytics RT-DETR-ResNet50 hybrid object detection model with P3/8 - P5/32 outputs
  3. # Model docs: https://docs.ultralytics.com/models/rtdetr
  4. # Task docs: https://docs.ultralytics.com/tasks/detect
  5. # Parameters
  6. nc: 80 # number of classes
  7. scales: # model compound scaling constants, i.e. 'model=yolov8n-cls.yaml' will call yolov8-cls.yaml with scale 'n'
  8. # [depth, width, max_channels]
  9. l: [1.00, 1.00, 1024]
  10. backbone:
  11. # [from, repeats, module, args]
  12. - [-1, 1, ResNetLayer, [3, 64, 1, True, 1]] # 0
  13. - [-1, 1, ResNetLayer, [64, 64, 1, False, 3]] # 1
  14. - [-1, 1, ResNetLayer, [256, 128, 2, False, 4]] # 2
  15. - [-1, 1, ResNetLayer, [512, 256, 2, False, 6]] # 3
  16. - [-1, 1, ResNetLayer, [1024, 512, 2, False, 3]] # 4
  17. head:
  18. - [-1, 1, Conv, [256, 1, 1, None, 1, 1, False]] # 5
  19. - [-1, 1, AIFI, [1024, 8]]
  20. - [-1, 1, Conv, [256, 1, 1]] # 7
  21. - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
  22. - [3, 1, Conv, [256, 1, 1, None, 1, 1, False]] # 9
  23. - [[-2, -1], 1, Concat, [1]]
  24. - [-1, 3, RepC3, [256]] # 11
  25. - [-1, 1, Conv, [256, 1, 1]] # 12
  26. - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
  27. - [2, 1, Conv, [256, 1, 1, None, 1, 1, False]] # 14
  28. - [[-2, -1], 1, Concat, [1]] # cat backbone P4
  29. - [-1, 3, RepC3, [256]] # X3 (16), fpn_blocks.1
  30. - [-1, 1, Conv, [256, 3, 2]] # 17, downsample_convs.0
  31. - [[-1, 12], 1, Concat, [1]] # cat Y4
  32. - [-1, 3, RepC3, [256]] # F4 (19), pan_blocks.0
  33. - [-1, 1, Conv, [256, 3, 2]] # 20, downsample_convs.1
  34. - [[-1, 7], 1, Concat, [1]] # cat Y5
  35. - [-1, 3, RepC3, [256]] # F5 (22), pan_blocks.1
  36. - [[16, 19, 22], 1, RTDETRDecoder, [nc]] # Detect(P3, P4, P5)