Driveworks-4.0: Object Detector tracker sample not working

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
1.9.1.10844
other

Host Machine Version
native Ubuntu 18.04
other

Hello,

We connected a Sekonix SF3325-100 camera to the drive agx xavier and tried to run the sample for object detector and tracker

However we were unable to obtain any output from the camera
We get an error

Driveworks exception thrown: DW_INVALID_ARGUMENT: FeatureDetectorEx::generateMask: cell size too small! Either increase cell size, or disable mask adjustment.

Please find the detailed log below

nvidia@tegra-ubuntu:/usr/local/driveworks-4.0/bin$ ./sample_object_detector_tracker --input-type=camera 
[31-08-2023 00:53:42] Platform: Detected DDPX - Tegra A
[31-08-2023 00:53:42] TimeSource: monotonic epoch time offset is 1693435606846193
[31-08-2023 00:53:42] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to eth0
[31-08-2023 00:53:42] TimeSource Eth: Lost PTP time synchronizaton. Synchronized time will not be available from this timesource.
[31-08-2023 00:53:42] TimeSource: Could not detect valid PTP time source at 'eth0'. Fallback to CLOCK_MONOTONIC.
[31-08-2023 00:53:42] Platform: number of GPU devices detected 1
[31-08-2023 00:53:42] Platform: currently selected GPU device integrated ID 0
[31-08-2023 00:53:42] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-4.0/bin/data/': VirtualFileSystem: Failed to mount '/usr/local/driveworks-4.0/bin/data/[.pak]'
[31-08-2023 00:53:42] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-4.0/bin/../data
[31-08-2023 00:53:42] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-4.0/bin/../data/': VirtualFileSystem: Failed to mount '/usr/local/driveworks-4.0/bin/../data/[.pak]'
[31-08-2023 00:53:42] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-4.0/data
[31-08-2023 00:53:42] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-4.0/data/': VirtualFileSystem: Failed to mount '/usr/local/driveworks-4.0/data/[.pak]'
[31-08-2023 00:53:42] SDK: No resources(.pak) mounted, some modules will not function properly
[31-08-2023 00:53:42] SDK: Create NvMediaDevice
[31-08-2023 00:53:42] SDK: Create NvMedia2D
[31-08-2023 00:53:42] SDK: use EGL display as provided
[31-08-2023 00:53:42] TimeSource: monotonic epoch time offset is 1693435606846192
[31-08-2023 00:53:42] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to eth0
[31-08-2023 00:53:42] TimeSource Eth: Lost PTP time synchronizaton. Synchronized time will not be available from this timesource.
[31-08-2023 00:53:42] TimeSource: Could not detect valid PTP time source at 'eth0'. Fallback to CLOCK_MONOTONIC.
[31-08-2023 00:53:42] Initialize DriveWorks SDK v4.0.0
[31-08-2023 00:53:42] Release build with GNU 7.3.1 from no-gitversion-build against Drive PDK v5.2.6.0
[31-08-2023 00:53:42] Initialize DriveWorks VisualizationSDK v4.0.0
[31-08-2023 00:53:42] Initialize DriveWorksGL SDK v4.0.0
[31-08-2023 00:53:43] SensorFactory::createSensor() -> camera.gmsl, camera-type=ar0231-rccb-bae-sf3324,camera-group=a,slave=0,serialize=false,camera-count=4,camera-mask=0001
[31-08-2023 00:53:43] CameraGMSLSelector: cameraCount is a deprecated parameter, please remove as it has no more effect
[31-08-2023 00:53:43] CameraGMSLSelector: camera-mask is a deprecated parameter, please remove from your rig and replace with parameter link
[31-08-2023 00:53:43] CameraGMSLSelector: camera-mask 0001 was automatically translated to link 0. Note that it will be overridden by parameter link if present
[31-08-2023 00:53:43] CameraGMSLSelector: missing siblingIndex to be able to map to new camera.gmsl parameter called link, assuming link 0
[31-08-2023 00:53:43] CameraGMSLSelector: creating CameraClient from remapped old gmsl parameters to camera-type=ar0231-rccb-bae-sf3324,camera-group=a,slave=0,serialize=false,camera-count=4,camera-mask=0001,camera-name=SF3324,interface=csi-ab,link=0
[31-08-2023 00:53:43] CameraGMSLSelector: missing 'output-format=processed/yuv' in the sensor parameters, frames might be captured with bad sensor settings(AE/AWB) and reprocess may result image quality issues
[31-08-2023 00:53:43] CameraBase: pool size set to 8
[31-08-2023 00:53:43] SensorFactory::createSensor() -> camera.gmsl.master, 
[31-08-2023 00:53:43] CameraMaster::parseDevBlock Getting device info list.
[31-08-2023 00:53:43] devBlock: 1 Slave = 0 Interface = csi-ab Camera_name = SF3324 Link = 0
[31-08-2023 00:53:43] Camera Match Name: SF3324 Description: Sekonix SF3324 module - 120-deg FOV, DVP AR0231-RCCB, MAX96705 linkIndex: 4294967295 serInfo.Name: MAX96705
[31-08-2023 00:53:43] Client, Setting up information for camera ID 0
[31-08-2023 00:53:43] Client, successfully found info for camera ID 0 bound to id 0
[31-08-2023 00:53:43] CameraClient: no NITO found at /opt/nvidia/nvmedia/nit/SF3324.nito
[31-08-2023 00:53:43] CameraClient: using NITO found at /opt/nvidia/nvmedia/nit/sf3324.nito
SimpleCamera: Camera image: 1920x1208
Camera image with 1920x1208 at 30 FPS
[31-08-2023 00:53:43] StreamConsumerGL: successfully initialized
[31-08-2023 00:53:43] StreamProducerCUDA: successfully initialized
[31-08-2023 00:53:45] Loaded engine size: 45 MB
[31-08-2023 00:53:45] [MemUsageSnapshot] deserializeCudaEngine begin: CPU 335 MB, GPU 3550 MB
[31-08-2023 00:53:49] [MemUsageChange] Init cuDNN: CPU +923, GPU +998, now: CPU 1258, GPU 4549 (MB)
[31-08-2023 00:53:50] [MemUsageChange] Init cuBlas: CPU +227, GPU +228, now: CPU 1485, GPU 4777 (MB)
[31-08-2023 00:53:50] Deserialize required 5081603 microseconds.
[31-08-2023 00:53:50] [MemUsageSnapshot] deserializeCudaEngine end: CPU 1484 MB, GPU 4777 MB
[31-08-2023 00:53:50] [MemUsageChange] Init cuDNN: CPU +0, GPU +0, now: CPU 1484, GPU 4777 (MB)
[31-08-2023 00:53:50] [MemUsageChange] Init cuBlas: CPU +1, GPU +0, now: CPU 1485, GPU 4777 (MB)
[31-08-2023 00:53:50] DNN: Missing or incompatible parameter in metadata (tonemapType). Parameter is set to default value. See dwDataConditioner for default values. 
[31-08-2023 00:53:50] DataConditioner: Scale transformation has been configured with 1.0000000.
[31-08-2023 00:53:50] DataConditioner: Mean value subtract transformation has been configured with {0.00000, 0.00000, 0.00000}.
[31-08-2023 00:53:50] DataConditioner: Standard deviation has been configured with {1.00000, 1.00000, 1.00000}.
[31-08-2023 00:53:50] Driveworks exception thrown: DW_INVALID_ARGUMENT: FeatureDetectorEx::generateMask: cell size too small! Either increase cell size, or disable mask adjustment.

