Skip to content

test(nuscenes): update camera intrinsics test for ideal pinhole model#151

Merged
janickm merged 1 commit into
NVIDIA:mainfrom
janickm:fix/nuscenes-camera-ideal-pinhole-test
Jun 14, 2026
Merged

test(nuscenes): update camera intrinsics test for ideal pinhole model#151
janickm merged 1 commit into
NVIDIA:mainfrom
janickm:fix/nuscenes-camera-ideal-pinhole-test

Conversation

@janickm

@janickm janickm commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

tools/data_converter/nuscenes/converter_test.py::test_camera_intrinsics_zero_distortion fails on the current converter output:

AssertionError: IdealPinholeCameraModelParameters(...) is not an instance of
<class 'ncore.impl.data.types.OpenCVPinholeCameraModelParameters'>

The nuScenes converter was changed to store camera intrinsics as IdealPinholeCameraModelParameters (distortion-free) instead of OpenCVPinholeCameraModelParameters, but the test still asserted the OpenCV type and inspected its radial_coeffs / tangential_coeffs. The test was not updated alongside that converter change.

Fix

Update the test (renamed to test_camera_intrinsics_ideal_pinhole) to:

  • assert the IdealPinholeCameraModelParameters type the converter now emits, and
  • validate focal_length and principal_point instead of distortion coefficients (an ideal pinhole is distortion-free by construction, so there are none to check).

Validation

NUSCENES_DIR=... bazel test //tools/data_converter/nuscenes:pytest_converter_3_11 passes (the full converter integration suite, both itar and directory store types).

This is split out from the lidar-model fix (#148) since it is an independent, pre-existing test/converter inconsistency.

The nuScenes converter was changed to store camera intrinsics as
IdealPinholeCameraModelParameters (distortion-free) instead of
OpenCVPinholeCameraModelParameters, but test_camera_intrinsics_zero_distortion
still asserted the OpenCV type and inspected its radial/tangential distortion
coefficients. The test therefore failed on the current converter output.

Update the test (renamed to test_camera_intrinsics_ideal_pinhole) to assert the
IdealPinholeCameraModelParameters type and validate focal length and principal
point; an ideal pinhole is distortion-free by construction so there are no
distortion coefficients to check.
@janickm janickm added this pull request to the merge queue Jun 14, 2026
Merged via the queue into NVIDIA:main with commit f09d7c0 Jun 14, 2026
5 checks passed
@janickm janickm deleted the fix/nuscenes-camera-ideal-pinhole-test branch June 14, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant