# Custom net with tensorflow

**URL:** <https://forums.openmv.io/t/custom-net-with-tensorflow/9609>\
**Category:** OpenMV Boards\
**Created:** [May 22, 2024, 11:19am UTC](https://forums.openmv.io/t/custom-net-with-tensorflow/9609 "2024-05-22T11:19:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jega](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@Jega](https://forums.openmv.io/u/Jega)\
**Post date:** [May 22, 2024, 11:19am UTC](https://forums.openmv.io/t/custom-net-with-tensorflow/9609/1 "2024-05-22T11:19:31Z")

</div>

Hi!  
I’m currently working with ML models for street surveillance inference. I tried using FOMO with Edge Impulse, but it has some constraints I’d like to avoid. I’m interested in using state-of-the-art networks like YOLO and noticed there’s progress in adding support for these models. Is there an experimental firmware version available that I could use?

Additionally, I’m developing a custom network from scratch and would like to know if only the Tensor operations/layers listed on the GitHub page are available, or if more will be enabled soon. I’m working with H7 Plus and RT1602.

Thanks!

> YOLO support: [modules/py\_tf: Add support for yolov3, yolov5 and yolov7. by kwagyeman · Pull Request #2134 · openmv/openmv · GitHub](https://github.com/openmv/openmv/pull/2134)

> Layers/Tensor operations: [tensorflow-lib/libtf.cc at master · openmv/tensorflow-lib · GitHub](https://github.com/openmv/tensorflow-lib/blob/master/libtf.cc#L71)

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [May 22, 2024, 1:22pm UTC](https://forums.openmv.io/t/custom-net-with-tensorflow/9609/2 "2024-05-22T13:22:17Z")

</div>

Hi, the RT1062 enables all operators. The H7 Plus has a reduced set to save Flash.

As for YOLO support. This is blocked on Edge Impulse rolling this feature out. We were testing some models back in March of this year and achieved 2.5 FPS with YOLO on the RT1062 at a 240x240 resolution. However, they were having issues with training the models. Finally, they don’t want to release this feature except for enterprise customers. So… it’s not clear how you can actually use it.

Internally at OpenMV we are focused on next gen stuff right now which will just remove any blockers on running any models and allow you to put anything onboard.

---

<div class="post-metadata">

**Author:** ![Jega](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@Jega](https://forums.openmv.io/u/Jega)\
**Post date:** [May 22, 2024, 3:15pm UTC](https://forums.openmv.io/t/custom-net-with-tensorflow/9609/3 "2024-05-22T15:15:07Z")

</div>

Thanks for quick response 🙂

---

<div class="post-metadata">

**Author:** ![casper9429](https://avatars.discourse-cdn.com/v4/letter/c/67e7ee/32.png) [@casper9429](https://forums.openmv.io/u/casper9429)\
**Post date:** [May 30, 2024, 12:03am UTC](https://forums.openmv.io/t/custom-net-with-tensorflow/9609/4 "2024-05-30T00:03:52Z")

</div>

What needs to be done to use Ultralytics int8 quantized tflite yolov8n model?

Best, Casper

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [May 30, 2024, 12:24am UTC](https://forums.openmv.io/t/custom-net-with-tensorflow/9609/5 "2024-05-30T00:24:57Z")

</div>

The models we tested with were NVIDIA TAO ones. YoloV3.

I can’t comment on YOLOV8.

As for running it… if you pull the PR I was working on and modify the code to parse the output head of YOLOV8 it will most likely work. You just need the correct C code to parse the final results of the model. However, YOLO models all have slightly different results heads. So, static C code isn’t the way to go.

We will be modifying that PR to allow post processing via custom Python callbacks. This will allow any model to run. However, I’m not working on this functionality right now. If you want to modify the PR please go ahead.
