• set up

Hi ThasnimolVSam22d007
You can add your own classes to an already existing/trained model, by retraining it from a checkpoint along with your new training data. I suggest you look up a few tutorials. I've seen shoes, person, face (haven't yet seen one for goggles), but all as separate models. Your best bet is looking for something like yolo, which usually already has ~ 80 classes.

Hope this helps,
Jaka

    jakaskerl

    means, currently am using the code which is already given in the example, so it is using mobilenet ssd, so your saying i need train object and add to the same model or like mobilenet i saw yolo, we can use it same way as yolo in code??

      Hi ThasnimolVSam22d007
      If your model (be it SSD or yolo) supports retraining with new classes, then yes. Otherwise you will have to freshly train those models to detect your objects.

      Thanks,
      Jaka

      18 days later

      @jakaskerl , @erik

      i have one doubt, any custom trained model will work with oak d camera, now am trying hand gesture detection with yolo8, do you have any idea on the process, actually with this oak d any random model will work or any restriction is there?

      • erik replied to this.
        erik added the tags .

        @erik

        here in this code which model is using??

        do you have any custom model example with yolo - then it will be helpful for me , then i can add more things on it??

        • erik replied to this.

          Hi @ThasnimolVSam22d007,

          the problem lies with the newest version of the ultralytics. In the tools we use a little bit older version, which doesn't support v8DetectionLoss that the newest version of ultralytics uses. We will deploy the fix within the next release. In the meantime, we have updated the YoloV8 training notebook. You can see the updated notebook here. Basically all you need to do is revert to a bit older version by replacing the first code cell with this:

          $$
          %cd /content/
          !git clone https://github.com/ultralytics/ultralytics
          !cd ultralytics && git reset --hard dce4efce48a05e028e6ec430045431c242e52484
          %pip install -qe ultralytics
          $$

          I apologize for the inconvenience.

          Kind regards,

          Jan

            JanCuhel

            with that also i tried but in that colab also it is not working (it was showing - no module named ultralytics.yolo - but i installed all the packages also

            1. earlier i tried all the github codes and it was showing no error, inorder to do the custom model deployment and model conversion and all installed alot of libraries - so my oak d folder fully showing an error with - reportMissingImports- but when i am installing those modules it is showing already requirement satisfie

            5 days later

            @ThasnimolVSam22d007

            I apologize for the delay in my reply, could you please share with me your trained model from before (the one that couldn't be exported)? I will look into exporting the model and also into your issue with the Colab.

            Best,
            Jan

              10 days later

              JanCuhel

              hi @JanCuhel @erik

              hi i finished the post processing steps up-to making blob file , then i tried to replace it with -

              https://github.com/thedevyansh/oak-d

              - this code blob file - my model is yolov8 for face so i changed the label according to that, - but it is throwing error ,and not able to detect the face , do you have any examples with yolo models working with oak d??

              • erik replied to this.

                Hi ThasnimolVSam22d007 ,
                Looks like your model generates too much data, and OAK is unable to parse it. Usually, folks limit outputs to eg. max 100 detections, for which it would consume.. 7 (values per det) * 100 (num of dets) * 2 (FP16->Bytes) => 1.4kB , which is far less than 140kB your model is producing.

                  erik

                  1. our blob file is 52.3 mb and the code is already using 14.5mb blob file - then why it is not running - i didnt get your calculation?

                  1. is it possible to run yolo converted blob with the mobilenet code? but it is throwing error?(in that one line is there - nn = pipeline.createMobileNetDetectionNetwork() ) , thatswhy i aksed any separate demo code is there to run yolo blob model
                  2. when i tried with a small dataset also same error is coming<?(6.2mb)

                  here 100 detection u mean ? no of labels or no of images?

                  initially i took (https://app.roboflow.com/iit-madras-3gim0/face-detection-in-all-angles/1) this dataset and tried then with smaller dataset also - but same error is coming in bothcases

                  • erik replied to this.

                    Hi ThasnimolVSam22d007 ,

                    1. It's not that there's not enough RAM, but that the node doesn't have enough RAM allocated - it doesn't expect 140kB output, as that's quite a lot of processing (for a small cpu core), especially at high FPS (eg 30).
                    2. No. You'd need to run Yolo converted model with the YoloDetectionNetwork.
                    3. It's not about the model size - but the model output.
                    4. Yes, number of detections - and each detection has bounding box, confidence, and label/class.

                    erik

                    this code i tried for yolov8 but that calculation part didn't understand( i trained it with 416 , 416 size)

                    • erik replied to this.