The goal of this project was to develop a computer vision model, named "Willy Vision," capable of efficiently detecting various models of chocolates based on shape, texture, and flavor. Deployed on the FG company's production line, this system can identify over 60 different types of chocolates from a catalog of 150, showcasing its ability to recognize a diverse array of chocolate products.
Computer vision is a field within artificial intelligence that enables computers to interpret and understand the visual world. By using digital images and videos, along with deep learning models, the technology mimics human vision to identify, classify, and react to elements within visual data. This capability is pivotal in automating tasks that require visual recognition.
- Each cell predicts multiple bounding boxes for objects along with their confidence scores. The confidence score reflects the accuracy of the bounding box and whether the box contains a specific object.
- YOLO divides an image into a grid (e.g., 13x13 cells). Each grid cell is responsible for detecting objects that fall within its boundaries.
- Simultaneously, each cell predicts the class probabilities for each bounding box. This step involves using softmax functions that calculate the probability of the object belonging to a specific class.
- To ensure the model does not have overlapping bounding boxes for the same object, YOLO uses a technique called non-max suppression. This step filters out bounding boxes based on the confidence score and Intersection over Union (IoU) metric, keeping only the highest scoring boxes.
- The bounding boxes and class predictions are combined to create the final output, which includes the positions, dimensions, and class labels of all detected objects.
- Go to the
ModelWeitgh
folder, and you wil have acces to detailed graph and pictures
To run the "Willy Vision" detection model on your local machine, follow these steps:
- Ensure Python and necessary libraries
(opencv-python-headless, ultralytics)
are installed. - Install dependencies: pip install
opencv-python-headless ultralytics
.
- Navigate to the project directory.
- Execute the script:
python3 predict_video.py
. - View the Output:
The script displays the video with detected chocolates and saves an output file.