Conversation
|
👋 Hello @Burhan-Q, thank you for submitting a PR to the To ensure a smooth integration of your work, please review the following checklist:
For more details, please refer to our Contributing Guide. Feel free to comment if you have any questions. Thank you for enhancing Ultralytics with your contributions! 🎉 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16256 +/- ##
==========================================
+ Coverage 69.84% 69.87% +0.02%
==========================================
Files 129 129
Lines 17095 17112 +17
==========================================
+ Hits 11940 11957 +17
Misses 5155 5155
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
👋 Hello there! We wanted to let you know that we've decided to close this pull request due to inactivity. We appreciate the effort you put into contributing to our project, but unfortunately, not all contributions are suitable or aligned with our product roadmap. We hope you understand our decision, and please don't let it discourage you from contributing to open source projects in the future. We value all of our community members and their contributions, and we encourage you to keep exploring new projects and ways to get involved. For additional resources and information, please see the links below:
Thank you for your contributions to YOLO 🚀 and Vision AI ⭐ |
Summary
This was something I experimented with a while ago but had poor results due to global pruning methods. Thanks to @lordofkillz for sharing his experiments, pruning now has only a minor accuracy drop with a minor gain in inference speed.
Note
Saved model weights appear to have a slightly larger file size than original weights. Unclear why this occurs.
Example
Performance
Testing on COCO128 using YOLOv8m shows a dip in performance when pruning at a target of$0.3$ from the original weights, only showing summary (
all) and first five class results for brevity.Normal model validation
Pruned model validation
Repeated inference evaluation results
Test inference on directory of images repeatedly and average overall inference runtime.
@30%Repeated evaluation code
Environment info
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
New functions for model pruning and zero-count testing were added to improve efficiency and analysis.
📊 Key Changes
zero_countfunction to count zero-valued parameters in PyTorch models.prune_modelfunction for L1 unstructured pruning of convolutional layers.substr_in_setfunction to check substring presence in a set.🎯 Purpose & Impact
zero_counthelps in assessing model sparsity, which is useful for optimization. 📊