terminate called after throwing an instance of 'std::runtime_error'
  what():  [2023-08-31 00:53:50] DW Error DW_INVALID_ARGUMENT executing DW function:
 dwFeature2DDetector_initialize(&m_featureDetector, &featureDetectorConfig, m_cudaStream, m_sdk)
 at samples/dnn/sample_object_detector_tracker/main.cpp:341
Aborted (core dumped)

Please could you kindly support us on resolving this issue?

Best regards,
Roshan

1 Like

Dear @roshan.shenoy,
Per log, the sample assuming SF3324 camera . Please check using --camera-type param as well.

1 Like

I just made a quick check with the following command

./sample_object_detector_tracker --input-type=camera --camera-type=ar0231-rccb-bae-sf3325

I still get the same error

nvidia@tegra-ubuntu:/usr/local/driveworks-4.0/bin$ ./sample_object_detector_tracker --input-type=camera --camera-type=ar0231-rccb-bae-sf3325
[31-08-2023 01:57:51] Platform: Detected DDPX - Tegra A
[31-08-2023 01:57:51] TimeSource: monotonic epoch time offset is 1693435606846192
[31-08-2023 01:57:51] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to eth0
[31-08-2023 01:57:51] TimeSource Eth: Lost PTP time synchronizaton. Synchronized time will not be available from this timesource.
[31-08-2023 01:57:51] TimeSource: Could not detect valid PTP time source at 'eth0'. Fallback to CLOCK_MONOTONIC.
[31-08-2023 01:57:51] Platform: number of GPU devices detected 1
[31-08-2023 01:57:51] Platform: currently selected GPU device integrated ID 0
[31-08-2023 01:57:51] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-4.0/bin/data/': VirtualFileSystem: Failed to mount '/usr/local/driveworks-4.0/bin/data/[.pak]'
[31-08-2023 01:57:51] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-4.0/bin/../data
[31-08-2023 01:57:51] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-4.0/bin/../data/': VirtualFileSystem: Failed to mount '/usr/local/driveworks-4.0/bin/../data/[.pak]'
[31-08-2023 01:57:51] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-4.0/data
[31-08-2023 01:57:51] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-4.0/data/': VirtualFileSystem: Failed to mount '/usr/local/driveworks-4.0/data/[.pak]'
[31-08-2023 01:57:51] SDK: No resources(.pak) mounted, some modules will not function properly
[31-08-2023 01:57:51] SDK: Create NvMediaDevice
[31-08-2023 01:57:51] SDK: Create NvMedia2D
[31-08-2023 01:57:51] SDK: use EGL display as provided
[31-08-2023 01:57:52] TimeSource: monotonic epoch time offset is 1693435606846193
[31-08-2023 01:57:52] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to eth0
[31-08-2023 01:57:52] TimeSource Eth: Lost PTP time synchronizaton. Synchronized time will not be available from this timesource.
[31-08-2023 01:57:52] TimeSource: Could not detect valid PTP time source at 'eth0'. Fallback to CLOCK_MONOTONIC.
[31-08-2023 01:57:52] Initialize DriveWorks SDK v4.0.0
[31-08-2023 01:57:52] Release build with GNU 7.3.1 from no-gitversion-build against Drive PDK v5.2.6.0
[31-08-2023 01:57:52] Initialize DriveWorks VisualizationSDK v4.0.0
[31-08-2023 01:57:52] Initialize DriveWorksGL SDK v4.0.0
[31-08-2023 01:57:52] SensorFactory::createSensor() -> camera.gmsl, camera-type=ar0231-rccb-bae-sf3325,camera-group=a,slave=0,serialize=false,camera-count=4,camera-mask=0001
[31-08-2023 01:57:52] CameraGMSLSelector: cameraCount is a deprecated parameter, please remove as it has no more effect
[31-08-2023 01:57:52] CameraGMSLSelector: camera-mask is a deprecated parameter, please remove from your rig and replace with parameter link
[31-08-2023 01:57:52] CameraGMSLSelector: camera-mask 0001 was automatically translated to link 0. Note that it will be overridden by parameter link if present
[31-08-2023 01:57:52] CameraGMSLSelector: missing siblingIndex to be able to map to new camera.gmsl parameter called link, assuming link 0
[31-08-2023 01:57:52] CameraGMSLSelector: creating CameraClient from remapped old gmsl parameters to camera-type=ar0231-rccb-bae-sf3325,camera-group=a,slave=0,serialize=false,camera-count=4,camera-mask=0001,camera-name=SF3325,interface=csi-ab,link=0
[31-08-2023 01:57:52] CameraGMSLSelector: missing 'output-format=processed/yuv' in the sensor parameters, frames might be captured with bad sensor settings(AE/AWB) and reprocess may result image quality issues
[31-08-2023 01:57:52] CameraBase: pool size set to 8
[31-08-2023 01:57:52] SensorFactory::createSensor() -> camera.gmsl.master, 
[31-08-2023 01:57:52] CameraMaster::parseDevBlock Getting device info list.
[31-08-2023 01:57:52] devBlock: 1 Slave = 0 Interface = csi-ab Camera_name = SF3325 Link = 0
[31-08-2023 01:57:52] Camera Match Name: SF3325 Description: Sekonix SF3325 module - 60-deg FOV, DVP AR0231-RCCB, MAX96705 linkIndex: 4294967295 serInfo.Name: MAX96705
[31-08-2023 01:57:52] Client, Setting up information for camera ID 0
[31-08-2023 01:57:52] Client, successfully found info for camera ID 0 bound to id 0
[31-08-2023 01:57:52] CameraClient: no NITO found at /opt/nvidia/nvmedia/nit/SF3325.nito
[31-08-2023 01:57:52] CameraClient: using NITO found at /opt/nvidia/nvmedia/nit/sf3325.nito
SimpleCamera: Camera image: 1920x1208
Camera image with 1920x1208 at 30 FPS
[31-08-2023 01:57:52] StreamConsumerGL: successfully initialized
[31-08-2023 01:57:52] StreamProducerCUDA: successfully initialized
[31-08-2023 01:57:54] Loaded engine size: 45 MB
[31-08-2023 01:57:54] [MemUsageSnapshot] deserializeCudaEngine begin: CPU 345 MB, GPU 3863 MB
[31-08-2023 01:57:58] [MemUsageChange] Init cuDNN: CPU +955, GPU +1002, now: CPU 1300, GPU 4865 (MB)
[31-08-2023 01:57:59] [MemUsageChange] Init cuBlas: CPU +226, GPU +224, now: CPU 1526, GPU 5089 (MB)
[31-08-2023 01:57:59] Deserialize required 5069489 microseconds.
[31-08-2023 01:57:59] [MemUsageSnapshot] deserializeCudaEngine end: CPU 1526 MB, GPU 5089 MB
[31-08-2023 01:57:59] [MemUsageChange] Init cuDNN: CPU +0, GPU +0, now: CPU 1526, GPU 5089 (MB)
[31-08-2023 01:57:59] [MemUsageChange] Init cuBlas: CPU +0, GPU +0, now: CPU 1526, GPU 5089 (MB)
[31-08-2023 01:57:59] DNN: Missing or incompatible parameter in metadata (tonemapType). Parameter is set to default value. See dwDataConditioner for default values. 
[31-08-2023 01:57:59] DataConditioner: Scale transformation has been configured with 1.0000000.
[31-08-2023 01:57:59] DataConditioner: Mean value subtract transformation has been configured with {0.00000, 0.00000, 0.00000}.
[31-08-2023 01:57:59] DataConditioner: Standard deviation has been configured with {1.00000, 1.00000, 1.00000}.
[31-08-2023 01:57:59] Driveworks exception thrown: DW_INVALID_ARGUMENT: FeatureDetectorEx::generateMask: cell size too small! Either increase cell size, or disable mask adjustment.

