dabble.check_nearby_objs
Description
Checks if detected objects are near each other.
- class Node(config=None, **kwargs)[source]
Checks if any objects are near each other.
It does so by comparing the 3D locations of all objects to see which ones are near each other. If the distance between two objects is below the minimum threshold, both would be flagged as near with
tag_msg
. These flags can be accessed by theflags
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.check_nearby_objs
produces theflags
attribute which contains either thetag_msg
for objects that are near each other or an empty string for objects with no other objects nearby.- Configs
near_threshold (
float
) – default = 2.0.
Threshold of distance, in metres, between two objects. Objects with distance less thannear_threshold
would be considered as ‘near’.tag_msg (
str
) – default = “TOO CLOSE!”.
Tag to identify objects which are near others.