Coder Social home page Coder Social logo

pcbdetect-yolov5's Introduction

PCBDetect - YOLOv5

Python YOLO

資料集介紹DeepPCB
YOLOv5 介紹YOLOv5 🚀 in PyTorch

📝Quick Start

Install

Clone repo and install requirements.txt in a Python>=3.7.0 environment, including PyTorch>=1.7.

cd YOLOv5
pip install -r requirements.txt  # install

1. 將欲檢測之照片放入指定資料夾

將欲檢測之照片放入 YOLOv5\data\images 資料夾中

大小為 640 x 640


2. 執行 detect.py

Open your terminal/command prompt from your project directory and run the detect.py file by executing the command python detect.py.

cd YOLOv5
python detect.py

A Few Seconds Later Done!

預設路徑放於 YOLOv5\runs\detect \exp 開頭之資料夾下
(如欲更改資料夾名稱可於 detect.py 下之第 72 行進行修改)



訓練及驗證結果

train log:Wandb.ai

  • Results results

  • PR_curve PR_curve


Validation

  • val_batch0_pred val_batch0_pred

  • val_batch2_labels val_batch2_labels

路徑 YOLOv5\runs\train\PCBDetect 下可看到其他結果


Model Use

  • Here I select YOLOv5s, the smallest and fastest model available. See YOLOv5 README table for a full comparison of all models.


資料前處理

  • 其實資料前處理無疑是最麻煩的一部分
  • DeepPCB 原始資料集只給了測試照片與 Defect 位置座標
  • 這邊我大概說明一下我進行的前處理步驟
  1. 按照 VOC 格式創建資料集文件夾
  2. 資料集格式轉換 - 轉換出 xml 檔
  3. 訓練集資料劃分 - (train,val,test 按照 8:1:1 比例隨機劃分)
  4. 生成 YOLO 格式的 Label - 依照 xml 檔,轉換出適用 YOLO 格式的 label.txt 檔
  5. 修改配置文件、路徑與參數
  6. 修改 train.py 等參數,開始訓練與測試。


Contact

聲明:如欲進行所有商業合作用途,請事先告知。
如果有漏洞與功能或其他問題,歡迎與我聯繫。
by FreeAaron


pcbdetect-yolov5's People

Contributors

freeaaron avatar

Stargazers

 avatar Kevin avatar sonix_xie avatar xyx avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.