ZJU-lishuang / yolov5_prune

yolov5 prune,Support V2, V3, V4 and V6 versions of yolov5
Apache License 2.0
556 stars 136 forks source link

就算剪枝率设为0,精度P下降到几乎为0 #68

Open githubccjj opened 2 years ago

githubccjj commented 2 years ago

用yolov5-v6稀疏后的精度 Class Images Labels P R mAP@.5 mAP@ all 253 2156 0.985 0.976 0.992 0.901 使用shortcut_prune_yolo5s稀疏后的精度(剪枝率=0) let's test the original model first: Class Images Targets P R mAP F1: 100%|██████████| 65/65 [00:05<00:00, 12.19it/s] all 260 2.31e+03 0.0631 0.988 0.952 0.113

+----------------+--------------+-------------+ | Metric | Before | After | +----------------+--------------+--------------+ | mAP | 0.951919 | 0.951919 | | Parameters | 46154449 | 46154449 | | Inference | 0.0151 | 0.0146 | +----------------+--------------+---------------+

并伴随有如下报错: FileNotFoundError: [Errno 2] No such file or directory: '/prune_0.0_home/prune_0.0_magus/prune_0.0_Documents/prune_0.0_yolov5_prune/prune_0.0_cfg/prune_0.0_yolov5l_v6_hand.cfg'

请问是什么原因,如何解决呢?

ZJU-lishuang commented 2 years ago

https://github.com/ZJU-lishuang/yolov5_prune/blob/v6/shortcut_prune_yolov5s.py#L67 这里注释看一下。 报错是没有发现文件,是不是没权限创建文件