cloudViewer.ml.torch.datasets.Lyft#
- class cloudViewer.ml.torch.datasets.Lyft(dataset_path, info_path=None, name='Lyft', cache_dir='./logs/cache', use_cache=False, **kwargs)[source]#
This class is used to create a dataset based on the Lyft dataset, and used in object detection, visualizer, training, or testing.
The Lyft level 5 dataset is best suited for self-driving applications.
- __init__(dataset_path, info_path=None, name='Lyft', cache_dir='./logs/cache', use_cache=False, **kwargs)[source]#
Initialize the function by passing the dataset and other details.
- Parameters:
dataset_path – The path to the dataset to use.
info_path – The path to the file that includes information about
is (the dataset. This is default to dataset path if nothing) –
provided. –
name – The name of the dataset (Lyft in this case).
cache_dir – The directory where the cache is stored.
use_cache – Indicates if the dataset should be cached.
- Returns:
The corresponding class.
- Return type:
class
- static get_label_to_names()[source]#
Returns a label to names dictonary object.
- Returns:
A dict where keys are label numbers and values are the corresponding names.
- get_split(split)[source]#
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)[source]#
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(attr)[source]#
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 resturn the path where the attribute is stored; else, returns false.
- static read_label(info, calib)[source]#
Reads labels of bound boxes.
- Returns:
The data objects with bound boxes information.