mit-han-lab / tinyengine

[NeurIPS 2020] MCUNet: Tiny Deep Learning on IoT Devices; [NeurIPS 2021] MCUNetV2: Memory-Efficient Patch-based Inference for Tiny Deep Learning; [NeurIPS 2022] MCUNetV3: On-Device Training Under 256KB Memory
https://mcunet.mit.edu
MIT License
809 stars 132 forks source link

No module named "cexample" #66

Closed senceryucel closed 1 year ago

senceryucel commented 1 year ago

Hello, @meenchen

We were trying to integrate this beautiful engine into our H7 Plus Board. We changed the TARGET = OPENMV4 to OPENMV4P as needed. Everything seemed to be working fine, until we tried to run the example person detection script.


import cexample
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.HD)  # Set frame size to QVGA 160x128

while True:
    img = sensor.snapshot()  # Take a picture and return the image.
    ret = cexample.person_detection(img, 0.15)

Since we have no LCD screen, we just modified the code a little to test it via frame buffer. However, when we run, it says that there is no module named "cexample".

We looked a bit in the repo for it, but could not find anything that would help us. Any help will be appreciated. Thanks a lot in advance!

meenchen commented 1 year ago

Hi @senceryucel, the cexample module is from the openmv repo: https://github.com/openmv/openmv/blob/master/src/omv/modules/examplemodule.c.

After you pull the code from the openmv repo, did you checkout the specified commit (918ccb937730cc759ee5709df089d9de516dc7bf)? Since the openmv repo is actively developed, the availability of features might change overtime.