Code Monkey home page Code Monkey logo

Comments (5)

Hazel-Xiang avatar Hazel-Xiang commented on August 23, 2024

def parse_pruned_model
image

from yolov5prune.

Hazel-Xiang avatar Hazel-Xiang commented on August 23, 2024

commom.py中Concat_bifpn结构如下:
1

from yolov5prune.

Hazel-Xiang avatar Hazel-Xiang commented on August 23, 2024

yolov5s_bifpn.yaml结构如下:

parameters

nc: 2 # number of classes
depth_multiple: 0.33 # model depth multiple
width_multiple: 0.50 # layer channel multiple

anchors

anchors:

  • [10,13, 16,30, 33,23] # P3/8
  • [30,61, 62,45, 59,119] # P4/16
  • [116,90, 156,198, 373,326] # P5/32

YOLOv5 backbone

backbone:

[from, number, module, args]

[[-1, 1, Focus, [64, 3]], # 0-P1/2
[-1, 1, Conv, [128, 3, 2]], # 1-P2/4
[-1, 3, C3, [128]],
[-1, 1, Conv, [256, 3, 2]], # 3-P3/8
[-1, 9, C3, [256]],
[-1, 1, Conv, [512, 3, 2]], # 5-P4/16
[-1, 9, C3, [512]],
[-1, 1, Conv, [1024, 3, 2]], # 7-P5/32
[-1, 1, SPP, [1024, [5, 9, 13]]],
[-1, 3, C3, [1024, False]], # 9
]

YOLOv5 head

head:
[[-1, 1, Conv, [512, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1,6], 1, Concat_bifpn, [256,256]], # cat backbone P4
[-1, 3, C3, [512, False]], # 13

[-1, 1, Conv, [256, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 4], 1, Concat_bifpn, [128,128]], # cat backbone P3
[-1, 3, C3, [256, False]], # 17 (P3/8-small)

[-1, 1, Conv, [512, 3, 2]], # 320, 640 #
[[-1, 6, 13], 1, Concat_bifpn, [256,256]], # cat head P4
[-1, 3, C3, [512, False]], # 20 (P4/16-medium)

[-1, 1, Conv, [1024, 3, 2]], # 640, 1280 #
[[-1, 9], 1, Concat_bifpn, [512, 512]], # cat head P5 cat 20,20 #22
[-1, 3, C3, [1024, False]], # 25 (P5/32-large) # 1280, 1280 #23

[[17, 20, 23], 1, Detect, [nc, anchors]] # Detect(P3, P4, P5)
]

from yolov5prune.

zxsitu avatar zxsitu commented on August 23, 2024

Hello @Hazel-Xiang , how did you finish the pruning? What is the code modification idea?

from yolov5prune.

hahaqiu123 avatar hahaqiu123 commented on August 23, 2024

你好,请问你有解决方法了吗?我现在也困在这里

from yolov5prune.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.