pcbdefectdetection

LeWagon Bootcamp Project

https://github.com/matefede1/pcbdefectdetection

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.4%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

LeWagon Bootcamp Project

Basic Info
  • Host: GitHub
  • Owner: Matefede1
  • License: agpl-3.0
  • Language: Python
  • Default Branch: master
  • Size: 2.28 MB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 2 years ago · Last pushed over 2 years ago
Metadata Files
Readme Contributing License Citation

README.md

Links

  • Access the notebooks https://drive.google.com/drive/folders/14FmaoQ2mHIwcwJXi3L6quuWgx01i9Cn?usp=drivelink

Service

Service to detect PCB failure to improve manufacture process and classify the type of manufacturing defects

The service, accessible through API and web site, intended to help sort defective cards by detecting from their image the location and type of defect observed.

It takes as an input an image to analyzed (jpeg, gif or png) And send back an image with the detectection, the analysis and the data as a JSON file.

The program is trained to detect 6 faults: missing hole, mouse bite, open circuit, short, spur, and spurious copper

Details

  • Package: Matefede1/PCBDefectDetection

  • Description: Customize a Object Detection Neural Network into a Defect Detection model to improve manufacture process at different critical stages

  • From model yolov5 : https://github.com/ultralytics/yolov5

    • YOLOv5 🚀 is the world's most loved vision
    • trained with 80 classes and coco datasets (188k images for training, 5k images for validation
    • retrained for PCB failure detecture with 6 labels and PCB-defects dataset (xx images for traing, xx images for validation) :
      • https://www.kaggle.com/datasets/akhatova/pcb-defects/code
      • This is a public synthetic PCB dataset containing 1386 images, released by the Open Lab on Human Robot Interaction of Peking University
      • PCB dataset was created using public link from https://github.com/Ixiaohuihuihui/Tiny-Defect-Detection-for-PCB
  • Classifaction 0: Missinghole 1: Mousebite 2: Opencircuit 3: Short 4: Spur 5: Spuriouscopper

Results

Texte alternatif

Package

The package contains 4 directories

1) dataset - the dataset used to train the model 2) fastapi - the API web service directpry
3) prueba
streamlit - the web site directory : 4) yolov5 - the model used for prediction directory

Data

First, download the dataset from https://drive.google.com/drive/folders/1o7nf0rZ1JBzTNvth6Vs2yKlmt4yN10QQ Unzip it and rename it datasets

It contains: - datasets/images/train - datasets/images/val - datasets/labels/train - datasets/labes/val

Startup the project

The initial setup.

Create a python3 virtualenv and activate it:

bash sudo apt-get install virtualenv python-pip python-dev deactivate; virtualenv ~/venv ; source ~/venv/bin/activate ;\

Install

Install the project:

Go to https://github.com/Matefede1/PCBDefectDetection/

Clone the project and install it:

bash git clone git@github.com:Matefede1/PCBDefectDetection.git #clone cd PCBDefectDetection pip install -r requirements.txt #install

Use the service

Launch the service locally

```bash cd fast_api uvicorn api:app --reload #launch the API server en localhost

cd ../prueba_streamlit streamlit run app.py #launch the local server ```

Inference

```

python detect.py --weights runs/train/exp/weights/best.pt --source ../datasets/yourpathtotheimages.jpeg

```

Add modification

bash cd PCBDefectDetection git add . git commit -m "adding work" git push origin master

Owner

  • Login: Matefede1
  • Kind: user

GitHub Events

Total
Last Year

Dependencies

Dockerfile docker
yolov5/utils/docker/Dockerfile docker
  • pytorch/pytorch 2.0.0-cuda11.7-cudnn8-runtime build
yolov5/utils/google_app_engine/Dockerfile docker
  • gcr.io/google-appengine/python latest build
requirements.txt pypi
  • Pillow >=10.0.1
  • PyYAML >=5.3.1
  • gitpython >=3.1.30
  • matplotlib >=3.3
  • numpy >=1.22.2
  • opencv-python >=4.1.1
  • pandas >=1.1.4
  • psutil *
  • requests >=2.23.0
  • scipy >=1.4.1
  • seaborn >=0.11.0
  • setuptools >=65.5.1
  • thop >=0.1.1
  • torchvision >=0.9.0
  • tqdm >=4.64.0
  • ultralytics >=8.0.232
yolov5/pyproject.toml pypi
  • matplotlib >=3.3.0
  • numpy >=1.22.2
  • opencv-python >=4.6.0
  • pandas >=1.1.4
  • pillow >=7.1.2
  • psutil *
  • py-cpuinfo *
  • pyyaml >=5.3.1
  • requests >=2.23.0
  • scipy >=1.4.1
  • seaborn >=0.11.0
  • thop >=0.1.1
  • torch >=1.8.0
  • torchvision >=0.9.0
  • tqdm >=4.64.0
  • ultralytics >=8.0.232
yolov5/utils/google_app_engine/additional_requirements.txt pypi
  • Flask ==2.3.2
  • gunicorn ==19.10.0
  • pip ==23.3
  • werkzeug >=3.0.1