open3d.ml.tf.datasets.KITTI

class open3d.ml.tf.datasets.KITTI(dataset_path, name='KITTI', cache_dir='./logs/cache', use_cache=False, val_split=3712, test_result_folder='./test', **kwargs)

This class is used to create a dataset based on the KITTI dataset, and used in object detection, visualizer, training, or testing.

__init__(dataset_path, name='KITTI', cache_dir='./logs/cache', use_cache=False, val_split=3712, test_result_folder='./test', **kwargs)

Initialize the function by passing the dataset and other details.

Parameters
  • dataset_path – The path to the dataset to use.

  • name – The name of the dataset (KITTI in this case).

  • cache_dir – The directory where the cache is stored.

  • use_cache – Indicates if the dataset should be cached.

  • val_split – The split value to get a set of images for training,

  • validation

  • testing. (for) –

  • test_result_folder – Path to store test output.

Returns

The corresponding class.

Return type

class

static get_label_to_names()

Returns a label to names dictionary object.

Returns

A dict where keys are label numbers and values are the corresponding names.

get_split(split)

Returns a dataset split.

Parameters
  • split – A string identifying the dataset split that is usually one of

  • 'training'

  • 'test'

  • 'validation'

  • 'all'. (or) –

Returns

A dataset split object providing the requested subset of the data.

get_split_list(split)

Returns the list of data splits available.

Parameters
  • split – A string identifying the dataset split that is usually one of

  • 'training'

  • 'test'

  • 'validation'

  • 'all'. (or) –

Returns

A dataset split object providing the requested subset of the data.

Raises
  • ValueError – Indicates that the split name passed is incorrect. The

  • split name should be one of 'training', 'test', 'validation', or

  • 'all'.

is_tested()

Checks if a datum in the dataset has been tested.

Parameters
  • dataset – The current dataset to which the datum belongs to.

  • attr – The attribute that needs to be checked.

Returns

If the dataum attribute is tested, then return the path where the attribute is stored; else, returns false.

static read_calib(path)

Reads calibiration for the dataset. You can use them to compare modeled results to observed results.

Returns

The camera and the camera image used in calibration.

static read_label(path, calib)

Reads labels of bound boxes.

Returns

The data objects with bound boxes information.

static read_lidar(path)

Reads lidar data from the path provided.

Returns

A data object with lidar information.

save_test_result(results, attrs)

Saves the output of a model.

Parameters
  • results – The output of a model for the datum associated with the

  • passed. (attribute) –

  • attrs – The attributes that correspond to the outputs passed in

  • results.