mmpose.apis.webcam.nodes.Node¶
- class mmpose.apis.webcam.nodes.Node(name: str, enable_key: Optional[Union[str, int]] = None, max_fps: int = 30, input_check_interval: float = 0.01, enable: bool = True, daemon: bool = False, multi_input: bool = False)[源代码]¶
Base class for node, which is the interface of basic function module.
Node
inheritsthreading.Thread
. All subclasses should override following methods:process()
bypass()
(optional)
- 参数
name (str) – The node name (also thread name)
enable_key (str|int, optional) – Set a hot-key to toggle enable/disable of the node. If an int value is given, it will be treated as an ascii code of a key. Please note: (1) If
enable_key
is set, thebypass()
method need to be overridden to define the node behavior when disabled; (2) Some hot-keys are reserved for particular use. For example: ‘q’, ‘Q’ and 27 are used for exiting. Default:None
max_fps (int) – Maximum FPS of the node. This is to avoid the node running unrestrictedly and causing large resource consuming. Default: 30
input_check_interval (float) – Minimum interval (in millisecond) between checking if input is ready. Default: 0.001
enable (bool) – Default enable/disable status. Default:
True
daemon (bool) – Whether node is a daemon. Default:
True
multi_input (bool) – Whether load all messages in buffer. If False, only one message will be loaded each time. Default:
False