dabble.group_nearby_objs

Description

Assigns objects in close proximity to groups.

class Node(config=None, **kwargs)[source]

Groups objects that are near each other.

It does so by comparing the 3D locations of all objects, and assigning objects near each other to the same group. The group associated with each object is accessed by the groups key of obj_attrs.

Inputs

obj_3D_locs (List[numpy.ndarray]): A list of \(N\) NumPy arrays representing the 3D coordinates \((x, y, z)\) of an object associated with a detected bounding box.

Outputs

obj_attrs (Dict[str, Any]): A dictionary of attributes associated with each bounding box, in the same order as bboxes. Different nodes that produce this obj_attrs output type may contribute different attributes. dabble.group_nearby_objs produces the groups attribute.

Configs

obj_dist_threshold (float) – default = 1.5.
Threshold of distance, in metres, between two objects. Objects with distance less than obj_dist_threshold would be assigned to the same group.

Changed in version 1.2.0: draw.group_nearby_objs used to return obj_tags (List[str]) as an output data type, which has been deprecated and now subsumed under obj_attrs. The same attribute is accessed by the groups key of obj_attrs.