This project is based on the improved and optimized model of YOLOv5s, and its task is to detect defects on the surface of photovoltaic panels. In this study, the YOLOv5 model was improved to achieve 97.8% performance on PV Multi-Defect dataset.
Pytorch == 1.8.1
python == 3.8
Cuda == 11.1
pip install -r requirements.txt
python detect.py --source ./data/images/ --weights weights/yolov5s.pt
Download PV Multi-Defect images (train, val) and labels. Link: https://github.com/houhou34/PV-Multi-Defect-Datasets.
Download weights. Link: https://pan.baidu.com/s/1ApCScpr1CZ_AeVJH7crgCw Extraction code: lmn8
python train.py
The optimal weight obtained from the training was used for the test.
python detect.py --source ./testfiles/img1.jpg --weights runs/train/exp/weights/best.pt
https://github.com/ultralytics/yolov5
https://github.com/robintzeng/Pytorch-CSPNet