libyolact
Library for YolactEdge.
- class libyolact.LibYolact(is_init=True, action_name='/yolact')
Bases:
objectYOLACT ROS Action library.
- get_class_cfg(config_name)
Get class config.
- Parameters
config_name (str) – Config name.
- Returns
- Class config.
class_names: Class IDs. show_names: Class labels.
- Return type
dict[str, str]
Examples
>>> print(get_class_cfg["config_name"]) {"class_names": ("1", "2", ...), "show_names": ("class_1", "class_2", ...)}
- recognize(rgb=header: seq: 0 stamp: secs: 0 nsecs: 0 frame_id: '' height: 0 width: 0 encoding: '' is_bigendian: 0 step: 0 data: [], d=header: seq: 0 stamp: secs: 0 nsecs: 0 frame_id: '' height: 0 width: 0 encoding: '' is_bigendian: 0 step: 0 data: [], max_distance=-1.0, specific_id='', show_name=False)
Object recognition using YOLACT.
- Parameters
rgb (sensor_msgs/Image, optional) – Specify if you want to recognize a specific RGB image. Defaults to Image()
d (sensor_msgs/Image, optional) – Used to obtain the distance. Defaults to Image().
max_distance (float, optional) – The maximum recognition distance can be specified. If a negative value is given, it is unlimited. Defaults to -1.0[m].
specific_id (str, optional) – Only specified objects can be recognized. Defaults to “”.
show_name (bool, optional) – Display by object name, not by ID. Defaults to False.
- Returns
Recognition results.
- Return type
hma_yolact_action/YolactResult