robokudo.cas¶
Classes¶
Module Contents¶
- class robokudo.cas.CASViews¶
-
Definition of the standard ‘keys’ for the data we want to store.
- COLOR_IMAGE = 'color_image'¶
- DEPTH_IMAGE = 'depth_image'¶
- COLOR2DEPTH_RATIO = 'color2depth_ratio'¶
- CAM_INFO = 'cam_info'¶
- CAM_INTRINSIC = 'cam_intrinsic'¶
- PC_CAM_INTRINSIC = 'pc_cam_intrinsic'¶
- CLOUD = 'cloud'¶
- CLOUD_ORGANIZED = 'cloud_organized'¶
- TIMESTAMP = 'timestamp'¶
- QUERY = 'query'¶
- VIEWPOINT_CAM_TO_WORLD = 'viewpoint_cam_to_world'¶
- VIEWPOINT_WORLD_TO_CAM = 'viewpoint_world_to_cam'¶
- PLANE = 'plane'¶
- OBJECT_IMAGE = 'object_image'¶
- OBJECT_COLOR_MAP = 'object_color_map'¶
- class robokudo.cas.CAS¶
-
The main data representation in RoboKudo. Annotators can fetch information from it and should also assert back their information back to the CAS. Each pipeline has one CAS.
- timestamp¶
- timestamp_readable¶
- views¶
- annotations = []¶
- get(view_name: str)¶
- contains(view_name: str)¶
- get_copy(view_name: str)¶
- set(view_name: str, value)¶
-
Put data in the CAS index by a given view name. This method will make a deepcopy of value.
- Parameters:
-
view_name – The name of the view which should be selected from constants in the CASView class.
value – The value that will be placed in the CAS under view_name by making a deepcopy of it.
- set_ref(view_name: str, value)¶
-
Put data in the CAS index by a given view name. In contrast to set(), this will not make a copy but just does an assignment.
- Parameters:
-
view_name – The name of the view which should be selected from constants in the CASView class.
value – The value that will be placed in the CAS under view_name by making assigning it.
- static filter_by_type(type_to_include, input_list)¶
- filter_annotations_by_type(type_to_include)¶
- static _filter_objects(objects, criteria)¶
-
Filters a list of objects based on specified criteria.
- Parameters:
-
objects – List of objects to be filtered.
criteria – A dictionary where keys are attribute names and values are tuples containing the comparison operator as a string (“==”, “>”, “<”, “>=”, “<=”) and the value to compare against.
- Returns:
-
A list of objects that match all specified attribute values.
- filter_by_type_and_criteria(type_to_include, input_list, criteria: dict)¶
-
Filters a list of objects based on specified criteria. Objects must be of type ‘type_to_include’
- Parameters:
-
type_to_include – All the returned objects must be of this type.
input_list – List of objects to be filtered.
criteria – A dictionary where keys are attribute names and values are tuples containing the comparison operator as a string (“==”, “>”, “<”, “>=”, “<=”) and the value to compare against.
- Returns:
-
A list of objects of type ‘type_to_include’ that match all specified attribute values.