Our new model ZOO works with DepthAI V3. Find out more in our documentation.
0 Likes
Model Details
Model Description
Luxonis Barcode Detection is a keypoint detection model trained to detect three classes of barcodes:
Bar Code
Data Matrix
QR Code
In addition to detecting the bounding box of each barcode, the model predicts the keypoints of its corners in a specific, clockwise order: top-left, top-right, bottom-right, and bottom-left. This detailed keypoint information can be useful for precise alignment or decoding tasks where the exact positioning of the barcode corners is critical.
Developed by: Luxonis
Shared by:
Model type: Computer vision / Keypoint detection
License:
Resources for more information:
Training Details
Training Data
The model was trained on a custom dataset of 16k images, containing bar codes, data matrix, and QR codes in various conditions.
Training parameters:
Resolution: 768×576 (training resolution)
Epochs: 600
Model variant: Medium
Testing Details
Metrics
On a test set of 200 images, the keypoint mAP was 0.79.
This metric is highly sensitive to the sigma values used (here, 0.04 for each keypoint), which also influences training performance.
Technical Specifications
Input/Output Details
Input:
Name: image
Info: NCHW BGR image scaled to 0–255.
Output:
Name: output1_yolov6
Name: output2_yolov6
Name: output3_yolov6
Name: kpt_output1
Name: kpt_output2
Name: kpt_output3
These outputs include both YOLO-like feature maps for bounding box detection and additional keypoint outputs for corner localization.
Model Architecture
This model has an efficient backbone and neck, along with a detection head and a keypoints head.
The keypoints are predicted in a fixed order (top-left, top-right, bottom-right, bottom-left), facilitating downstream tasks that rely on corner geometry.
For more information about the underlying architecture and training methodology, please refer to .
* Benchmarked with , using 2 threads (and the DSP runtime in balanced mode for RVC4).
* Parameters and FLOPs are obtained from the package.
Utilization
Models converted for RVC Platforms can be used for inference on OAK devices.
DepthAI pipelines are used to define the information flow linking the device, inference model, and the output parser (as defined in the model head(s)).
Below, we present the most crucial utilization steps for this particular model.
Please consult the for more information.
YOLOExtendedParser that outputs message (bounding boxes and corner keypoints of detected barcodes).
Get parsed output(s):
while pipeline.isRuning(): parser_output: dai.ImgFrame = parser_output_queue.get()
Example
You can quickly run the model using the script. It automatically downloads the model, creates a DepthAI pipeline, runs inference, and visualizes the results with the DepthAI visualizer tool.