Seeed-Studio / sscma-example-esp32

Example of SenseCraft Model Assistant Model deployment related to ESP32
22 stars 12 forks source link

Please provide a way to see the results of the models deployed on the ESP32 #21

Open sbocconi opened 6 months ago

sbocconi commented 6 months ago

Hi,

I have successfully deployed a couple of models on my XIAO ESP32S Sense, but when I activate the idf.py monitor I just see lines like:

preprocess: 4, run: 51, postprocess: 0
preprocess: 4, run: 51, postprocess: 0
preprocess: 4, run: 51, postprocess: 0

Can you please describe what I should do to see the result of the detections, possibly visually? Do I need to set up a web server and stream the video? Thanks,

iChizer0 commented 6 months ago

Hi @sbocconi,

For the single model detection example, we deal with the detected bounding boxes in 2 way:

  1. print its coordinate and size to the USB serial
  2. plot and display the frame on the screen

From the inference times given in your logs, we guess you are probably using the FOMO detection algorithm, compared with YOLO, the algorithm may be more demanding on the scene (e.g. distance to detection target, ambient light brightness, etc.), you can try to decrease the score threshold to test if it works:

// call this method before entering the capture loop
algorithm->set_score_threshold(< some value which < 80, range (0, 100] >);

For Q2, you don't have to set up the web server.

In addition, we recommend you to try out SenseCraft-Web-Toolkit, which allows you to flash the firmware, deploy ML models, and preview inference results/frame in real time, all from a web page, they're fully open-source: