microsoft / Azure-Kinect-Sensor-SDK

A cross platform (Linux and Windows) user mode SDK to read data from your Azure Kinect device.
https://Azure.com/Kinect
MIT License
1.5k stars 619 forks source link

Camera display and Body tracking rate dropped after installing SDK 0.9.5 #981

Closed soocheolyoon closed 4 years ago

soocheolyoon commented 4 years ago

Describe the bug

Hi I was using SDK 0.9.2. Simple modified simple_3d_viewer example to extract joint information to csv for every image capture from the camera while displaying in window_controller_3d in real time. In 0.9.2, mean rate for joint detection is about 18 counts/s . I didn't change camera configuration, so it must be K4A_DEPTH_MODE_NFOV_UNBINNED 30fps.

Recently I updated to SDK 0.9.5, and download samples for 0.9.5 . Again using simple_3d_viewer, by default, so it must be K4A_DEPTH_MODE_NFOV_UNBINNED 30fps, the rate dropped to 5-6 counts/s. and I can see that image capture rate itself decreased to those levels. I tested other options with manual input of "deviceConfig.camera_fps = K4A_FRAMES_PER_SECOND_30;" - K4A_DEPTH_MODE_NFOV_2X2BINNED : 18 counts/s K4A_DEPTH_MODE_NFOV_UNBINNED : 5-6 counts/s K4A_DEPTH_MODE_WFOV_2X2BINNED : 5-6 counts/s K4A_DEPTH_MODE_WFOV_UNBINNED : the viewer failed to start

To Reproduce

Just add body tracking counter to sample code. Change device configuration, and run.

Expected behavior

18 counts / s for all options.

Logs

Screenshots

Desktop (please complete the following information):

and I'm using i7-8850H 32GB ram, and RTX2080 6GB Additional context

wes-b commented 4 years ago

Can you confirm you are building a retail/release build? There are performance issues with debug builds.

yijiew commented 4 years ago

@soocheolyoon : 18 FPS to 5 FPS seems to be a drastic slow down, especially for your high-end GPU. We did a performance comparison between the 0.9.5 SDK vs. 0.9.2. The performance was very similar. As @wes-b mentioned, could you check whether the build setting is the same between your two builds? If so, it would be great if you could share your binaries for us to further debug.

soocheolyoon commented 4 years ago

@wes-b @yijiew : wow Thanks a lot. I missed to check that. After I fixed to release mode, the results are even better than before (as it supposed to be)- K4A_DEPTH_MODE_NFOV_2X2BINNED : 30 counts/s K4A_DEPTH_MODE_NFOV_UNBINNED : 20-30 counts/s K4A_DEPTH_MODE_WFOV_2X2BINNED : 29-30 counts/s

Thank you for help!

@yijiew : It was Release mode when I was using SDK 0.9.2.