FLIR Thermal Camera Person Detection

Discussion related to "under the hood" OpenMV topics.
User avatar
Posts: 4105
Joined: Sun May 24, 2015 2:10 pm

FLIR Thermal Camera Person Detection

Postby kwagyeman » Fri May 17, 2019 2:18 am

Ibrahim made this example script showing off person detection using the FLIR Thermal camera. Works with any FLIR Lepton.

Code: Select all

import sensor, image, time, os, nn

sensor.reset()                         # Reset and initialize the sensor.
sensor.set_pixformat(sensor.GRAYSCALE)    # Set pixel format to RGB565
sensor.set_framesize(sensor.QQVGA)      # Set frame size to QVGA (320x240)
sensor.set_windowing((32, 64))       # Set 128x128 window.

net = nn.load('/')

clock = time.clock()                # Create a clock object to track the FPS.
    clock.tick()                    # Update the FPS clock.
    img = sensor.snapshot()         # Take a picture and return the image.
    out = net.forward(img, softmax=True)
    if out.index(max(out)) == 0:
        print("person detected")
Save the to your SD card.
(64.08 KiB) Downloaded 409 times

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 5 guests