Shortcuts

mmpose.apis.webcam.utils.Message

class mmpose.apis.webcam.utils.Message(msg: str = '', data: Optional[Dict] = None)[source]

Message base class.

All message class should inherit this class. The basic use of a Message instance is to carray a piece of text message (self.msg) and a dict that stores structured data (self.data), e.g. frame image, model prediction, et al.

A message may also hold route information, which is composed of information of all nodes the message has passed through.

Parameters
  • msg (str) – The text message.

  • data (dict, optional) – The structured data.

__init__(msg: str = '', data: Optional[Dict] = None)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([msg, data])

Initialize self.

get_route_info()

merge_route_info(route_info)

Merge the given route information into the original one of the message.

set_route_info(route_info)

Directly set the entire route information.

update_route_info([node, node_name, …])

Append new node information to the route information.

Read the Docs v: 0.x
Versions
latest
1.x
v1.0.0rc1
v0.29.0
v0.28.0
dev-1.x
0.x
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.