Inference - mariodiasbatista/object-detection GitHub Wiki
π What is Inference in YOLO?
Inference in YOLO (You Only Look Once) is the process where a trained model is used to make predictions β it analyzes new images or video frames and identifies objects in real time.
Itβs what happens after training β the model has already learned, and now it applies that knowledge.
π§ How It Works
During inference, YOLO takes in an input (image or video frame) and:
- Divides the image into a grid.
- Predicts bounding boxes and confidence scores for each grid cell.
- Identifies the object class for each box.
- Applies non-max suppression (NMS) to remove overlapping boxes and retain the best predictions.
ποΈ What Does It Output?
YOLO returns:
- π© Bounding Boxes β coordinates of detected objects.
- π·οΈ Class Labels β e.g., βpersonβ, βcarβ, βdogβ.
- π Confidence Scores β how sure the model is about its predictions.
This data can be used to draw boxes on the image or for further processing (e.g., counting objects, triggering events, etc.).
βοΈ Inference Flow
INPUT (Image/Frame)
β
Preprocessing (resize, normalize)
β
Model Prediction (YOLO forward pass)
β
Postprocessing (NMS, thresholding)
β
OUTPUT (Detected objects with boxes, labels, and scores)