Sony's Developer World forum

    • Home
    • Forum guidelines

    Upcoming maintenance 

     

    Dear Customers and Partners.

    This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.

    This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.

    We apologize for any inconvenience.

     

     

    Unsolved Object Detection using TF Lite Micro on Sony Spresense

    Spresense
    2
    3
    1842
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rauna last edited by

      Hi,

      I am trying to deploy YOLOv4 Object Detection model on the Sony Spresense.

      I have converted it to .cc format but am not clear as to how to run object detection using TF Lite Micro on the Spresense for my own custom model.

      None of the 3 examples cover object detection and I am looking for tutorial to follow on how to run custom object detection model (YOLOv4) on spresense.

      Any guidance would be helpful.

      Note: I tried to modify the person_detection example by editing it to use my .cc model data, but I got the this error:

      make[2]: warning:  Clock skew detected.  Your build may be incomplete. 
      

      a36c0b88-b480-41f7-aa4a-69956f324a56-image.png
      e4294698-f70c-4fdf-a914-338305e27963-image.png

      1 Reply Last reply Reply Quote
      • R
        rauna last edited by

        I trained my yolov5 model for my usecase. How can I transfer my .tflite object detection model to the spresense.

        C 1 Reply Last reply Reply Quote
        • C
          CamilaSouza DeveloperWorld @rauna last edited by

          Hey, @rauna
          If you don't mind, I'll copy the same answer I gave in the Hackster discussion board 🙂

          Have you already checked this example? -> https://developer.sony.com/develop/spresense/docs/sdk_tutorials_en.html#_tflmrt_sample_application

          There is a note on section 5.1.4. Operation check about using your own model.

          Since you have already trained your model, you can skip section 5.1.2. Train a TensorFlow Lite model.

          I believe you can use this application, but modify how it processes the output tensor.
          This is the code for the application:
          https://github.com/sonydevworld/spresense/blob/master/examples/tflmrt_lenet/tflmrt_lenet_main.c

          The output tensor is
          TfLiteTensor *var = tflm_runtime_output_variable(rt, 0);

          Here you can see some helper functions to work with the output tensor:
          https://github.com/sonydevworld/spresense/blob/master/sdk/modules/include/tflmrt/runtime.h
          Like tflm_runtime_output_num, tflm_runtime_output_shape, tflm_runtime_output_ndim, etc..

          1 Reply Last reply Reply Quote
          • First post
            Last post
          Developer World
          Copyright © 2021 Sony Group Corporation. All rights reserved.
          • Contact us
          • Legal