Luxonis
    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:
    1. Bar Code
    2. Data Matrix
    3. 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 .
    Throughput
    Model variant: barcode-detection:768x576
    • Input shape: [1, 3, 576, 768] • Output shapes: [[1, 8, 72, 96], [1, 8, 36, 48], [1, 8, 18, 24], [1, 12, 6912], [1, 12, 1728], [1, 12, 432]]
    • Params (M): 17.276 • GFLOPs: 24.074
    PlatformPrecisionThroughput (infs/sec)Power Consumption (W)
    RVC2FP164.44N/A
    RVC4FP32142.996.02
    Model variant: barcode-detection:512x384
    • Input shape: [1, 3, 384, 512] • Output shapes: [[1, 8, 48, 64], [1, 8, 24, 32], [1, 8, 12, 16], [1, 12, 3072], [1, 12, 768], [1, 12, 192]]
    • Params (M): 17.266 • GFLOPs: 10.700
    PlatformPrecisionThroughput (infs/sec)Power Consumption (W)
    RVC2FP1617.39N/A
    RVC4INT8732.293.32
    * 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.
    Install DAIv3 and depthai-nodes libraries:
    pip install depthai
    pip install depthai-nodes
    
    Define model:
    model_description = dai.NNModelDescription(
        "luxonis/barcode-detection:512x384"
    )
    
    nn = pipeline.create(ParsingNeuralNetwork).build(
        <CameraNode>, model_description
    )
    
    Inspect model head(s):
    • 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.
    python3 main.py \
        --model luxonis/barcode-detection:512x384
    
    Barcode detection
    Bounding box and keypoint detection model for QRs, barcodes and datamatricies
    License
    Apache 2.0
    Commercial use
    Downloads
    487
    Tasks
    Object Detection
    Model Types
    ONNX
    Model Variants
    NameVersionAvailable ForCreated AtDeploy
    RVC2, RVC42 months ago
    RVC2, RVC42 months ago
    Luxonis - Robotic vision made simple.
    XYouTubeLinkedInGitHub