• Community
  • Just detect person and display distance?

Hello fredrikq ,
A simple example could be found here. It will display all detected objects (20 classes I believe, person included) together with XYZ, so you can calculate the distance to people.
Thoughts?
Thanks, Erik

Just tested the sample code and it works like a charm!

By the way, I got the following error message after a while:

[184430102110111300] [387.892] [system] [critical] Temperature above 105C. Device will shutdown if not reduced. Note: If this is unexpected please reach out to support@luxonis.com to discuss/debug.

OAK-D Lite camera is connected thru a USB cable.

Any idea why this happens?

Thanks!

    Hello fredrikq ,
    We apologize for the issue here, we have already noticed the OAk-D-Lite overheating issue. Could you send an email to support@luxonis.com and link this post so we can sort it out?
    Thanks, Erik

    2 years later

    hi @erik with the code you linked above I can detect 20 classes, but I want to detect only people and I don't want to put a normal IF after detecting all the classes that filters out only people. I would like it to only search for people so as not to waste resources by detecting everything, a bit like the tracker does but with detection.

    it's possible?

    Thank you

      Hi Simone
      That is not possible since the MobileNetSSD model's weights and biases are specifically configured (through training) to be able to detect all 20 different classes. If you wish to have a model only look for a single class (person), you would have to retrain it completely.

      https://blobconverter.luxonis.com/ --> Openvino and Depthai model zoo should have MBnetSSD models designed for person detection only.

      Thanks,
      Jaka

        19 days later

        Hi jakaskerl, is there a method to force the model to higher dimensions? because the ones I'm trying only go (as in the documentation) to 300x300 or 256x256, is there a way to increase this size?

        Hi @Simone
        Not really without retraining it. What models are you using? Are you sure there aren't any variants with higher input size available?

        Thanks,
        Jaka

          jakaskerl now I'm using OpenVino model zoo person-detection-0200 this model required 256x256, it is best compromise quality/speed that i found

          Hi @Simone
          Then you have to keep this model. You can display your detections on a larger frame though (not sure if you were asking that). It's similar to this example. Basically you run inference on the smaller (256x256) frame, then you display detections on the larger (eg 4k) frame.

          Thanks,
          Jaka

            jakaskerl I tried it, but it's not what I'm looking for, because it drops below the 20/25fps which I want to maintain. Is there a method to retrain the cam with the desired size? (1920x1080?)

            I'm using this example code to check detect and fps

            Why using dephtai_demo with same mobilenet-ssd i can have a 1920x1080 format while if I use the code above it forces me to use 300x300?
            is it possible to add depth sensing here?

              Simone
              The demo script uses the same technique I mentioned above.
              Could you send me your code (enclosed in code block with ``` on each side) so I can try to fix the FPS.

              Thanks,
              Jaka

                jakaskerl, using the link you shared previously I understood what I was forgetting, I combined it with the code I use to display the distances and now I no longer have the image cropped to 300x300 but with camRgb.setPreviewKeepAspectRatio(False) I can use the entire frame of the cam.

                Thanks, and sorry if I bothered you but I've been studying the library these last few months.