mirror of
https://github.com/mit-han-lab/tinyengine.git
synced 2025-05-10 01:18:47 +08:00

* support person detection * python code for openmv IDE * support person detection * python code for openmv IDE * minor polish * readme * gif * minor
16 lines
534 B
Python
16 lines
534 B
Python
# This example shows how to invoke training or inference function calls of tinyengine.
|
|
import cexample
|
|
import lcd
|
|
import sensor
|
|
|
|
sensor.reset() # Reset and initialize the sensor.
|
|
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
|
|
sensor.set_framesize(sensor.LCD) # Set frame size to QVGA 160x128
|
|
lcd.init() # Initialize the lcd screen.
|
|
|
|
while True:
|
|
img = sensor.snapshot() # Take a picture and return the image.
|
|
|
|
ret = cexample.face_mask(img, 0.15)
|
|
lcd.display(img) # Display the image.
|