terminate called after throwing an instance of 'std::runtime_error'
  what():  [2023-08-31 01:57:59] DW Error DW_INVALID_ARGUMENT executing DW function:
 dwFeature2DDetector_initialize(&m_featureDetector, &featureDetectorConfig, m_cudaStream, m_sdk)
 at samples/dnn/sample_object_detector_tracker/main.cpp:341
Aborted (core dumped)

Best regards,
Roshan

1 Like

Also, when running the sample_object_detector_tracker with the default video,
we observe a warning

FeatureDetectorEx::generateMask: some cell has 0 features assigned. For better coverage, increase maxFeatureCount or switch to use UNIFORM mask

Please refer to the detailed log below

nvidia@tegra-ubuntu:/usr/local/driveworks-4.0/bin$ ./sample_object_detector_tracker
[31-08-2023 02:54:04] Platform: Detected DDPX - Tegra A
[31-08-2023 02:54:04] TimeSource: monotonic epoch time offset is 1693435606846193
[31-08-2023 02:54:04] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to eth0
[31-08-2023 02:54:04] TimeSource Eth: Lost PTP time synchronizaton. Synchronized time will not be available from this timesource.
[31-08-2023 02:54:04] TimeSource: Could not detect valid PTP time source at 'eth0'. Fallback to CLOCK_MONOTONIC.
[31-08-2023 02:54:04] Platform: number of GPU devices detected 1
[31-08-2023 02:54:04] Platform: currently selected GPU device integrated ID 0
[31-08-2023 02:54:04] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-4.0/bin/data/': VirtualFileSystem: Failed to mount '/usr/local/driveworks-4.0/bin/data/[.pak]'
[31-08-2023 02:54:04] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-4.0/bin/../data
[31-08-2023 02:54:04] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-4.0/bin/../data/': VirtualFileSystem: Failed to mount '/usr/local/driveworks-4.0/bin/../data/[.pak]'
[31-08-2023 02:54:04] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-4.0/data
[31-08-2023 02:54:04] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-4.0/data/': VirtualFileSystem: Failed to mount '/usr/local/driveworks-4.0/data/[.pak]'
[31-08-2023 02:54:04] SDK: No resources(.pak) mounted, some modules will not function properly
[31-08-2023 02:54:04] SDK: Create NvMediaDevice
[31-08-2023 02:54:04] SDK: Create NvMedia2D
[31-08-2023 02:54:04] SDK: use EGL display as provided
[31-08-2023 02:54:04] TimeSource: monotonic epoch time offset is 1693435606846193
[31-08-2023 02:54:04] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to eth0
[31-08-2023 02:54:04] TimeSource Eth: Lost PTP time synchronizaton. Synchronized time will not be available from this timesource.
[31-08-2023 02:54:04] TimeSource: Could not detect valid PTP time source at 'eth0'. Fallback to CLOCK_MONOTONIC.
[31-08-2023 02:54:04] Initialize DriveWorks SDK v4.0.0
[31-08-2023 02:54:04] Release build with GNU 7.3.1 from no-gitversion-build against Drive PDK v5.2.6.0
[31-08-2023 02:54:04] Initialize DriveWorks VisualizationSDK v4.0.0
[31-08-2023 02:54:04] Initialize DriveWorksGL SDK v4.0.0
[31-08-2023 02:54:04] SensorFactory::createSensor() -> camera.virtual, camera-group=a,camera-index=0,camera-type=ar0231-rccb-bae-sf3324,input-type=video,offscreen=0,profiling=1,slave=0,tensorRT_model=,video=/usr/local/driveworks-4.0/data/samples/sfm/triangulation/video_0.h264
[31-08-2023 02:54:04] CameraVirtual: defaulting to non SIPL
[31-08-2023 02:54:04] CameraBase: pool size set to 8
[31-08-2023 02:54:04] DecoderNvMedia: the format of the decoder YUV420 planar will be replaced with yuv420 semiplanar in the next release
[31-08-2023 02:54:04] CameraVirtualNvMedia: no seek table found at /usr/local/driveworks-4.0/data/samples/sfm/triangulation/video_0.h264.seek, seeking is not available.
SimpleCamera: Camera image: 1280x800
Camera image with 1280x800 at 30 FPS
[31-08-2023 02:54:04] StreamConsumerGL: successfully initialized
[31-08-2023 02:54:04] StreamProducerCUDA: successfully initialized
[31-08-2023 02:54:06] Loaded engine size: 45 MB
[31-08-2023 02:54:06] [MemUsageSnapshot] deserializeCudaEngine begin: CPU 330 MB, GPU 3971 MB
[31-08-2023 02:54:10] [MemUsageChange] Init cuDNN: CPU +968, GPU +999, now: CPU 1298, GPU 4970 (MB)
[31-08-2023 02:54:11] [MemUsageChange] Init cuBlas: CPU +227, GPU +229, now: CPU 1525, GPU 5199 (MB)
[31-08-2023 02:54:11] Deserialize required 5153303 microseconds.
[31-08-2023 02:54:11] [MemUsageSnapshot] deserializeCudaEngine end: CPU 1524 MB, GPU 5199 MB
[31-08-2023 02:54:11] [MemUsageChange] Init cuDNN: CPU +0, GPU +0, now: CPU 1524, GPU 5199 (MB)
[31-08-2023 02:54:11] [MemUsageChange] Init cuBlas: CPU +1, GPU +0, now: CPU 1525, GPU 5199 (MB)
[31-08-2023 02:54:11] DNN: Missing or incompatible parameter in metadata (tonemapType). Parameter is set to default value. See dwDataConditioner for default values. 
[31-08-2023 02:54:11] DataConditioner: Scale transformation has been configured with 1.0000000.
[31-08-2023 02:54:11] DataConditioner: Mean value subtract transformation has been configured with {0.00000, 0.00000, 0.00000}.
[31-08-2023 02:54:11] DataConditioner: Standard deviation has been configured with {1.00000, 1.00000, 1.00000}.
[31-08-2023 02:54:11] 1
[31-08-2023 02:54:11] FeatureDetectorEx::generateMask: some cell has 0 features assigned. For better coverage, increase maxFeatureCount or switch to use UNIFORM mask
[31-08-2023 02:54:11] box 0 is added to the tracker
[31-08-2023 02:54:11] bounding boxes have ambiguous overlaps
[31-08-2023 02:54:12] box 1 is added to the tracker
[31-08-2023 02:54:12] bounding boxes have ambiguous overlaps
[31-08-2023 02:54:12] lifespan is reached, box 1 ended 10 frames tracking
[31-08-2023 02:54:12] bounding boxes have ambiguous overlaps
[31-08-2023 02:54:13] bounding boxes have ambiguous overlaps
[31-08-2023 02:54:13] lifespan is reached, box 0 ended 49 frames tracking
[31-08-2023 02:54:13] box 2 is added to the tracker
[31-08-2023 02:54:14] lifespan is reached, box 2 ended 10 frames tracking
[31-08-2023 02:54:14] box 3 is added to the tracker
[31-08-2023 02:54:14] bounding boxes have ambiguous overlaps
[31-08-2023 02:54:15] box 3 will exit the scene
[31-08-2023 02:54:15] bounding boxes have ambiguous overlaps
[31-08-2023 02:54:15] box 3 will exit the scene
[31-08-2023 02:54:15] box 3 will exit the scene
[31-08-2023 02:54:15] box 3 will exit the scene
[31-08-2023 02:54:15] box 3 will exit the scene
[31-08-2023 02:54:15] lifespan is reached, box 3 ended 19 frames tracking
[31-08-2023 02:54:16] box 4 is added to the tracker
[31-08-2023 02:54:16] lifespan is reached, box 4 ended 10 frames tracking
[31-08-2023 02:54:16] box 5 is added to the tracker
[31-08-2023 02:54:17] lifespan is reached, box 5 ended 13 frames tracking
[31-08-2023 02:54:19] box 6 is added to the tracker
[31-08-2023 02:54:19] box 7 is added to the tracker
[31-08-2023 02:54:19] lifespan is reached, box 6 ended 19 frames tracking
[31-08-2023 02:54:19] box 8 is added to the tracker
[31-08-2023 02:54:20] lifespan is reached, box 7 ended 10 frames tracking
[31-08-2023 02:54:20] box 8 will exit the scene
[31-08-2023 02:54:20] lifespan is reached, box 8 ended 20 frames tracking
[31-08-2023 02:54:21] box 9 is added to the tracker
[31-08-2023 02:54:22] box 10 is added to the tracker
[31-08-2023 02:54:22] box 9 will exit the scene
[31-08-2023 02:54:22] box 9 will exit the scene
[31-08-2023 02:54:22] box 10 will exit the scene
[31-08-2023 02:54:22] box 9 will exit the scene
[31-08-2023 02:54:22] box 10 will exit the scene
[31-08-2023 02:54:22] lifespan is reached, box 9 ended 40 frames tracking
[31-08-2023 02:54:22] box 10 will exit the scene
[31-08-2023 02:54:22] box 10 will exit the scene
[31-08-2023 02:54:22] lifespan is reached, box 10 ended 9 frames tracking
[31-08-2023 02:54:24] box 11 is added to the tracker
[31-08-2023 02:54:24] lifespan is reached, box 11 ended 12 frames tracking
[31-08-2023 02:54:25] box 12 is added to the tracker
[31-08-2023 02:54:25] lifespan is reached, box 12 ended 16 frames tracking
Timing results:
Thread main:
-onProcess                CPU: 35528us, std=2571       | GPU: 37107us, std=2415       | samples=393
-onRender                 CPU:   468us, std=1255       | GPU:     1us, std=1251       | samples=393

