DeepStream 5.0.1 Dewarping

• Hardware Platform (Jetson / GPU) Xavier NX
• DeepStream Version 5.0.1
• JetPack Version (valid for Jetson only) 4.5

cat /etc/nv_tegra_release
R32 (release), REVISION: 5.0, GCID: 25531747, BOARD: t186ref, EABI: aarch64, DATE: Fri Jan 15 23:21:05 UTC 2021

• TensorRT Version N/A
• NVIDIA GPU Driver Version (valid for GPU only) N/A
• Issue Type( questions, bugs)
• How to reproduce the issue
The Single Stream Demo

cd /opt/nvidia/deepstream/deepstream-5.0/sources/apps/sample_apps/deepstream-dewarper-test
deepstream-dewarper-app file:///opt/nvidia/deepstream/deepstream-5.0/samples/streams/sample_cam6.mp4 6

With the following default config_dewarper.txt:

[property]
#dewarp-dump-frames=10

# aisle-calibration-file property is getting used in case of deepstream-360d-app,
# if set below properties under group [surfaceX] will be ignored
aisle-calibration-file=csv_files/nvaisle_2M.csv
# spot-calibration-file property is getting used in case of deepstream-360d-app,
# if set below properties under group [surfaceX] will be ignored
spot-calibration-file=csv_files/nvspot_2M.csv

#########################################
# Note - Max 4 surfaces are supported
#########################################

[surface0]
# 1=PushBroom, 2=VertRadCyl
projection-type=1
surface-index=0
#dewarped surface parameters
width=3886
height=666
top-angle=0
bottom-angle=-35
pitch=90
yaw=0
roll=0
focal-length=437

[surface1]
# 1=PushBroom, 2=VertRadCyl
projection-type=1
surface-index=1
#dewarped surface parameters
width=3886
height=666
top-angle=0
bottom-angle=-35
pitch=-90
yaw=0
roll=180
focal-length=437

[surface2]
# 1=PushBroom, 2=VertRadCyl
projection-type=2
surface-index=0
#dewarped surface parameters
width=1902
height=1500
top-angle=90.3
bottom-angle=0.3
pitch=0
yaw=0
roll=278
focal-length=437

[surface3]
# 1=PushBroom, 2=VertRadCyl
projection-type=2
surface-index=1
#dewarped surface parameters
width=1902
height=1500
top-angle=90.3
bottom-angle=0.3
pitch=0
yaw=0
roll=98
focal-length=437

Results in:

Similarly, this gst-launch command also results in output that looks the same:

gst-launch-1.0 filesrc location= streams/sample_cam6.mp4 ! qtdemux ! h264parse ! nvv4l2decoder  ! nvvideoconvert  ! nvdewarper config-file=config_dewarper.txt source-id=6  ! m.sink_0 nvstreammux name=m width=960 height=752 batch-size=4 num-surfaces-per-frame=4 ! nvmultistreamtiler ! nvegltransform ! nveglglessink

Which leads me to believe the config file isn’t quite right for the example.

What should the config file read?

Cheers,
Joe Gorse

The obvious edits to the config file, such as changing the width and height parameters, appear to have no effect on the output.

Where do I start with something that works?

Cheers,
Joe

The configurations of nvdewarper (Gst-nvdewarper — DeepStream DeepStream Version: 5.0 documentation) should be adjusted according to your camera situation. The default values are just an example. You need to know about your cameras and projection algorithms before change the parameters Gst-nvdewarper — DeepStream DeepStream Version: 5.0 documentation

Fiona, I am using the examples provided using the inputs in the deepstream-5.0 package.
streams/sample_cam6.mp4 from
/opt/nvidia/deepstream/deepstream-5.0/samples/streams/
is the input video.
The config file config_dewarper.txt is from
/opt/nvidia/deepstream/deepstream-5.0/sources/apps/sample_apps/deepstream-dewarper-test

Their output appears to be incorrect on a fresh installation of the latest Jetpack and DeepStream 5.0.1 from the SDK Manager.

Please advise.

Cheers,
Joe

This output you post here is expected, because in the dewarper test application we are inserting tiler in the pipeline. Which combines 4 surfaces and creates single frame.

Fiona,

As there appears to be no documentation explaining the proper way to run the example to get the intended output, would you mind explaining what you are talking about? Conceptually, I can imagine a tiler would be necessary to recombine the dewarped image projections into a frame. However, this is not what it’s doing. It’s doing something surprising and not useful.

Also, how can we do better than 15 days this time around?

Cheers,
Joe

Yo can refer to nvdewarper document Gst-nvdewarper — DeepStream 5.1 Release documentation. There are 3 types of projection, you can output one surface with one type or output multiple surfaces with different types. Please read the config_dewarper.txt file for more information.

Hi, where is the doc for the projection types? Where can we find the documentation for the projection parameters? The documentation only repeates the names of the parameters, but it is unclear how to choose/set those parameters or what they do.