https://github.com/garvit-32/defect-detection
https://github.com/garvit-32/defect-detection
augmentations deep-learning hacktoberfest matplotlib onnx opencv-python pytorch tensorrt wandb yolov5
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/garvit-32/defect-detection
- Owner: Garvit-32
- License: gpl-3.0
- Created: 2021-08-16T12:59:31.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-12T06:01:44.000Z (over 3 years ago)
- Last Synced: 2023-03-05T14:03:35.908Z (over 2 years ago)
- Topics: augmentations, deep-learning, hacktoberfest, matplotlib, onnx, opencv-python, pytorch, tensorrt, wandb, yolov5
- Language: Python
- Homepage:
- Size: 40.7 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
## Team Name: No Free Lunch
## Steps to run
1. Training
```
Command: python train.py --img --batch --epoch --data -- weights --adam --single-cls
Example: python train.py --img 1024 --batch 16 --epoch 80 --data data/defect.yaml -- weights yolov5m.pt --adam --single-cls
```2. Validation
```
Command: python val.py --img --batch --data -- weights --conf-thres --iou-thres
Example: python val.py --img 1024 --batch 16 --data data/defect.yaml -- weights yolov5m.pt --conf-thres 0.1 --iou-thres 0.5
```3. Detection and Testing
```
Command: python detect.py --weights --source --imgsz --conf-thresh --iou-thres --view-img --save-txt
Example: python detect.py --weights best.pt --source test --imgsz 1024 --conf-thres 0.1 --iou-thres 0.5 --view-img --save-txt
```4. Prepare CSV file
```
Command: python prepare_csv.py --label_path --test_path
Example: python prepare_csv.py --label_path run/exp/detect --test_path test
```## Points to be noted
1. DefectBoxes image_id centroid_X centroid_Y width height
2. DefectTypes defect_flag is 1 for defect and 0 for non defect
3. Optimizer: Adam
4. Loss: BinaryCrossEntropy
5. Augmentation Random Scaling, Mosaic, Random Cropping, Vertical and Horizontal Flip, Brightness and Saturation## Input
Groundtruth
Prediction
![]()