Hello Team,

In order to pass the preview output of the ColorCamera node to yolo detection netowrk, I have to resize it to (640x640) using setPreviewSize().
Once I get back the frame and detection results, how can I resize the image back to its original size?

Thank you and appreciate the help.

    Hi @jakaskerl, thank you for getting back and appreciate it a lot.

    Will be looking at this guide and will reach out if I have a any question.

    Have a great day!

    Hi jakaskerl While playing around with this I realized that camRgb.setPreviewKeepAspectRatio(False), does the job in terms of showing the full view of the image frame before being cropped to 640x640 in order to pass to the neural network.

    Any issues with using camRgb.setPreviewKeepAspectRatio(False) that I should be aware off? Or in terms of problems with applying bounding box to the detectons?

    Thank you and appreciate the input on this.

      Hi GurdeepakSidhu
      Well, the detection metrics will be a bit worse (likely not that much) since the model isn't used to seeing squished objects.
      Bounding boxes will be returned in relations to the pixels on the preview (squeezed) image. So I you intend to display the detections on a normal frame, you will have to perform a transformation.
      We have an example though: https://docs.luxonis.com/projects/api/en/latest/samples/MobileNet/rgb_mobilenet_4k/

      Thanks,
      Jaka

      @jakaskerl thank you for your response and insights on my question. Thank you for sending an example will have a look at it.

      Appreciate your help on this and have a great day!

      @jakaskerl the suggested example works and matches what I need.

      Had a question on how to make sure that the bounding box gets applied fully on the detected object, it seems that there is some kind of delay between the video frame and the bounding box as shown by the image below

      Thank you and take care.

      @jakaskerl Not sure why nut camera stopped working

      Whenever I try to run my application or any examples from depthai-python folder I am getting this error

      Traceback (most recent call last):

      File "/home/pi/depthai-python/examples/Yolo/tiny_yolo.py", line 91, in <module>

      with dai.Device(pipeline) as device:

      RuntimeError: Failed to find device after booting, error message: X_LINK_DEVICE_NOT_FOUND

      I am using OAK-D-CM4-POE, which has a raspi 4 system connected to the camera. I had no issues before, but just encountered this right now.
      I looked at the forum for something related to this, however I did not find any discussion related to this occur on OAK-D-CM4 POE device.

      I can still find the camera device though

      Any insight on this would be helpful, thank you.