Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

devilhyt/pcb-defect-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PCB Defect Detection

This is our final project for the Computer Vision course at NCHU, Fall 2024. We use the YOLOv11s model to detect defects on printed circuit boards (PCBs). With an mAP50 of 0.995, the model achieves exceptional accuracy and demonstrates high inference speed.

App Screenshot

Dark Light
APP dark APP light

Files

main.ipynb: Code for training the PCB defect detection model and evaluating it on the test set.

app.py: Code for the Streamlit app, which allows users to upload an pcb image and view the defect detection results.

pcb_defect/: Directory containing the trained model and log files.

download_dataset.sh: Bash script for downloading the dataset.

requirements.txt: List of Python packages required to run the code.

ppt/final project.pdf: Presentation slides for this project.

Installation

The environment used in this project:

  • OS: Linux Mint 22
  • Python: 3.11.10

Step 1. Clone the repo.

git clone --depth 1 https://github.com/devilhyt/pcb-defect-detection.git

cd pcb-defect-detection

Step 2. Download the dataset.

bash download_dataset.sh

Step 3. Check the Python version.

python --version

Step 4. Install all dependencies.

pip install -r requirements.txt

Step 5. Open and view the main.ipynb file.

  • This notebook contains the code for training the PCB defect detection model and evaluating it on the test set.
  • If you plan to train the model, you can choose to enable or disable Weights & Biases logging.
    # Enable Weights & Biases logging
    wandb enabled
    
    # Disable Weights & Biases logging
    wandb disabled
  • If you choose to enable Weights & Biases logging, you need to log in to your account.
    wandb login

Step 6. Run the Streamlit server.

streamlit run app.py
  • The server is running on http://localhost:8501
  • Streamlit will just increment the port number to 8502, 8503, etc. if 8501 is in-use.

Acknowledgements

Contributors

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors