Due to the COVID-19 rampage which has now become our daily lives, the usage of these medical gloves has increased in production. It is important to make sure that the gloves are sterile and are not riddled with an defects, and when there is one then it should be taken care of immediately. This project was inspired with that in mind, and the problem was simplified to make this system to work.
The final program works with both OpenCV and AI, where the defect gets measured in mm, the hand oreintation is mentioned and the probability of whether the hole is small, medium or large is displayed. They are displayed and detected live on webcam.
- contour_measurement.py : detecting the hand oreintation + measuring the contours using OPENCV
- detect.py : using custom trained YOLOv5 weights, the probabilities of the sizes are detected. multiple holes can be detected.
- combined.py : both 1 and 2 python files are combined to produce both results at the same time.
- train_model.ipynb : training the custom dataset to create a custom yolov5 weight for detection purposes.
- custom dataset used
- same colored gloves
- drawn on marker holes on white gloves
- male subject for photography
- annotated in Roboflow
Download the dataset and then make sure you upload the dataset inside the yolov5 folder.
opencv_mes.py detects both the hand orientation and measures the contours.
detect.py detects the sizes and its probabilites. for now, it only detects in three sizes.