{"id":29637498,"url":"https://github.com/garvit-32/defect-detection","last_synced_at":"2026-05-18T11:04:39.235Z","repository":{"id":42150043,"uuid":"396796093","full_name":"Garvit-32/defect-detection","owner":"Garvit-32","description":null,"archived":false,"fork":false,"pushed_at":"2022-04-12T06:01:44.000Z","size":42662,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-03-05T14:03:35.908Z","etag":null,"topics":["augmentations","deep-learning","hacktoberfest","matplotlib","onnx","opencv-python","pytorch","tensorrt","wandb","yolov5"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Garvit-32.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-16T12:59:31.000Z","updated_at":"2022-07-18T17:26:37.000Z","dependencies_parsed_at":"2022-08-12T08:10:10.905Z","dependency_job_id":null,"html_url":"https://github.com/Garvit-32/defect-detection","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/Garvit-32/defect-detection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Garvit-32%2Fdefect-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Garvit-32%2Fdefect-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Garvit-32%2Fdefect-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Garvit-32%2Fdefect-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Garvit-32","download_url":"https://codeload.github.com/Garvit-32/defect-detection/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Garvit-32%2Fdefect-detection/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266353495,"owners_count":23915996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["augmentations","deep-learning","hacktoberfest","matplotlib","onnx","opencv-python","pytorch","tensorrt","wandb","yolov5"],"created_at":"2025-07-21T18:38:08.371Z","updated_at":"2026-05-18T11:04:34.204Z","avatar_url":"https://github.com/Garvit-32.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Team Name: No Free Lunch\n\n## Steps to run\n\n1. Training\n\n```\nCommand: python train.py --img \u003csize of the image\u003e --batch \u003cbatch size\u003e --epoch \u003cnumber of epoch\u003e --data \u003cpath tp data.yaml\u003e -- weights \u003cname of the pretrained model\u003e --adam --single-cls\nExample: python train.py --img 1024 --batch 16 --epoch 80 --data data/defect.yaml -- weights yolov5m.pt --adam --single-cls\n```\n\n2. Validation\n\n```\nCommand: python val.py --img \u003csize of the image\u003e --batch \u003cbatch size\u003e --data \u003cpath tp data.yaml\u003e -- weights \u003cname of the pretrained model\u003e --conf-thres \u003cconfidence threshold\u003e --iou-thres \u003cIoU-NMS threshold\u003e\nExample: python val.py --img 1024 --batch 16 --data data/defect.yaml -- weights yolov5m.pt --conf-thres 0.1 --iou-thres 0.5\n```\n\n3. Detection and Testing\n\n```\nCommand: python detect.py --weights \u003cpath of the weights\u003e --source \u003cpath of the test dataset\u003e --imgsz \u003csize of the image\u003e --conf-thresh \u003cconfidence threshold\u003e --iou-thres \u003cIoU-NMS threshold\u003e --view-img --save-txt\nExample: python detect.py --weights best.pt --source test --imgsz 1024 --conf-thres 0.1 --iou-thres 0.5 --view-img --save-txt\n```\n\n4. Prepare CSV file\n\n```\nCommand: python prepare_csv.py --label_path \u003cpath of the labels generated by detect.py\u003e --test_path \u003cpath of the test dataset folder\u003e\nExample: python prepare_csv.py --label_path run/exp/detect --test_path test\n```\n\n## Points to be noted\n\n1. DefectBoxes image_id centroid_X centroid_Y width height\n2. DefectTypes defect_flag is 1 for defect and 0 for non defect\n3. Optimizer: Adam\n4. Loss: BinaryCrossEntropy\n5. Augmentation Random Scaling, Mosaic, Random Cropping, Vertical and Horizontal Flip, Brightness and Saturation\n\n## Input\n\nGroundtruth\n\n\u003cimg  src=\"best_model_graph/val_batch0_labels.jpg\"  width=\"900\"  height=\"480\"\u003e\n\nPrediction\n\n\u003cimg  src=  \"best_model_graph/val_batch0_pred.jpg\"  width=\"900\"  height=\"480\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarvit-32%2Fdefect-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarvit-32%2Fdefect-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarvit-32%2Fdefect-detection/lists"}