Dear @kesong ,
I would like to discuss the issue on SV3DT.
Continuing the discussion from Having issues with Single-View 3D Tracking (SV3DT):
Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU): dGPU
• DeepStream Version: 7.0
• JetPack Version (valid for Jetson only)
• TensorRT Version: TRT 8.6.1.6
• NVIDIA GPU Driver Version (valid for GPU only): 555.42.06
• Issue Type( questions, new requirements, bugs): question
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
Hi,
I have obtained a projection matrix for a camera, and I would like to use SV3DT, but the displayed bounding boxes are very SMALL.
I have changed from projectionMatrix_3x4
to projectionMatrix_3x4_w2p
but still the displayed bounding boxes are even smaller.
Could you take a look on this issue? Thanks so much for your time.
Here is how I obtain the projection matrix, and I have project a 2D on the image to z=0 plane, and it does work.
import numpy as np
# Given intrinsic
K = np.array([ [9.32545185e+02, 0.00000000e+00, 1.10520066e+03],
[0.00000000e+00, 9.32545185e+02, 4.84232068e+02],
[0.00000000e+00, 0.00000000e+00, 1.00000000e+00]], dtype=np.float32)
# Given extrinsic
R = np.array([[ 0.753345, 0.657275, 0.021486],
[-0.074001, 0.052263, 0.995888],
[ 0.653449, -0.751837, 0.088011]], dtype=np.float32)
t = np.array([[-9862.566594],
[ 1645.370521],
[13956.835683]], dtype=np.float32)
# Find a matrix that maps from World to Cam
world2cam = np.hstack((R, t))
world2cam = np.vstack([world2cam, np.array([0, 0, 0, 1], dtype=np.float32)])
# Compute the projection matrix
K_h = np.hstack([K, np.zeros((3, 1), dtype=np.float32)])
P = np.dot(K_h, world2cam)
Next, I would like to evaluate SV3DT on a video, so I use deepstream-app
. I modify the config_tracker_NvDCF_max_perf.yml
StateEstimator:
stateEstimatorType: 3 # the type of state estimator among { DUMMY=0, SIMPLE=1, REGULAR=2 }
...
ObjectModelProjection:
cameraModelFilepath: # camera calibration file for each stream
- camLeftInfo.yml
outputVisibility: 1 # output visibility by occlusion
outputFootLocation: 1 # output foot location estimated from 3D model
outputConvexHull: 1 # output convex hull for each object estimated from 3D cylinder model
projectionMatrix_3x4:
- 1424.720302
- -217.99179
- 117.305913
- 6227815.536202
- 247.411798
- -315.325942
- 971.32802
- 8292729.559499
- 0.653449
- -0.751837
- 0.088011
- 13956.835683
# the height and radius of the cylinder model
modelInfo:
height: 205
radius: 33
The blue dot on the frame_1000_viz
is projected from a 3D point, and it is very close to the intersection of 2 green lines that shows the projection matrix is correct.
I define origin of the World coordinates: Oxyz
, x
and y
are correct, but I am not sure about z
.