yolov9e.yaml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
  2. # YOLOv9e object detection model with P3/8 - P5/32 outputs
  3. # Model docs: https://docs.ultralytics.com/models/yolov9
  4. # Task docs: https://docs.ultralytics.com/tasks/detect
  5. # 1225 layers, 58206592 parameters, 193.0 GFLOPs
  6. # Parameters
  7. nc: 80 # number of classes
  8. # GELAN backbone
  9. backbone:
  10. - [-1, 1, nn.Identity, []]
  11. - [-1, 1, Conv, [64, 3, 2]] # 1-P1/2
  12. - [-1, 1, Conv, [128, 3, 2]] # 2-P2/4
  13. - [-1, 1, RepNCSPELAN4, [256, 128, 64, 2]] # 3
  14. - [-1, 1, ADown, [256]] # 4-P3/8
  15. - [-1, 1, RepNCSPELAN4, [512, 256, 128, 2]] # 5
  16. - [-1, 1, ADown, [512]] # 6-P4/16
  17. - [-1, 1, RepNCSPELAN4, [1024, 512, 256, 2]] # 7
  18. - [-1, 1, ADown, [1024]] # 8-P5/32
  19. - [-1, 1, RepNCSPELAN4, [1024, 512, 256, 2]] # 9
  20. - [1, 1, CBLinear, [[64]]] # 10
  21. - [3, 1, CBLinear, [[64, 128]]] # 11
  22. - [5, 1, CBLinear, [[64, 128, 256]]] # 12
  23. - [7, 1, CBLinear, [[64, 128, 256, 512]]] # 13
  24. - [9, 1, CBLinear, [[64, 128, 256, 512, 1024]]] # 14
  25. - [0, 1, Conv, [64, 3, 2]] # 15-P1/2
  26. - [[10, 11, 12, 13, 14, -1], 1, CBFuse, [[0, 0, 0, 0, 0]]] # 16
  27. - [-1, 1, Conv, [128, 3, 2]] # 17-P2/4
  28. - [[11, 12, 13, 14, -1], 1, CBFuse, [[1, 1, 1, 1]]] # 18
  29. - [-1, 1, RepNCSPELAN4, [256, 128, 64, 2]] # 19
  30. - [-1, 1, ADown, [256]] # 20-P3/8
  31. - [[12, 13, 14, -1], 1, CBFuse, [[2, 2, 2]]] # 21
  32. - [-1, 1, RepNCSPELAN4, [512, 256, 128, 2]] # 22
  33. - [-1, 1, ADown, [512]] # 23-P4/16
  34. - [[13, 14, -1], 1, CBFuse, [[3, 3]]] # 24
  35. - [-1, 1, RepNCSPELAN4, [1024, 512, 256, 2]] # 25
  36. - [-1, 1, ADown, [1024]] # 26-P5/32
  37. - [[14, -1], 1, CBFuse, [[4]]] # 27
  38. - [-1, 1, RepNCSPELAN4, [1024, 512, 256, 2]] # 28
  39. - [-1, 1, SPPELAN, [512, 256]] # 29
  40. # GELAN head
  41. head:
  42. - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
  43. - [[-1, 25], 1, Concat, [1]] # cat backbone P4
  44. - [-1, 1, RepNCSPELAN4, [512, 512, 256, 2]] # 32
  45. - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
  46. - [[-1, 22], 1, Concat, [1]] # cat backbone P3
  47. - [-1, 1, RepNCSPELAN4, [256, 256, 128, 2]] # 35 (P3/8-small)
  48. - [-1, 1, ADown, [256]]
  49. - [[-1, 32], 1, Concat, [1]] # cat head P4
  50. - [-1, 1, RepNCSPELAN4, [512, 512, 256, 2]] # 38 (P4/16-medium)
  51. - [-1, 1, ADown, [512]]
  52. - [[-1, 29], 1, Concat, [1]] # cat head P5
  53. - [-1, 1, RepNCSPELAN4, [512, 1024, 512, 2]] # 41 (P5/32-large)
  54. - [[35, 38, 41], 1, Detect, [nc]] # Detect(P3, P4, P5)