[31-08-2023 02:54:26] Sensor statistics for: camera.virtual, camera-group=a,camera-index=0,camera-type=ar0231-rccb-bae-sf3324,input-type=video,offscreen=0,profiling=1,slave=0,tensorRT_model=,video=/usr/local/driveworks-4.0/data/samples/sfm/triangulation/video_0.h264
[31-08-2023 02:54:26] Events: 0
Errors: 0
Drops: 0
minDelta: 33333.00000
maxDelta: 33334.00000
meanDelta: 33333.4609
Standard deviation: 0.4778
[31-08-2023 02:54:26] Driveworks VisualizationSDK released
[31-08-2023 02:54:26] Releasing Driveworks SDK Context
[31-08-2023 02:54:26] SDK: Release NvMediaDevice
[31-08-2023 02:54:26] DriveworksGL SDK released
[31-08-2023 02:54:26] SDK: Release NvMedia2D

Could you also please elaborate more here?

Best regards,
Roshan

1 Like

Dear @roshan.shenoy,
Could you check adding featureDetectorConfig.isMaskAdjustmentEnabled=false in onInitialize() to see if it helps to by pass the error?

1 Like

Hi @SivaRamaKrishnaNV
thanks for the response, I added here in the main.cpp file

        //------------------------------------------------------------------------------
        // Initialize Feature Tracker
        //------------------------------------------------------------------------------
        {
            m_maxFeatureCount = 4000;
            m_historyCapacity = 10;

            dwFeature2DDetectorConfig featureDetectorConfig{};
            CHECK_DW_ERROR(dwFeature2DDetector_initDefaultParams(&featureDetectorConfig));
            featureDetectorConfig.imageWidth      = m_imageWidth;
            featureDetectorConfig.imageHeight     = m_imageHeight;
            featureDetectorConfig.detectionLevel  = 0;
	    featureDetectorConfig.isMaskAdjustmentEnabled = false;
            featureDetectorConfig.maxFeatureCount = m_maxFeatureCount;
            CHECK_DW_ERROR(dwFeature2DDetector_initialize(&m_featureDetector, &featureDetectorConfig,
                                                          m_cudaStream, m_sdk));

            dwFeature2DTrackerConfig featureTrackerConfig{};
            CHECK_DW_ERROR(dwFeature2DTracker_initDefaultParams(&featureTrackerConfig));
            featureTrackerConfig.imageWidth      = m_imageWidth;
            featureTrackerConfig.imageHeight     = m_imageHeight;
            featureTrackerConfig.maxFeatureCount = m_maxFeatureCount;
            featureTrackerConfig.historyCapacity = m_historyCapacity;
            featureTrackerConfig.detectorType    = featureDetectorConfig.type;
            CHECK_DW_ERROR(dwFeature2DTracker_initialize(&m_featureTracker, &featureTrackerConfig,
                                                         m_cudaStream, m_sdk));

            // Tracker pyramid init
            CHECK_DW_ERROR(dwPyramid_create(&m_pyramidPrevious, 6, m_imageWidth,
                                            m_imageHeight, DW_TYPE_UINT8, m_sdk));
            CHECK_DW_ERROR(dwPyramid_create(&m_pyramidCurrent, 6, m_imageWidth,
                                            m_imageHeight, DW_TYPE_UINT8, m_sdk));


1 Like

You can add like below in featureDetector configuration setting step in OnIntialize() function.

dwFeature2DDetectorConfig featureDetectorConfig{};
            CHECK_DW_ERROR(dwFeature2DDetector_initDefaultParams(&featureDetectorConfig));
            featureDetectorConfig.imageWidth      = m_imageWidth;
            featureDetectorConfig.imageHeight     = m_imageHeight;
            featureDetectorConfig.detectionLevel  = 0;
            featureDetectorConfig.maxFeatureCount = m_maxFeatureCount;
featureDetectorConfig.isMaskAdjustmentEnabled=false

Dear @SivaRamaKrishnaNV ,

As suggested, we set featureDetectorConfig.isMaskAdjustmentEnabled = false; and cross-compiled the sample but now we get the following error

Driveworks exception thrown: DW_INVALID_ARGUMENT: FeatureDetectorEx::generateMask: invalid kernel parameters

Please could you provide us some insights and help us in solving the issue?

Best regards,
Roshan

Hello @SivaRamaKrishnaNV

Please could you give a short feedback on what else we can try at our end?

Dear @roshan.shenoy,
I would expect the sample to work with out any code change. Do you have any other camera module like SF3324?

Dear @SivaRamaKrishnaNV,

It works when i increase the cellsize to 68, but since the ROI is small, it does not detect moving objects,

Could you please let us know how we can increase the ROI in the source code?

With the video sample the ROI is large because of which the moving objects are detected, but in our case the moving objects are not detected, since the ROI is small in comparison to the video sample

I have a SF3325 with me, but without changing the cell size I get the error

Driveworks exception thrown: DW_INVALID_ARGUMENT: FeatureDetectorEx::generateMask: cell size too small! Either increase cell size, or disable mask adjustment.

Dear @SivaRamaKrishnaNV

Could you please let us know how we can increase the ROI in the source code?

Dear @SivaRamaKrishnaNV,

For ex. in the sample shown (Object tracker on a H.264 stream) in the below link, the yellow box is covering the entire image width
https://docs.nvidia.com/drive/driveworks-4.0/dwx_object_detector_tracker_sample.html

But in our case it is not covering the entire image width. Could you please let us know where we can change it within the source code?

Best regards,
Roshan

Dear @roshan.shenoy,
Could you check if the detection region is matching to values set in snippet in onInitialize()?

m_detectionRegion.width = std::min(static_cast<uint32_t>(m_networkInputDimensions.width),
                                               m_imageWidth);
            m_detectionRegion.height = std::min(static_cast<uint32_t>(m_networkInputDimensions.height),
                                                m_imageHeight);
            m_detectionRegion.x = (m_imageWidth - m_detectionRegion.width) / 2;
            m_detectionRegion.y = (m_imageHeight - m_detectionRegion.height) / 2;

Dear @SivaRamaKrishnaNV ,

I made a quick check, yes these values match with the one sent in the above snippet

          // Detection region
          m_detectionRegion.width = std::min(static_cast<uint32_t>(m_networkInputDimensions.width),
                                             m_imageWidth);
          m_detectionRegion.height = std::min(static_cast<uint32_t>(m_networkInputDimensions.height),
                                              m_imageHeight);
          m_detectionRegion.x = (m_imageWidth - m_detectionRegion.width) / 2;
          m_detectionRegion.y = (m_imageHeight - m_detectionRegion.height) / 2;
      }

Could you please let us know how we can increase our ROI width here?

Dear @roshan.shenoy,
You can change m_detectionRegion.width to update with.

m_detectionRegion is of dwRect struct. x, y denotes the upper left corner and height and width denotes the height and width of the rectangle.

Dear @SivaRamaKrishnaNV

Thanks for the suggestion

I changed the detection region to the required image width within main.cpp and cross-compiled it

But the ROI width has not increased

            // Detection region
            //m_detectionRegion.width = std::min(static_cast<uint32_t>(m_networkInputDimensions.width),  m_imageWidth);
	    m_detectionRegion.width = 1236;

Dear @SivaRamaKrishnaNV ,

Thanks a lot,

It works now,
I had to also set m_detectionRegion.x = 0.0;

Best regards,
Roshan

Dear @roshan.shenoy,
Glad to hear it worked. Can we close the topic?

Yes, thanks a lot

1 Like