# Tflite Server with Custom Trained YoloV5 receives SIGINT When Ran

Source: https://forum.modalai.com/topic/2458/tflite-server-with-custom-trained-yolov5-receives-sigint-when-ran
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2023-07-20 14:31:15 UTC by mattm8600
Replies: 0 · Views: 248

## mattm8600 · 2023-07-20 14:31:15 UTC

My team is tasked with using a custom trained YoloV5 image classifier on the VOXL m500. 
**Here are the steps I took:**
1. Used the following export command to save our YoloV5 with custom weights into a TF Saved Model [YoloV5 Forum](https://docs.ultralytics.com/yolov5/tutorials/model_export/#export-a-trained-yolov5-model)
2. I used the following script, copying most of it from an archived version of the [ModalAi Deep Learning Docs](https://web.archive.org/web/20230529080732/https://docs.modalai.com/voxl-tflite-server/) (For some reason the current webpage has nothing)
```python
import tensorflow as tf

saved_model_dir='/directory/best_saved_model/'
converter = tf.compat.v1.lite.TFLiteConverter.from_saved_model(saved_model_dir)

converter.use_experimental_new_converter = True
converter.allow_custom_ops = True
converter.target_spec.supported_types = [tf.float16]

tflite_model = converter.convert()
with tf.io.gfile.GFile('model_converted.tflite', 'wb') as f:
  f.write(tflite_model)
```
3. I export the .tflite frile to the drone and move it to ```/usr/bin/dnn```
4. I renamed my custom model to ```yolov5_float16_quant.tflite``` because I was getting an error when trying to use a model of a different name
5. I ran ```voxl-configure-tflite``` and selected yolov5 as the model to use

**Results**

* I can't see Tflite on the VOXL portal, but I can see the hires camera (which is being piped to TFlite)
* If I run ```roslaunch voxl_mpa_to_ros voxl_mpa_to_ros```, it advertises both tflite and tflite_data, but gives me the following error: "Interface: tflite's data pipe disconnected, closing until it returns"

**Trouble shooting**
* I tried rebooting the drone
* I killed the ```voxl-tflite-server``` and tried to run it in debug mode which gave me the following output:![Screenshot from 2023-07-20 10-24-30.png](https://forum.modalai.com/assets/uploads/files/1689863113003-screenshot-from-2023-07-20-10-24-30.png) 
* I restored the stock YoloV5 classifier to the ```yolov5_float16_quant.tflite``` name and it worked perfectly

I don't know where to go from here. Any input is appreciated, thanks.
