Luxonis
    Our new model ZOO works with DepthAI V3. Find out more in our documentation.
    0 Likes
    Model Details
    Model Description
    This model is based on YOLOv6 () and has been custom-trained to detect people in thermal images that are "cast" into 3-channel grayscale formats. It is specifically tailored for use with OAK Thermal devices (). This design ensures optimized performance for real-world applications in thermal imaging.
    • Developed by: Luxonis
    • Shared by: Luxonis
    • Model type: Computer Vision
    • License: Apache 2.0
    • Resources for more information:
    Training Details
    Training Data
    , the , and synthetic datasets were used to train the model. Annotations were filtered by size because smaller objects are barely visible at the camera’s resolution. The dataset consists of 1.5K FLIR images, 1.5K Roboflow images, and 10K synthetic thermal images.
    Testing Details
    Metrics
    The model was trained at a resolution of 384x512. On the testing set, which comprised 10% of the dataset, the model achieved a mean Average Precision (mAP) of 88%.
    Technical Specifications
    Input/Output Details
    • Input:
      • Name: image
        • Info: NCHW RGB format with images normalized to a range of 0-1.
    • Output:
      • Name: multiple (see NN archive)
        • Info: Unprocessed outputs of a multitude of detections
    Model Architecture
    • Backbone: EfficientRep backbone
    • Neck: Rep-PAN neck
    • Head: Efficient decoupled head that is anchor-free
    For more details, see the official .
    Throughput
    Model variant: thermal-person-detection:256x192
    • Input shape: [1, 3, 192, 256] • Output shapes: [[1, 6, 24, 32], [1, 6, 12, 16], [1, 6, 6, 8]]
    • Params (M): 4.299 • GFLOPs: 0.671
    PlatformPrecisionThroughput (infs/sec)Power Consumption (W)
    RVC2FP16189.47N/A
    RVC4FP32704.262.97
    * Benchmarked with , using 2 threads (and the DSP runtime in balanced mode for RVC4).
    * Parameters and FLOPs are obtained from the package.
    Utilization
    This model is targeted at usage with . Below, we present the most crucial utilization steps for this particular model.
    Install DAIv3 library:
    pip install depthai
    pip install depthai-nodes
    
    Define thermal node for the camera:
    cam = pipeline.create(dai.node.Thermal).build()
    
    The output of the camera is in YUV format whereas the model consumes BGR images so that is why we need to define a HostNode that performs this conversion.
    class YUV2BGR(dai.node.ThreadedHostNode):
        def __init__(self):
            super().__init__()
            self.input = self.createInput()
            self.out = self.createOutput()
    
        def run(self):
            while self.isRunning:
                frame = self.input.get().getCvFrame()
                new_frame = dai.ImgFrame()
                new_frame.setCvFrame(frame, dai.ImgFrame.Type.BGR888p)
                self.out.send(new_frame)
    
    yuv2bgr = pipeline.create(YUV2BGR)
    cam.color.link(yuv2bgr.input)
    
    And lastly we define the model:
    model_description = dai.NNModelDescription(
        "luxonis/thermal-person-detection:256x192"
    )
    
    nn = pipeline.create(dai.node.DetectionNetwork).build(
        yuv2bgr.out, model_description
    )
    
    The model is automatically parsed by DAI and it outputs the dai.ImgDetections message (bounding boxes, labels, and scores of the detected objects).
    Get model output(s):
    while pipeline.isRunning():
        nn_output: dai.ImgDetections = parser_output_queue.get()
    
    Example
    You can quickly run the model using our example.
    The example demonstrates how to build a 1-stage DepthAI pipeline consisting of an thermal person detection model. 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/thermal-person-detection:256x192
    
    Note: This example is designed specifically for RVC2 OAK Thermal.
    Thermal Person Detection
    Person thermal detection model
    License
    Apache 2.0
    Commercial use
    Downloads
    168
    Tasks
    Object Detection
    Model Types
    ONNX
    Model Variants
    NameVersionAvailable ForCreated AtDeploy
    RVC2, RVC45 months ago
    Luxonis - Robotic vision made simple.
    XYouTubeLinkedInGitHub