Person detection model is missing from the current release of openMV ide…
Thanks for posting. I’ll extract the model from the tensorflow library and post it here.
1 Like
Hi do you know when you can provide the solution? Because I need it realy soon:((((
Here’s the file:
If you have an H7 R2 then it has to be built into the firmware. If you have a plus then you can just load it using our examples.
# Tensorflow Support
The OpenMV firmware supports loading quantized Tensorflow Lite models. The firmware supports loading external models that reside on the filesystem to memory (on boards with SDRAM), and internal models (embedded into the firmware) in place. To load an external Tensorflow model from the filesystem from Python use [`tf`](https://docs.openmv.io/library/omv.tf.html) Python module. For information on embedding Tensorflow models into the firmware, and loading them, please see the following sections.
- [Training Tensorflow models](#training-tensorflow-models)
- [Embedding Tensorflow models in the firmware](#embedding-tensorflow-models-in-the-firmware)
- [Loading embedded Tensorflow models](#loading-embedded-tensorflow-models)
## Training Tensorflow models
You can use Tensorflow Lite with any high-level API, such as Keras or pytorch, to train and quantize models (for example, see [Training Mobilenet V2 for OpenMV with Keras](https://github.com/SingTown/openmv_tensorflow_training_scripts/blob/main/openmv_mobilenet_v2.ipynb)). However, the officially supported way to train models for OpenMV cameras is using EdgeImpulse. For more information on using EdgeImpulse with OpenMV cameras, please see the [EdgeImpulse tutorial for OpenMV](https://docs.edgeimpulse.com/docs/openmv-cam-h7-plus).
## Embedding Tensorflow models in the firmware
Tensorflow models can be embedded into the firmware for boards that don't have an SDRAM. The firmware ships with a default embedded model, that can be replaced by any other Tensorflow model. Additionally, more models can be embedded in the firmware, as many as the free flash size allows. Once you have a tflite model to replace the default model, or to add to the firmware, it can be embedded in the firmware by placing the model `.tflite` file and its `.txt` labels file in `src/libtf/models`. The model file and labels file must have the same basename, for example:
```bash
models/mask_detection.txt
models/mask_detection.tflite
```
The labels `.txt` file contains model output labels arranged 1 label per line, for example:
```
>>cat mask_detection.txt
This file has been truncated. show original
→ openmv/src/lib/libtf/models at master · openmv/openmv · GitHub
I have the H7 module and I get this error: “(Out of fast Frame Buffer Stack Memory! Please reduce the resolution of the image you are running this algorithm on to bypass this issue!)” Reducing the windowing size does not seem to help
Yeah, you have to build the model into your firmware image.
So, please follow our build instructions.
Also, before you do all this work… the person detection model is demo quality. So… again, if you are putting all this time in to run the demo instead of just actually doing what you actually want to do I’d focus on the application. Unless that is person detection.