This repository contains the practice for the subject Industrial Applications in Machine Vision belonging to the Master's Degree in Machine Vision taught at the Universidad Rey Juan Carlos.
The aim of this work is the classification and detection of defects on metal surfaces in a production line. To do so, we will make an implementation in Python with an object detector (YOLOv5) and we will connect it via C to the application that is already running in the factory.
The dataset provided by the company is composed of 200x200 grayscale images. For each category we have been provided with 300 images with their labels. The categories to be classified are the following:
- Inclusions
- Patches
- Scratches
The list of official project documentation delivered to the client is attached: (The documents are in spanish)
- ERS : -> Especificación de Requisitos Software (ERS)
- Design : -> Documento de diseño
- Functional System : -> Documento del Sistema funcional
- Docker
- Postman (http requests)
Using our docker image, we can install our entire repository and the dependencies we will need.
$ docker pull luisrosario04/aiva_2022_metal
Once the image is downloaded, we are going to launch the container (docker) with the following command:
$ docker run -p 8000:5000 luisrosario04/aiva_2022_metal
The server listens in localhost:8000
Documentation of http requests -> POSTMAN
When a push or pull is performed automatically:
- When tests are launched the results can be found in the github actions.
- The quality of the code is tested with flake8 and mypy.
There are 20 tests with a total, for a coverage of 96%.
.
├── dataset
│ ├── ANNOTATIONS
│ └── IMAGES
├── docs
│ ├── Diseño_grupoC.pdf
│ └── ERS_grupoC.pdf
├── docker
│ └── Dockerfile
├── exemples
│ ├── esquema.jpeg
│ ├── resultado.jpeg
│ ├── Screen1.png
│ └── tipos_defectos.png
├── pyproject.toml
├── README.md
├── requirements_dev.txt
├── requirements.txt
├── setup.cfg
├── setup.py
├── src
│ └── algorithm
│ └── main_algorithm.py
│ └── fast_rcnn
│ └── main_fast_rcnn.py
│ └── imperfection
│ └── main_imperfection.py
│ └── server
│ └── main_server.py
│ └── system_recognition
│ └── main_system_recognition.py
│ └── yolo_v5
│ └── main_yolo_v5.py
├── tests
│ └── test_algorithm.py
├── yolo_v5
│ ├── models
│ ├── utils
│ ├── weights
│ ├── detect.py
│ └── export.py
└── tox.ini