# Embedding Tensorflow Model In Firmware - Could Not Find File

**URL:** <https://forums.openmv.io/t/embedding-tensorflow-model-in-firmware-could-not-find-file/10220>\
**Category:** OpenMV Boards\
**Created:** [November 20, 2024, 3:45am UTC](https://forums.openmv.io/t/embedding-tensorflow-model-in-firmware-could-not-find-file/10220 "2024-11-20T03:45:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajacobs](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@ajacobs](https://forums.openmv.io/u/ajacobs)\
**Post date:** [November 20, 2024, 3:45am UTC](https://forums.openmv.io/t/embedding-tensorflow-model-in-firmware-could-not-find-file/10220/1 "2024-11-20T03:45:19Z")

</div>

I have built a custom model that loads and runs from the SD card. Now looking to embed the model into the firmware. I have followed these two posts, and placed my model “blob\_classify” and label files into openmv/src/lib/tflm/models, then build the firmware.

> <https://github.com/openmv/openmv/blob/master/src/README.md#flashing-the-firmware>

> **[openmv/src/lib/tflm at master · openmv/openmv](https://github.com/openmv/openmv/tree/master/src/lib/tflm)**
>
> OpenMV Camera Module. Contribute to openmv/openmv development by creating an account on GitHub.

I load the firmware with this path:  
\wsl.localhost\Ubuntu\home\username\openmv\src\build\bin\firmware.bin

After loading the firmware I get the error “Could not find the file”.

When I change to model filename to “fomo\_face\_detection”, the model loads.

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/2X/1/1477c9bd7acd07dbf82fecf6f48a9d7dd76a0448.png)

---

<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:** [November 20, 2024, 6:03am UTC](https://forums.openmv.io/t/embedding-tensorflow-model-in-firmware-could-not-find-file/10220/2 "2024-11-20T06:03:06Z")

</div>

Hi, can you provide your model and labels? I just tried this feature out by adding a renamed second copy of fomo to the nicla firmware and there were no issues.

---

<div class="post-metadata">

**Author:** ![ajacobs](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@ajacobs](https://forums.openmv.io/u/ajacobs)\
**Post date:** [November 20, 2024, 7:43am UTC](https://forums.openmv.io/t/embedding-tensorflow-model-in-firmware-could-not-find-file/10220/3 "2024-11-20T07:43:11Z")

</div>

I’m building the firmware for RT1062. In OpenMV IDE the board is “OpenMV Cam RT1062 Legacy”.

Build using this:  
make -j$(nproc) TARGET=OPENMV\_RT1060 -C src

---

<div class="post-metadata">

**Author:** ![ajacobs](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@ajacobs](https://forums.openmv.io/u/ajacobs)\
**Post date:** [November 20, 2024, 7:46am UTC](https://forums.openmv.io/t/embedding-tensorflow-model-in-firmware-could-not-find-file/10220/4 "2024-11-20T07:46:26Z")

</div>

Figured it out. After adding the .tflite and .txt files to /model folder, need to force make to rebuild with -B switch

make -j$(nproc) -C src/micropython/mpy-cross -B

---

<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:** [November 20, 2024, 3:18pm UTC](https://forums.openmv.io/t/embedding-tensorflow-model-in-firmware-could-not-find-file/10220/5 "2024-11-20T15:18:05Z")

</div>

Great!

---

<div class="post-metadata">

**Author:** ![cdroom](https://avatars.discourse-cdn.com/v4/letter/c/a88e57/32.png) [@cdroom](https://forums.openmv.io/u/cdroom)\
**Post date:** [January 15, 2025, 12:29pm UTC](https://forums.openmv.io/t/embedding-tensorflow-model-in-firmware-could-not-find-file/10220/6 "2025-01-15T12:29:13Z")

</div>

Hi @ajacobs,

I’m encountering the [same issue] ([Error loading embedded model](https://forums.openmv.io/t/error-loading-embedded-model/10507)) you described regarding loading an embedded model in OpenMV. I was wondering if you could share more details about how you executed your model and the steps you followed.  
Thank you.

---

<div class="post-metadata">

**Author:** ![ajacobs](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@ajacobs](https://forums.openmv.io/u/ajacobs)\
**Post date:** [January 15, 2025, 2:49pm UTC](https://forums.openmv.io/t/embedding-tensorflow-model-in-firmware-could-not-find-file/10220/7 "2025-01-15T14:49:48Z")

</div>

It may be a memory issue. Try removing all other models from the folder.
