An open API service indexing awesome lists of open source software.

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

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