Issues with Running Custom TensorFlow Lite Model in C++
Hi @Pavelikgr,  I'm having trouble understanding your project structure/compiling... specifically "ui_mainwindow.h" is included but the file included is mainwindow.ui. It also seems you have some dependencies. Can you please list your dependencies and the commands you used to compile? Are you using CMake or Bazel? If so, please include relevant files as well (CMakeLists.txt / BUILD). This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/61709">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/61709">No</a>

### 1. System information

- Platform and Linux distribution kubuntu 22.04:
- TensorFlow is built from C++ source code:
- Tensorflow 2.11:

### 2. Code

- Link to models that I trained and tried but they don't work in C++ - https://github.com/asuemg1/models_hub/tree/main/Tensorflow%20Lite/Object%20Detection/my_ssd_mobnet/Optimized%20Models
- Link to the model that works in C++ - https://github.com/ankdesh/tflite/blob/master/Android-TensorFlow-Lite-Example/app/src/main/assets/mobilenet_quant_v1_224.tflite
- Link to C++ code (mainwindow.cpp file):
https://drive.google.com/file/d/1u87yK-1qqKeHBjUKq-Lkxi0LMQKkdrPg/view?usp=sharing

### 3. Crash after conversion

- The model does not work in C++.

Please tell me how you can run the Tensorflow Lite model (tflite format) for object detection or image classification in C ++.

My steps:
- Trained the model for object detection using Tensorflow 2 API object detection.
- After training, I converted the model to the savedmodel format, and then to tflite.
- Next, I needed to embed this model into a C++ project. In order to use it in the future on low-power devices such as rasberry pi

My actions:
- Compiled the Tensorflow Lite library for C++.
- Found a test case using the mobilenet_quant_v1_224.tflite model. In this test case, the model runs successfully. However, when trying to use my own model, it does not work, although it has been tested and works in Python.

What was found out:

- The mobilenet_quant_v1_224.tflite model was quantized and had no metadata and no internal labelmap.txt file.
- TensorFlow Lite API 2 for C++ does not currently support metadata.

If you have any information on how to get my tflite model to work in C++ please share.