Data Generation API Overview¶
The Data Generation module API’s provide a develop interface to interact, update, add to and launch data collection runs and its underlying parameters/functionalities. These API’s combined with the config act as a way for the developer to accomplish their goals as easily as possible.
These API’s can be divided into 4
major categories:
DataGenerator Object¶
Base APIs¶
These API’s are the fundamental tasks you can achieve via the module. basic_datacollection.py acts an example script for these API’s
generate_trajectory(enable_weather_sweep, enable_time_sweep)
- Generate trajectory for all GeoLocation’s and return them in a listcollect_data(collection_type, server_ip)
- Collect desired data over the generated trajectoriesvalidate_data(dataset)
- Validate collected data and return a clean datasetaggregate_data(dataset)
- Aggregate all metadata into csv/json/json/coco formatsaugment_data()
- Augment collected data based on config
Pre Trajectory Generation APIs¶
These API’s provides the developer with finer control over trajectory generation. Through these API’s, the developer can programmatically update and add to the parameters defined in the config adn thus adjust the generated trajectory to their desire. These API’s only have their intended effect if called before the trajectory generation API. datacollection_trajectory_apis.py acts as an example script for these API’s
add_weather_variation(type, intensity)
- Adds a new weather variationupdate_time_variation(state, start_time, end_time, step)
- Update the time variation applied to trajectoryadd_trajectory_preset(name, trajectories)
- Add a trajectory preset to configupdate_location_trajectory_preset(location_name, preset_name)
- Update a location with new trajectory presetadd_env_actor_to_location(location_name, actor_name, trajectory_preset_name, duration, to_loop, time_offset, overwrite)
- Add/Update env actor settings for given locationadd_geo_location(location_name, trajectory_name, scene_name, scene_config, coordinates, asset, object_id)
- Add a location to the data collection config (does not support env actors)
Pre Collection APIs¶
These API’s provide control over data collection parameters. These API’s only have their intended effect if called before the data collection API. datacollection_collection_apis.py acts as an example script for these API’s
update_data_spec(enabled_modalities, enabled_annotations)
- Update the modalities and annotations to be collected
Validation APIs¶
These API’s expose the various sub-functions within the validation API and allow the develop to access that data. These API’s only have their intended effect if called after the collection API. datacollection_validation_apis.py acts as an example script for these API’s
get_data_card_dict(dataset)
- Returns the validated data card dictionarygenerate_video(annotation, num_images)
- Generate a visual representation of the collected data with 2d/3d Annotations
Augmentation APIs¶
These API’s provide the developer with finer control over the augmentation settings that will be applied over the alrealy-collected dataset. datacollection_augmentation_apis.py acts as an example script for these API’s
update_augmentation_spec(augmentations)
- Change the augmentations and their params that will be applied to the collected data