VainF / Torch-Pruning

[CVPR 2023] DepGraph: Towards Any Structural Pruning
https://arxiv.org/abs/2301.12900
MIT License
2.75k stars 337 forks source link

Yolov10 Pruning #386

Open Pbatch opened 5 months ago

Pbatch commented 5 months ago

Hello.

I have made good use of the pruning scripts for YOLOv8, and was wondering if there will be a new examples script for YOLOv10?

I am happy to collaborate (i.e. on Slack / this Issue) with anyone who wants to achieve this.

Thanks :)

Ramzes30765 commented 4 months ago

@Pbatch Hello! Can you please share your YOLOv8 pruning full script?

VainF commented 4 months ago

Hi All, I'm not a YOLO expert. So, it would be great if you have some ideas about YOLO-10 pruning.

Ramzes30765 commented 4 months ago

Hi All, I'm not a YOLO expert. So, it would be great if you have some ideas about YOLO-10 pruning.

Is it possible to update yolo8_pruning.py example?

happyiminjay1 commented 1 month ago

There are two ways

  1. Ignore the Attention Layer

      '''
      if isinstance(m, (Detect, Attention)):
                      ignored_layers.append(m)
      '''
  2. Modify Attention Layer

        -> Remove all split Operation as it is in the yolo8_pruning.py
        -> Remove Group Convolution (which are used for depth wise Convolution)