Highlights
First beta of NCore 20: APIs are expected to be stable for 20.0. Install with pip install --pre nvidia-ncore or nvidia-ncore==20.0.0b1. Compared to NCore 19.8 (details in the alpha.1 and alpha.2 release notes):
- zarr-python 3 support (zarr-python 2 remains supported), and component stores in zarr format v3 (
zarr_format=3, opt-in; v2 stays the default). - Faster reads: 1.7x to 5.5x faster frame reads of local
.itararchives. - Asynchronous APIs:
*_asyncreads of all component readers and of the compat API (AsyncSequenceLoaderProtocol), and asynchronous opening of sequences (SequenceLoaderV4.open_async). - Remote storage:
.itarstores are opened with a single request, and exact range reads are available for synchronous reads as well (itar_remote_range_reads). - Memory: opened sequences only keep the decoded indices of their
.itarstores. - Camera / lidar ray validity: ray generation returns valid flags (new in this beta, see below).
New since v20.0.0-alpha.2: valid flags of camera and lidar rays
CameraModel.image_points_to_camera_rays/pixels_to_camera_raysreturn aCameraModel.CameraRaysReturnwith the camera rays and avalid_flag: a ray is valid if the model has a well-defined ray for the image point within its calibrated field of view (fisheye / FTheta: withinmax_angle, OpenCV pinhole: the undistortion converged, ideal pinhole: always). Invalid rays are undefined and need to be masked.- The world-ray unprojections forward the flag (
WorldRaysReturn.valid_flag), andcamera_rays_to_image_points/camera_rays_to_pixelsaccept aCameraRaysReturnand combine its flag with the projection's, e.g., theRectificatormarks pixels outside of the target's field of view invalid. - Structured lidar models return their rays' flags as well (
elements_to_sensor_rays,elements_to_sensor_points,LidarModel.WorldRaysReturn.valid_flag); all their rays are valid.
Upgrading from NCore 19.x
The public reader / writer APIs of components are unchanged. Code using the sensor models' ray generation, or NCore's APIs below the components (stores, zarr access), needs to be updated:
Sensor models (new in this beta)
CameraModel.image_points_to_camera_rays/pixels_to_camera_raysreturnCameraModel.CameraRaysReturninstead of a tensor (use.camera_rays, and mask with.valid_flag). Thecamera_rays=argument of theimage_points_to_world_rays_*/pixels_to_world_rays_*methods requires aCameraRaysReturn, andCameraModel.WorldRaysReturnhas a newvalid_flagfield. Camera models implementing_image_points_to_camera_rays_implneed to return aCameraRaysReturn.StructuredLidarModel.elements_to_sensor_raysreturnsLidarModel.SensorRaysReturn(use.sensor_rays), andelements_to_sensor_pointsreturnsLidarModel.SensorPointsReturn(use.sensor_points). Thesensor_rays=argument ofelements_to_world_rays_shutter_poserequires aSensorRaysReturn, andLidarModel.WorldRaysReturnhas a newvalid_flagfield.LidarModel.SensorRayReturnis renamed toLidarModel.SensorRaysReturn.OpenCVFisheyeCameraModel's inverse converges for calibrations where it previously didn't;newton_iterationsis an upper bound (default 20 instead of 3).
Data APIs below the components (since alpha.1)
IndexedTarStoreis replaced byitar.IndexedTarArchive(records of an archive, independent of zarr-python) andstores.IndexedTarZarrStore(a zarr hierarchy in an archive). Other zarr-python stores are used viastores.ZarrStoreAdapter(e.g.,ZarrStoreAdapter.directory(path)).stores.consolidate_compressed_metadata/open_compressed_consolidatedare replaced byStore.consolidate()/Store.open_root_group().- Component readers / writers access their data via
nodes.Group/nodes.Array(self._group), the wrapped zarr-python objects via.zarr. Array reads return read-only arrays. JsonLikemoved fromncore.impl.data.typestoncore.impl.data.json_types; documents to write are typed asJsonDocumentLike, values as read asJson/JsonDocument.BaseDataConverterConfigrequireszarr_format.- Node metadata records of
.itararchives are appended when closing the archive, so archives are no longer byte-identical to archives written by NCore 19.8 (their records are; NCore 19.8 reads them).
Behavior changes (since alpha.2)
SequenceLoaderProtocol.query_camera_labelsreturns aSequenceinstead of aList.- Readers release the tail read of each
.itarstore once its hierarchy is opened from its consolidated metadata, so records near the end of the archives are read from storage when accessed (itar_index_tail_retention="keep"restores the previous behavior). - Readers no longer check
.itarpaths for existence before opening them; a missing archive still raisesFileNotFoundError, from reading its index.
Changes since v20.0.0-alpha.2
➕ Added
- BREAKING (sensors) return validity flags from structured lidar ray generation (05e6e86) - @janickm
- BREAKING (sensors) return validity flags from camera ray generation (e1b44a8) - @janickm
🔄 Changed
🧪 Tests
All changes since v19.8.0
➕ Added
- BREAKING (sensors) return validity flags from structured lidar ray generation (05e6e86) - @janickm
- BREAKING (sensors) return validity flags from camera ray generation (e1b44a8) - @janickm
- (data) open sequences asynchronously (dfe3729) - @janickm
- (data) asynchronous reads of SequenceLoaderV4 (d49ca46) - @janickm
- (data) asynchronous compat protocols (d97b7ce) - @janickm
- (data) range reads of remote archives for synchronous reads (1880cb6) - @janickm
- (data) asynchronous component reader API (f67caa3) - @janickm
- BREAKING (data) zarr format v3 stores (c5fce26) - @janickm
- BREAKING (data) support zarr-python 3 (2cee604) - @janickm
- BREAKING (data) typed node API for component groups (ff2eeb0) - @janickm
🪲 Fixed
- (sensors) apply the converged Newton step in the bracketed fisheye inverse (16d2f65) - @janickm
- (sensors) bracket the OpenCV fisheye inverse to the monotonic branch (71a0602) - @janickm
- (data) read single poses with their stored dtype (1de0192) - @janickm
- type narrowing in ncore_export_ply and the argoverse2 converter test (348262a) - @janickm
- (kitti) keep lidar point timestamps integer (5bf8f9f) - @janickm
⚡ Performance
- (data) release index tail reads of opened archives (10c2609) - @janickm
- (data) open remote indexed tar archives with a single request (f57784c) - @janickm
- (data) direct chunk reads with zarr-python 3 (979882a) - @janickm
- (data) node cache for component readers (0d6c43d) - @janickm
- (data) cache decoded label types and schemas in CameraLabelDescriptor.from_dict (1813046) - @janickm
- (data) load label and point-cloud reader data on first use (fe6eaf2) - @janickm
🔄 Changed
- (sensors) construct sensor return types through their defining class (e7c26c3) - @janickm
- (data) restructure IndexedTarArchive (fd9a4f0) - @janickm
- BREAKING (data) implement IndexedTarArchive independently of zarr-python (cd3078f) - @janickm
⚙️ CI
- release notes tool in Python, commit check in build-and-test (069aee8) - @janickm
- separate the changes since the previous pre-release in release notes (3c48a54) - @janickm
- publish the documentation built by build-and-test (ed2d016) - @janickm
- refresh the Bazel disk cache on every push (09a3665) - @janickm
- remove merge queue triggers (3f52089) - @janickm
- write release notes into the release commit body (ccc650a) - @janickm
- release from main and release branches when the version changes (e8aba41) - @janickm
🏗️ Build
- pinned cocogitto via rules_multitool (e5ca2c9) - @janickm
- don't compress the repacked patched torch wheel (dc91c12) - @janickm
- add python 3.12 / 3.13 test environments (5b5fc02) - @janickm
🎨 Style
🧪 Tests
- (sensors) check camera ray valid flags in the unprojection tests (22db77d) - @janickm
- (sensors) share the lidar model between tests of a parameterization (c490c63) - @janickm
- run tests with a single OpenMP thread (2d4263f) - @janickm
- make tests independent of scipy / numpy versions (f2d59b0) - @janickm
Changes since v20.0.0-alpha.2: v20.0.0-alpha.2...v20.0.0-beta.1
Full diff: v19.8.0...v20.0.0-beta.1