Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. VOXL Compute & Autopilot
  3. VOXL 2
  4. No detections when running custom YOLOv8 model on voxl-tflite-server

No detections when running custom YOLOv8 model on voxl-tflite-server

Scheduled Pinned Locked Moved VOXL 2
17 Posts 3 Posters 1.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Zachary Lowell 0Z Offline
    Zachary Lowell 0Z Offline
    Zachary Lowell 0
    ModalAI Team
    wrote on last edited by
    #2

    Hello @svempati can you paste your yolov8_labels and tflite file and I can test it out on my end?

    To confirm - you followed the instructions in this gitlab repository: https://gitlab.com/voxl-public/support/voxl-train-yolov8

    Zach

    S 1 Reply Last reply
    0
    • Zachary Lowell 0Z Zachary Lowell 0

      Hello @svempati can you paste your yolov8_labels and tflite file and I can test it out on my end?

      To confirm - you followed the instructions in this gitlab repository: https://gitlab.com/voxl-public/support/voxl-train-yolov8

      Zach

      S Offline
      S Offline
      svempati
      Contributor
      wrote on last edited by
      #3

      Hi @Zachary-Lowell-0, Yes I am confirming that I followed the instructions in that gitlab repository.
      Here is the tflite file and labels file: https://drive.google.com/drive/folders/1kyjanabVSP_pH_jsQyjQG9z6hFYZ_iij?usp=drive_link

      1 Reply Last reply
      0
      • Zachary Lowell 0Z Offline
        Zachary Lowell 0Z Offline
        Zachary Lowell 0
        ModalAI Team
        wrote on last edited by Zachary Lowell 0
        #4

        @svempati said in No detections when running custom YOLOv8 model on voxl-tflite-server:

        "labels": "/usr/bin/dnn/yolov8_labels.txt",

        So running your model we get the following errors via voxl-tflite-server:

        Error in TensorData<float>: should not reach here
        Error in TensorData<float>: should not reach here
        Error in TensorData<float>: should not reach here
        Error in TensorData<float>: should not reach here
        Error in TensorData<float>: should not reach here
        Error in TensorData<float>: should not reach here
        Error in TensorData<float>: should not reach here
        Error in TensorData<float>: should not reach here
        

        Which means there is an issue in your model itself and most likely means you ran into an issue during the build process. Specifically this means that is a model issue, not a labels file issue. Your .tflite model has an output tensor with a different data type than what voxl-tflite-server expects

        The code itself shows the error when you hit this case statement:

        // Gets the uint8_t tensor data pointer
        template <>
        inline uint8_t *TensorData(TfLiteTensor *tensor, int batch_index)
        {
        int nelems = 1;

        for (int i = 1; i < tensor->dims->size; i++)
        {
            nelems *= tensor->dims->data[i];
        }
        
        switch (tensor->type)
        {
        case kTfLiteUInt8:
            return tensor->data.uint8 + nelems * batch_index;
        default:
            fprintf(stderr, "Error in %s: should not reach here\n",
                    __FUNCTION__);
        }
        
        return nullptr;
        

        }

        Which means the output tensor doesnt match the expected output in this header file. Please look into your model.

        zach

        1 Reply Last reply
        0
        • Zachary Lowell 0Z Offline
          Zachary Lowell 0Z Offline
          Zachary Lowell 0
          ModalAI Team
          wrote on last edited by
          #5

          Link Preview Image
          include/tensor_data.h · master · voxl / VOXL SDK / Services / voxl-tflite-server · GitLab

          Tensorflow-Lite (TFlite) server that outputs Tflite processed images

          favicon

          GitLab (gitlab.com)

          These are all the potential data types that voxl-tflite-server is expecting.

          S 1 Reply Last reply
          0
          • Zachary Lowell 0Z Zachary Lowell 0

            Link Preview Image
            include/tensor_data.h · master · voxl / VOXL SDK / Services / voxl-tflite-server · GitLab

            Tensorflow-Lite (TFlite) server that outputs Tflite processed images

            favicon

            GitLab (gitlab.com)

            These are all the potential data types that voxl-tflite-server is expecting.

            S Offline
            S Offline
            svempati
            Contributor
            wrote on last edited by svempati
            #6

            I see, so my model is not supported by the voxl-tflite-server since it is float16 and the tflite server only supports 32 bit precision if we want to use floating point values. Am I understanding that correctly or am I missing something? Cause the default YOLOv5 model that is included in the VOXL 2 model (yolov5_float16_quant.tflite) is also of float 16 precision so I wonder how the functions in tensor_data.h handle that.

            One question, what command did you use to view these error logs from voxl-tflite server?

            Error in TensorData<float>: should not reach here
            Error in TensorData<float>: should not reach here
            Error in TensorData<float>: should not reach here
            Error in TensorData<float>: should not reach here
            Error in TensorData<float>: should not reach here
            Error in TensorData<float>: should not reach here
            Error in TensorData<float>: should not reach here
            Error in TensorData<float>: should not reach here
            
            1 Reply Last reply
            0
            • Zachary Lowell 0Z Offline
              Zachary Lowell 0Z Offline
              Zachary Lowell 0
              ModalAI Team
              wrote on last edited by
              #7

              @svempati said in No detections when running custom YOLOv8 model on voxl-tflite-server:

              I just ran voxl-tflite-server directly from the command line instead of in the background via systemd - aka run voxl-tflite-server directly on the command line. I would recommend NOT quantizing your model as the directions in the train yolov8 do not recommend that.

              Zach

              S 2 Replies Last reply
              0
              • Zachary Lowell 0Z Zachary Lowell 0

                @svempati said in No detections when running custom YOLOv8 model on voxl-tflite-server:

                I just ran voxl-tflite-server directly from the command line instead of in the background via systemd - aka run voxl-tflite-server directly on the command line. I would recommend NOT quantizing your model as the directions in the train yolov8 do not recommend that.

                Zach

                S Offline
                S Offline
                svempati
                Contributor
                wrote on last edited by
                #8

                @Zachary-Lowell-0 Got it, I will try that out and will let you know if I have any more questions. Thanks for your help!

                1 Reply Last reply
                0
                • Zachary Lowell 0Z Zachary Lowell 0

                  @svempati said in No detections when running custom YOLOv8 model on voxl-tflite-server:

                  I just ran voxl-tflite-server directly from the command line instead of in the background via systemd - aka run voxl-tflite-server directly on the command line. I would recommend NOT quantizing your model as the directions in the train yolov8 do not recommend that.

                  Zach

                  S Offline
                  S Offline
                  svempati
                  Contributor
                  wrote on last edited by svempati
                  #9

                  @Zachary-Lowell-0 I wanted to follow up with you again on this, and the issue seems to be the model conversion process from pytorch to tflite. To confirm this, I tried it with the default yolov8n.pt downloaded from ultralytics by entering this command from the gitlab repository:

                  python export.py yolov8n.pt
                  

                  So that I create a new yolov8n_float16.tflite file. However, running this file on voxl-tflite-server shows this output before displaying Error in TensorData<float>: should not reach here:

                  WARNING: Unknown model type provided! Defaulting post-process to object detection.
                  INFO: Created TensorFlow Lite delegate for GPU.
                  INFO: Initialized OpenCL-based API.
                  INFO: Created 1 GPU delegate kernels.
                  Successfully built interpreter
                  
                  ------VOXL TFLite Server------
                  
                   4 5 6
                   4 5 6
                  Connected to camera server
                  
                  

                  I even tried running export.py on the voxl emulator to account for any differences in the cpu architecture between my computer and the VOXL (between X86 and ARM) but I still get the same error. Do you think there is anything I would be missing? Thank you!

                  1 Reply Last reply
                  0
                  • Zachary Lowell 0Z Offline
                    Zachary Lowell 0Z Offline
                    Zachary Lowell 0
                    ModalAI Team
                    wrote on last edited by
                    #10

                    @svempati said in No detections when running custom YOLOv8 model on voxl-tflite-server:

                    WARNING: Unknown model type provided! Defaulting post-process to object detection.

                    @svempati I will try recreating this issue today and get back to you!

                    S 1 Reply Last reply
                    0
                    • Zachary Lowell 0Z Zachary Lowell 0

                      @svempati said in No detections when running custom YOLOv8 model on voxl-tflite-server:

                      WARNING: Unknown model type provided! Defaulting post-process to object detection.

                      @svempati I will try recreating this issue today and get back to you!

                      S Offline
                      S Offline
                      svempati
                      Contributor
                      wrote on last edited by
                      #11

                      @Zachary-Lowell-0 Just wanted to follow up to see if you were able to replicate this issue?

                      1 Reply Last reply
                      0
                      • Zachary Lowell 0Z Offline
                        Zachary Lowell 0Z Offline
                        Zachary Lowell 0
                        ModalAI Team
                        wrote on last edited by
                        #12

                        @svempati I was able to use an open source training set and then leverage the docs to make my own custom yolov8 model capable of running on the voxl2 - do you want to provide to me the actual dataset and I can try creating the model and training it on a TPU?

                        S 1 Reply Last reply
                        0
                        • Zachary Lowell 0Z Zachary Lowell 0

                          @svempati I was able to use an open source training set and then leverage the docs to make my own custom yolov8 model capable of running on the voxl2 - do you want to provide to me the actual dataset and I can try creating the model and training it on a TPU?

                          S Offline
                          S Offline
                          svempati
                          Contributor
                          wrote on last edited by svempati
                          #13

                          @Zachary-Lowell-0 I would first like to diagnose what is causing the yolov8 model to not work on the voxl 2 for me. Will it only work when you train the model/ export it to tflite on a TPU? I am getting the issue even if I train the yolov8 model on an open source dataset/ use the pretrained yolov8n.pt model downloaded from ultralytics. I want to make sure I can train a yolov8 model on an open source dataset from scratch works on the voxl, so that I can move on to using my custom dataset.

                          In case there is no other workaround then I should be able to send you the dataset I am using.

                          Thanks!

                          1 Reply Last reply
                          0
                          • Zachary Lowell 0Z Offline
                            Zachary Lowell 0Z Offline
                            Zachary Lowell 0
                            ModalAI Team
                            wrote on last edited by
                            #14

                            Let me try and train a custom model and run a loom on it in the next few days and get that over to you showing how I do it!

                            1 Reply Last reply
                            0
                            • Zachary Lowell 0Z Offline
                              Zachary Lowell 0Z Offline
                              Zachary Lowell 0
                              ModalAI Team
                              wrote on last edited by
                              #15

                              Link Preview Image
                              ModalAI VOXL Portal - 17 February 2026

                              Use Loom to record quick videos of your screen and cam. Explain anything clearly and easily – and skip the meeting. An essential tool for hybrid workplaces.

                              favicon

                              Loom (www.loom.com)

                              Alright take a look at this loom please - it might help point you in the right direction in terms of training your model.

                              Zach

                              S 1 Reply Last reply
                              0
                              • Zachary Lowell 0Z Zachary Lowell 0

                                Link Preview Image
                                ModalAI VOXL Portal - 17 February 2026

                                Use Loom to record quick videos of your screen and cam. Explain anything clearly and easily – and skip the meeting. An essential tool for hybrid workplaces.

                                favicon

                                Loom (www.loom.com)

                                Alright take a look at this loom please - it might help point you in the right direction in terms of training your model.

                                Zach

                                S Offline
                                S Offline
                                svempati
                                Contributor
                                wrote on last edited by
                                #16

                                @Zachary-Lowell-0 Thanks for sharing the video! I looked at it, and I pretty much did the same steps you did. It might be worth mentioning that I had to modify the Dockerfile because the one in the documentation was throwing a version mismatch error when installing the onnx part.

                                This was the original docker command

                                RUN pip3 install ultralytics tensorflow onnx "onnx2tf>1.17.5,<=1.22.3" tflite_support onnxruntime onnxslim "onnx_graphsurgeon>=0.3.26" "sng4onnx>=1.0.1" tf_keras
                                

                                I modified it to this

                                RUN pip3 install ultralytics tensorflow "onnx2tf>1.17.5,<=1.22.3" tflite_support onnxruntime onnxslim "onnx_graphsurgeon>=0.3.26" "sng4onnx>=1.0.1" tf_keras
                                RUN pip3 install onnx==1.20.1
                                

                                I don't think this should cause any issues, but could you confirm?

                                A 1 Reply Last reply
                                0
                                • S svempati

                                  @Zachary-Lowell-0 Thanks for sharing the video! I looked at it, and I pretty much did the same steps you did. It might be worth mentioning that I had to modify the Dockerfile because the one in the documentation was throwing a version mismatch error when installing the onnx part.

                                  This was the original docker command

                                  RUN pip3 install ultralytics tensorflow onnx "onnx2tf>1.17.5,<=1.22.3" tflite_support onnxruntime onnxslim "onnx_graphsurgeon>=0.3.26" "sng4onnx>=1.0.1" tf_keras
                                  

                                  I modified it to this

                                  RUN pip3 install ultralytics tensorflow "onnx2tf>1.17.5,<=1.22.3" tflite_support onnxruntime onnxslim "onnx_graphsurgeon>=0.3.26" "sng4onnx>=1.0.1" tf_keras
                                  RUN pip3 install onnx==1.20.1
                                  

                                  I don't think this should cause any issues, but could you confirm?

                                  A Offline
                                  A Offline
                                  ApoorvThapliyal
                                  Contributor
                                  wrote on last edited by
                                  #17

                                  Hey @svempati
                                  I trained a model in the docker command as provided by you. I am able to run an inference on potholes following exactly the steps provided by @Zachary-Lowell-0 earlier.
                                  Could I ask you what your voxl-tflite-version is? And if you havent yet, could you try to run this version: http://voxl-packages.modalai.com/dists/qrb5165/sdk-1.6/binary-arm64/voxl-tflite-server_0.5.1_arm64.deb
                                  Make sure to change the .tflite model and labels as shown in the loom video after the install, then run voxl-configure-tflite

                                  Thanks

                                  1 Reply Last reply
                                  0

                                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                  With your input, this post could be even better 💗

                                  Register Login
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes


                                  ModalAI
                                  Categories Recent Tags ModalAI.com Docs
                                  © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
                                  • Login

                                  • Don't have an account? Register

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Groups