Luxonis
    Our new model ZOO works with DepthAI V3. Find out more in our documentation.
    0 Likes
    Model Details
    Model Description
    Mobile LSD (M-LSD) model is a real-time and lightweight line segment detector for resource-constrained environments. Detected line segments are crucial visual features in low-level vision, which provide fundamental information to higher-level vision tasks such as pose estimation, structure from motion, 3D reconstruction, image matching, wireframe to image translation, and image rectification.
    • Developed by: NAVER/LINE Vision
    • Shared by:
    • Model type: Computer vision
    • License:
    • Resources for more information:
    Training Details
    Training Data
    was used for training. It consists of 5,000 training and 462 test images of man-made environments. For more information about training data check the .
    Testing Details
    Metrics
    For evaluation and were used. YorkUrban dataset has 102 test images. Evaluated metrics include heatmap-based metric F^H , structural average precision (sAP), and line matching average precision (LAP).
    Wireframe evaluation
    ModelF^HsAP^5LAP
    M-LSD80.0056.4061.50
    YorkUrban evaluation
    ModelF^HsAP^5LAP
    M-LSD64.2024.6030.70
    Results are taken from .
    Technical Specifications
    Input/Output Details
    • Input:
      • Name: input
        • Info: 0-255 BGR un-normalized image.
    • Output:
      • Name: multiple (see NN archive)
        • Info: intermediate outputs that will be processed by MLSD parser.
    Model Architecture
    The M-LSD and M-LSD-tiny models are lightweight encoder-decoder architectures. They use MobileNetV2-based encoder networks. The decoder network combines blocks of types A, B, and C, with block type A for feature map concatenation and upscaling, block type B for residual 3x3 convolutions, and block type C for dilated and 1x1 convolutions. Please consult the for more information on model architecture.
    Throughput
    Model variant: m-lsd:512x512
    • Input shape: [1, 3, 512, 512] • Output shapes: [[1, 9, 256, 256], [65536]]
    • Params (M): 1.523 • GFLOPs: 25.664
    PlatformPrecisionThroughput (infs/sec)Power Consumption (W)
    RVC2FP163.30N/A
    RVC4INT8251.204.15
    * Benchmarked with , using 2 threads (and the DSP runtime in balanced mode for RVC4).
    * Parameters and FLOPs are obtained from the package.
    Quantization
    RVC4 version of the model was quantized using a custom dataset. This was created by taking a 100-image subset of and datasets.
    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 model head(s)). Below, we present the most crucial utilization steps for the particular model. Please consult the docs for more information.
    Install DAIv3 and depthai-nodes libraries:
    pip install depthai
    pip install depthai-nodes
    
    Define model:
    model_description = dai.NNModelDescription(
        "luxonis/m-lsd:512x512"
    )
    
    nn = pipeline.create(ParsingNeuralNetwork).build(
        <CameraNode>, model_description
    )
    
    Inspect model head(s):
    • MLSDParser that outputs message (detected lines).
    Get parsed output(s):
    while pipeline.isRuning():
        parser_output: Lines = parser_output_queue.get()
    
    Example
    You can quickly run the model using our script. It automatically downloads the model, creates a DepthAI pipeline, runs the inference, and displays the results using our DepthAI visualizer tool. To try it out, run:
    python3 main.py \
        --model luxonis/m-lsd:512x512
    
    M-LSD
    Line detection model.
    License
    Apache 2.0
    Commercial use
    Downloads
    130
    Tasks
    Line Detection
    Model Types
    ONNX
    Model Variants
    NameVersionAvailable ForCreated AtDeploy
    RVC2, RVC410 months ago
    Luxonis - Robotic vision made simple.
    XYouTubeLinkedInGitHub