• FOV Issue when running mobilenet-ssd

OBJECTIVE:

I want to run mobilenet-ssd with the following FOV. It is easily achievable through DepthAI demo with the following settings:

ISSUE:

However, I cannot customize the DepthAI demo to output the data I want. So I am using spatial_mobilenet_mono.py from the DepthAI example folder to achieve this goal. But the issue is that the FOV is less than half compared to the demo app, which limits the range of object and depth detection.

When I tried to resize by using imageManip.initialConfig.setResize(800, 400) in spatial_mobilenet_mono.py, the mobilenet-ssd doesn't work because it's not in 1:1 resolution. But somehow mobilenet-ssd works perfectly fine with wider FOV and different aspect ratio in the DepthAI demo app. How can I get spatial_mobilenet_mono.py to work exactly like the DepthAI demo app with similar settings to my screenshot?

    Hi jsiic

    When downsizing the mono feed to (300, 300), you can specify the initialConfig.setKeepAspectRatio(False). This will keep the whole HFOV, but will squeeze the image and you may lose some info, but mostly shouldn't be a problem for detection.

    Hope this helps,
    Jaka

      jakaskerl
      Thank you, it fixed it:

      So I guess in the depthAI demo, it's just stretching it back to wider aspect ratio only for display? But in reality the image is actually squished into 300x300 for processing?

        Hi jsiic,
        It doesn't really stretch it back. It duplicates the video, one downsized to 300x300 and squished, and one original size sent to XLINKOUT. Then inference is done on the preview frame, which returns BBOX, which is then upscaled and superimposed over the larger video frames.

        Glad it worked,
        Jaka