Skip to content

This project mainly aims at pruning YOLOv5 to see how its accuracy gets affected in parallel with different pruning percentages from 10% to 40%.

Notifications You must be signed in to change notification settings

moon-2000/Face_Detection_YOLOv5

 
 

Repository files navigation

Face_Detection_YOLOv5

This project mainly aims at pruning YOLOv5 to see how its accuracy gets affected in parallel with different pruning percentages from 10% to 40%.

Pruning is the process of “Modification of weights by reducing the weights parameters, that does not impact on classification of classes”

Yolov5 is using technique of pruning in a way that “randomly in some percentage of weights parameters, nn.conv2d layers whose weights are nearly zero, pruning converts them to zeros”.

YOLOV5 Pruning Procedure

  • Clone YOLOv5 model
  • Train the model on your custom dataset
  • Validate the model on a test subset using val.py file
  • Copy best.py file and store it in another folder, as pruning will overwrite this file
  • Edit the val.py file adding the pecentage of pruning you want before configure part as here
  •    from utils.torch_utils import prune
       prune(model,0.3)   # 0.3 is pruning 30% of the weights 
    
  • Validate the model again with val.py and compare the rersults

About

This project mainly aims at pruning YOLOv5 to see how its accuracy gets affected in parallel with different pruning percentages from 10% to 40%.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%