1- # DefectNet [ ![ Python 3.8+] ( https://img.shields.io/badge/python-3.8+-blue.svg )] ( https://www.python.org/downloads/ ) [ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( https://opensource.org/licenses/MIT ) [ ![ CI/CD] ( https://github.com/stuartasiimwe7/DefectNet/actions/workflows/ci-cd.yml/badge.svg )] ( https://github.com/stuartasiimwe7/DefectNet/actions/workflows/ci-cd.yml )
1+ # DefectNet [ ![ Python 3.8+] ( https://img.shields.io/badge/python-3.8+-blue.svg )] ( https://www.python.org/downloads/ ) [ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( https://opensource.org/licenses/MIT ) [ ![ Tests ] ( https://github.com/stuartasiimwe7/DefectNet/actions/workflows/tests.yml/badge.svg )] ( https://github.com/stuartasiimwe7/DefectNet/actions/workflows/tests.yml ) [ ![ CI/CD] ( https://github.com/stuartasiimwe7/DefectNet/actions/workflows/ci-cd.yml/badge.svg )] ( https://github.com/stuartasiimwe7/DefectNet/actions/workflows/ci-cd.yml )
22
33A RestFul API for automated detecting of defects in Printed Circuit Boards (PCBs) using YOLOv5 deep learning models, built with FastAPI.
44
@@ -40,25 +40,25 @@ DefectNet provides a robust, scalable REST API service that uses computer vision
4040
4141```
4242DefectNet/
43- ├── app.py # Main FastAPI application
44- ├── config.py # Configuration management
45- ├── requirements.txt # Python dependencies
46- ├── Dockerfile # Docker configuration
43+ ├── app.py
44+ ├── config.py
45+ ├── requirements.txt
46+ ├── Dockerfile
4747├── src/
4848│ ├── models/
49- │ │ └── yolo_model.py # YOLOv5 model wrapper
49+ │ │ └── yolo_model.py
5050│ ├── utils/
51- │ │ ├── image_processor.py # Image preprocessing
52- │ │ └── response_formatter.py # Response formatting
51+ │ │ ├── image_processor.py
52+ │ │ └── response_formatter.py
5353│ └── services/
54- │ └── defect_detection_service.py # Business logic
54+ │ └── defect_detection_service.py
5555├── tests/
56- │ ├── test_api.py # API endpoint tests
57- │ ├── test_config.py # Configuration tests
58- │ ├── test_image_processor.py # Image processing tests
59- │ ├── test_response_formatter.py # Response formatting tests
60- │ └── test_integration.py # Integration tests
61- └── data/ # Dataset directory
56+ │ ├── test_api.py
57+ │ ├── test_config.py
58+ │ ├── test_image_processor.py
59+ │ ├── test_response_formatter.py
60+ │ └── test_integration.py
61+ └── data/
6262```
6363
6464## Performance Metrics
@@ -101,7 +101,7 @@ There is comprehensive test coverage across all components with 32 passing tests
101101
102102### Want to replicate?
103103
104- ``` bash
104+ ```bash
105105# Clone and navigate
106106git clone https://github.com/stuartasiimwe7/DefectNet
107107cd DefectNet
@@ -111,25 +111,25 @@ python -m venv .venv
111111source .venv/bin/activate # Windows: .venv\Scripts\activate
112112
113113# Install dependencies
114- pip install -r requirements.txt
114+ pip install -r requirements.txt
115115
116116# Verify with tests
117117python -m pytest tests/ -v
118118
119119# Start server
120120uvicorn app: app --reload --host 0.0.0.0 --port 8000
121- ```
121+ ```
122122
123123### Docker Setup
124124
125125** Option 1: Pull from GitHub Container Registry**
126- ``` bash
126+ ```bash
127127docker pull ghcr.io/stuartasiimwe7/defectnet: latest
128128docker run -p 8000:8000 ghcr.io/stuartasiimwe7/defectnet: latest
129- ```
129+ ```
130130
131131** Option 2: Build locally**
132- ``` bash
132+ ```bash
133133docker build -t defectnet .
134134docker run -p 8000:8000 defectnet
135135```
0 commit comments