model.yolo_license_plateο
Description
π² License Plate Detection model.
- class Node(config=None, **kwargs)[source]ο
Initializes and uses YOLO model to infer bboxes from image frame.
This customized YOLO node is capable of detecting objects from a single class (License Plate). It uses YOLOv4 by default and can be changed to use YOLOv4-tiny if FPS is critical over accuracy.
- Inputs
img
(numpy.ndarray
): A NumPy array of shape \((height, width, channels)\) containing the image data in BGR format.- Outputs
bboxes
(numpy.ndarray
): A NumPy array of shape \((N, 4)\) containing normalized bounding box coordinates of \(N\) detected objects. Each bounding box is represented as \((x_1, y_1, x_2, y_2)\) where \((x_1, y_1)\) is the top-left corner and \((x_2, y_2)\) is the bottom-right corner. The order corresponds to bbox_labels and bbox_scores.bbox_labels
(numpy.ndarray
): A NumPy array of shape \((N)\) containing strings representing the labels of detected objects. The order corresponds to bboxes and bbox_scores.bbox_scores
(numpy.ndarray
): A NumPy array of shape \((N)\) containing confidence scores \([0, 1]\) of detected objects. The order corresponds to bboxes and bbox_labels.- Configs
model_type (
str
) β {βv4β, βv4tinyβ}, default=βv4β.
Defines the type of YOLO model to be used.weights_parent_dir (
Optional[str]
) β default = null.
Change the parent directory where weights will be stored by replacingnull
with an absolute path to the desired directory.iou_threshold (
float
) β [0, 1], default = 0.3.
Overlapping bounding boxes above the specified IoU (Intersection over Union) threshold are discarded.score_threshold (
float
) β [0, 1], default = 0.1.
Bounding box with confidence score less than the specified confidence score threshold is discarded.
References
YOLOv4: Optimal Speed and Accuracy of Object Detection: https://arxiv.org/pdf/2004.10934v1.pdf
Model weights trained using pretrained weights from Darknet: https://github.com/AlexeyAB/darknet
Changed in version 1.2.0:
yolo_iou_threshold
is renamed toiou_threshold
.
yolo_score_threshold
is renamed toscore_threshold
.