• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
ModalAI Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
    • Register
    • Login

    Can anyone recommend a Tflite Colab Notebook for VOXL2 Training

    Ask your questions right here!
    4
    53
    6.8k
    Loading More Posts
    • 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.
    • S
      sansoy @sansoy
      last edited by 10 Jan 2024, 04:49

      @tom so i trained on a new batch of AR15 images and got really good numbers in terms of losses and mAPs. Ran an unquantized and quantized version in voxl-tflite-server and again nothing is being recognized.

      Here's a link to the tflites, and saved_models with inference results on never before seen images.
      Any insight on how to make these models work in your environment would be awesomely appreciated.

      https://drive.google.com/drive/folders/1N1pU0jMRTb3rODSfIuETPrBf66m4ody7?usp=drive_link

      T 1 Reply Last reply 10 Jan 2024, 17:55 Reply Quote 0
      • T
        tom admin @sansoy
        last edited by 10 Jan 2024, 17:54

        @sansoy Interesting, sudo isn't normally required. I'm curious, what linux distro are you running?

        S 1 Reply Last reply 10 Jan 2024, 18:09 Reply Quote 0
        • T
          tom admin @sansoy
          last edited by 10 Jan 2024, 17:55

          @sansoy @Thomas-Patton is the ML expert here and I'll let him comment on that front

          1 Reply Last reply Reply Quote 0
          • S
            sansoy @tom
            last edited by 10 Jan 2024, 18:09

            @tom Ubuntu 22.04.3 LTS

            T 1 Reply Last reply 10 Jan 2024, 18:21 Reply Quote 0
            • T
              tom admin @sansoy
              last edited by 10 Jan 2024, 18:21

              @sansoy Huh, okay, that's what I run as well.

              What groups are your default user in? For example, here is mine:

               ~  groups                                               ok | 10:20:36 AM 
              tom adm dialout cdrom sudo dip plugdev lpadmin lxd sambashare docker
              
              S 1 Reply Last reply 10 Jan 2024, 22:17 Reply Quote 0
              • S
                sansoy @tom
                last edited by 10 Jan 2024, 22:17

                @tom eve@eve:~$ groups
                eve adm cdrom sudo dip plugdev lpadmin lxd sambashare

                T 1 Reply Last reply 11 Jan 2024, 17:41 Reply Quote 0
                • T
                  tom admin @sansoy
                  last edited by 11 Jan 2024, 17:41

                  @sansoy Can you try adding your user to the dialout group and seeing if that fixes the issue?

                  sudo usermod -a -G dialout $USER

                  S 1 Reply Last reply 12 Jan 2024, 14:36 Reply Quote 0
                  • S
                    sansoy @tom
                    last edited by 12 Jan 2024, 14:36

                    @tom did that and still no inference.
                    tflite_1705069939.png

                    T 1 Reply Last reply 12 Jan 2024, 18:03 Reply Quote 0
                    • T
                      tom admin @sansoy
                      last edited by 12 Jan 2024, 18:03

                      @sansoy That was for fixing the fastboot issue, unrelated

                      ? 1 Reply Last reply 12 Jan 2024, 18:38 Reply Quote 0
                      • ?
                        A Former User @tom
                        last edited by 12 Jan 2024, 18:38

                        @sansoy

                        When I get some time today I'll try to download your .tflite models and see what's going on. The good news is that the server is at least running! It very well may just be an issue with how the tensor is being parsed.

                        Thomas
                        thomas.patton@modalai.com

                        ? 1 Reply Last reply 15 Jan 2024, 17:18 Reply Quote 0
                        • ?
                          A Former User @Guest
                          last edited by 15 Jan 2024, 17:18

                          @sansoy

                          Hey, they just gave me access to the Google Drive folder. Can you confirm that the edgetpu.tflite in the root directory is the file you want me to try and get working?

                          Thomas

                          S 1 Reply Last reply 15 Jan 2024, 17:56 Reply Quote 0
                          • S
                            sansoy @Guest
                            last edited by 15 Jan 2024, 17:56

                            @thomas i just checked permissions and you have access to all the files and yes to

                            edgetpu.tflit
                            ssd-mobilenet-v2-fpnlite-640_quant.tflite
                            ssd-mobilenet-v2-fpnlite-640.tflite
                            saved_models/saved_model.pb

                            ? 1 Reply Last reply 15 Jan 2024, 21:45 Reply Quote 0
                            • ?
                              A Former User @sansoy
                              last edited by 15 Jan 2024, 21:45

                              @sansoy

                              Of these 4 models which is the custom trained YOLO model you mentioned above? I can't even get the edgetpu.tflite model to load so I need a little bit more information on how each of these files was generated.

                              Thomas

                              S 1 Reply Last reply 15 Jan 2024, 22:50 Reply Quote 0
                              • S
                                sansoy @Guest
                                last edited by 15 Jan 2024, 22:50

                                @thomas here's a yolov5 trained model.
                                https://drive.google.com/file/d/1wRbIXdylgx-EOGDLnuWnsytGd2DcTNeY/view?usp=drive_link

                                I used this instruction set to train a yolov5 model which works well on my mac, rPI4, linux box and nvidia jetson.
                                https://docs.ultralytics.com/yolov5/tutorials/train_custom_data/#23-organize-directories

                                S 1 Reply Last reply 16 Jan 2024, 12:58 Reply Quote 0
                                • S
                                  sansoy @sansoy
                                  last edited by 16 Jan 2024, 12:58

                                  @thomas here's the colab notebook i used to create the tflites and quantized tflites
                                  https://colab.research.google.com/drive/1QdgpSl63OSQdLTnFwOyP8dxLQ7W0HtmW?usp=sharing

                                  ? 1 Reply Last reply 16 Jan 2024, 18:24 Reply Quote 0
                                  • ?
                                    A Former User @sansoy
                                    last edited by 16 Jan 2024, 18:24

                                    @sansoy

                                    I found the bug in our code that's causing the issue. You can see on this line that a for YOLO models a former employee hardcoded the number of classes to be 80 leading to a segfault when we only have a single class like in your case. Here's what your model looks like on our server with the fix:

                                    7b4e7252-e3f7-4204-be81-abacde3b5c4b-image.png

                                    What I'm going to do is write a patch for voxl-tflite-server that more intelligently reads the number from the labels file. This will be available in our SDK Nightlies and so you'll be able to use the fix tomorrow morning. If you'd like the fix sooner, what I can do is package the new voxl-tflite-server into a .deb so you can deploy it manually to your VOXL. I can help you out with this process if you're not familiar.

                                    Thanks,
                                    Thomas Patton
                                    thomas.patton@modalai.com

                                    ? S 2 Replies Last reply 16 Jan 2024, 20:20 Reply Quote 1
                                    • ?
                                      A Former User @Guest
                                      last edited by 16 Jan 2024, 20:20

                                      @thomas

                                      https://gitlab.com/voxl-public/voxl-sdk/services/voxl-tflite-server/-/merge_requests/22

                                      Here's the merge request with the fix, this will be published both in tonight's nightly and new SDK releases.

                                      Thomas

                                      S 1 Reply Last reply 17 Jan 2024, 01:05 Reply Quote 1
                                      • S
                                        sansoy @Guest
                                        last edited by 17 Jan 2024, 00:57

                                        @thomas you rock! awesome! thanks for troubleshooting.

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          sansoy @Guest
                                          last edited by 17 Jan 2024, 01:05

                                          @thomas thanks thomas. will download tomorrow and test either in evening or next day. Really appreciate your help with this.
                                          Great job! Sabri

                                          ? 1 Reply Last reply 17 Jan 2024, 01:10 Reply Quote 0
                                          • ?
                                            A Former User @sansoy
                                            last edited by 17 Jan 2024, 01:10

                                            @sansoy

                                            Yeah of course, glad I could be of assistance! Be sure to let me know if you need any more help with this.

                                            Two things I was thinking about on my drive home that you should know - First, when you're on that page I linked above for the software nightlies make sure you sort the files by date descending so that you get the most recent one. I always make the mistake of getting the wrong one. Secondly, when you flash that nightly SDK it will overwrite anything not in the /data/ directory and so you will need to put your model file and labels txt back into /usr/bin/dnn/.

                                            Thomas

                                            S 1 Reply Last reply 18 Jan 2024, 12:36 Reply Quote 0
                                            14 out of 53
                                            • First post
                                              14/53
                                              Last post
                                            Powered by NodeBB | Contributors