ncore.data_converter Package#
Package containing common and abstract functionality to implement NCore data-converters
- class ncore.data_converter.BaseDataConverter(
- config: BaseDataConverterConfig,
Bases:
ABCBase preprocessing class used to preprocess AV datasets in a canonical representation as used in the Nvidia NCore project.
For adding a new dataset, please inherit this class, implement the required functions, and register a new CLI command.
The output data should follow the conventions defined in the conventions documentation.
Please use the facilities of the data writer modules, which simplifies adding new datasets.
- classmethod convert(
- config: BaseDataConverterConfig,
Main entry-point to perform conversion of all sequences
- abstractmethod convert_sequence(sequence_id: str) None#
Runs dataset-specific conversion for a sequence referenced by a sequence ID
- abstractmethod static from_config(
- config,
Return an instance of the data converter
- get_active_camera_ids( ) list[str]#
Returns config-specified subselection of active camera ids or all camera ids if no subselection was performed
- get_active_lidar_ids( ) list[str]#
Returns config-specified subselection of active lidar ids or all lidar ids if no subselection was performed
- class ncore.data_converter.BaseDataConverterConfig(
- *,
- output_dir: str,
- no_cameras: bool,
- camera_ids: Tuple[str, ...] | None,
- no_lidars: bool,
- lidar_ids: Tuple[str, ...] | None,
- no_radars: bool,
- radar_ids: Tuple[str, ...] | None,
- verbose: bool,
- debug: bool,
- debug_port: int,
Bases:
objectGeneric data converter parameters
- class ncore.data_converter.FileBasedDataConverter(
- config: FileBasedDataConverterConfig,
Bases:
BaseDataConverterBase class for converters that read source data from a local root directory.
Subclass this instead of
BaseDataConverterwhen the converter needsself.root_dir. Pair withFileBasedDataConverterConfig(or a subclass of it) to get early validation ofroot_dir.
- class ncore.data_converter.FileBasedDataConverterConfig(
- *,
- output_dir: str,
- no_cameras: bool,
- camera_ids: Tuple[str, ...] | None,
- no_lidars: bool,
- lidar_ids: Tuple[str, ...] | None,
- no_radars: bool,
- radar_ids: Tuple[str, ...] | None,
- verbose: bool,
- debug: bool,
- debug_port: int,
- root_dir: str,
Bases:
BaseDataConverterConfigConfig for converters that read from a local root directory.
Subclass this instead of
BaseDataConverterConfigwhen the converter discovers its input sequences from--root-dir.