nndeploy.detect.yolo¶
Classes
|
|
- class nndeploy.detect.yolo.YoloPyGraph(name, inputs: [<class 'nndeploy.dag.edge.Edge'>] = [], outputs: [<class 'nndeploy.dag.edge.Edge'>] = [])[源代码]¶
基类:
Graph- __init__(name, inputs: [<class 'nndeploy.dag.edge.Edge'>] = [], outputs: [<class 'nndeploy.dag.edge.Edge'>] = [])[源代码]¶
Initialize Graph object
- 参数:
name – Graph name
inputs – Input edge or list of input edges
outputs – Output edge or list of output edges
- forward(*args, **kwargs)[源代码]¶
Overloaded function.
forward(self: nndeploy._nndeploy_internal.dag.Graph, inputs: list[nndeploy::dag::Edge]) -> list[nndeploy::dag::Edge]
forward(self: nndeploy._nndeploy_internal.dag.Graph) -> list[nndeploy::dag::Edge]
forward(self: nndeploy._nndeploy_internal.dag.Graph, input: nndeploy::dag::Edge) -> list[nndeploy::dag::Edge]
- set_version(self: nndeploy._nndeploy_internal.dag.Node, version: str) nndeploy._nndeploy_internal.base.Status[源代码]¶
- add_dropdown_param(self: nndeploy._nndeploy_internal.dag.Node, dropdown_param: str, dropdown_values: list[str]) nndeploy._nndeploy_internal.base.Status¶
- add_io_param(self: nndeploy._nndeploy_internal.dag.Node, io_param: str) nndeploy._nndeploy_internal.base.Status¶
- add_node(node: Node)¶
Add node
- 参数:
node – Node object
- add_node_input_and_output(self: nndeploy._nndeploy_internal.dag.Graph, node_wrapper: nndeploy::dag::NodeWrapper, inputs: list[nndeploy::dag::Edge], outputs: list[nndeploy::dag::Edge]) nndeploy._nndeploy_internal.base.Status¶
- add_required_param(self: nndeploy._nndeploy_internal.dag.Node, required_param: str) nndeploy._nndeploy_internal.base.Status¶
- add_resource_with_state(self: nndeploy._nndeploy_internal.dag.Graph, key: str, edge: nndeploy::dag::Edge) nndeploy._nndeploy_internal.base.Status¶
- add_resource_without_state(self: nndeploy._nndeploy_internal.dag.Graph, key: str, value: nndeploy::base::Any) nndeploy._nndeploy_internal.base.Status¶
- add_ui_param(self: nndeploy._nndeploy_internal.dag.Node, ui_param: str) nndeploy._nndeploy_internal.base.Status¶
- check_outputs(*args, **kwargs)¶
Overloaded function.
check_outputs(self: nndeploy._nndeploy_internal.dag.Node, outputs_name: list[str]) -> bool
check_outputs(self: nndeploy._nndeploy_internal.dag.Node, outputs: list[nndeploy::dag::Edge]) -> bool
- clear_dropdown_params(self: nndeploy._nndeploy_internal.dag.Node) nndeploy._nndeploy_internal.base.Status¶
- clear_io_params(self: nndeploy._nndeploy_internal.dag.Node) nndeploy._nndeploy_internal.base.Status¶
- clear_required_params(self: nndeploy._nndeploy_internal.dag.Node) nndeploy._nndeploy_internal.base.Status¶
- clear_ui_params(self: nndeploy._nndeploy_internal.dag.Node) nndeploy._nndeploy_internal.base.Status¶
- connect(self: nndeploy._nndeploy_internal.dag.Graph, predecessor: nndeploy._nndeploy_internal.dag.Node, successor: nndeploy._nndeploy_internal.dag.Node, predecessor_port: int = 0, successor_port: int = 0) nndeploy._nndeploy_internal.base.Status¶
- create_internal_output_edge(self: nndeploy._nndeploy_internal.dag.Node, name: str) nndeploy::dag::Edge¶
- create_node(key_or_desc: Union[str, NodeDesc], name: str = '') Node¶
Create node
- 参数:
key_or_desc – Node key or node description object
name – Node name, only valid when key_or_desc is str, default is empty string
- 返回:
Node object
- create_resource_with_state(self: nndeploy._nndeploy_internal.dag.Node, key: str) nndeploy::dag::Edge¶
- deinit()¶
Deinitialize graph
- deserialize(json_str: str)¶
Deserialize graph from JSON string
- 参数:
json_str – JSON string to deserialize
- disconnect(self: nndeploy._nndeploy_internal.dag.Graph, predecessor: nndeploy._nndeploy_internal.dag.Node, successor: nndeploy._nndeploy_internal.dag.Node, predecessor_port: int = 0, successor_port: int = 0) nndeploy._nndeploy_internal.base.Status¶
- dump()¶
Dump graph information to standard output
- get_all_input(self: nndeploy._nndeploy_internal.dag.Node) list[nndeploy::dag::Edge]¶
- get_all_output(self: nndeploy._nndeploy_internal.dag.Node) list[nndeploy::dag::Edge]¶
- get_audio_url()¶
Get audio URL list
- 返回:
URL address list
- get_composite_node(self: nndeploy._nndeploy_internal.dag.Node) nndeploy::dag::CompositeNode¶
- get_device_type(self: nndeploy._nndeploy_internal.dag.Node) nndeploy._nndeploy_internal.base.DeviceType¶
- get_edge_queue_overflow_policy(self: nndeploy._nndeploy_internal.dag.Graph) nndeploy._nndeploy_internal.base.QueueOverflowPolicy¶
- get_edge_wrapper(edge: Union[Edge, str]) EdgeWrapper¶
Get edge wrapper
- 参数:
edge – Edge object or edge name
- 返回:
Edge wrapper object
- get_external_param(key: str) Param¶
Get external parameter
- 参数:
key – Parameter key
- 返回:
Parameter object
- get_graph(self: nndeploy._nndeploy_internal.dag.Node) nndeploy::dag::Graph¶
Get graph node stream sharing flag
- 返回:
Stream sharing flag
- get_image_url()¶
Get image URL list
- 返回:
URL address list
- get_infer_node(self: nndeploy._nndeploy_internal.dag.Graph, index: int) nndeploy._nndeploy_internal.dag.Node¶
- get_input_node(self: nndeploy._nndeploy_internal.dag.Graph, index: int) nndeploy._nndeploy_internal.dag.Node¶
- get_input_type_info(self: nndeploy._nndeploy_internal.dag.Node) list[nndeploy::dag::EdgeTypeInfo]¶
- get_io_type(self: nndeploy._nndeploy_internal.dag.Node) nndeploy::dag::IOType¶
- get_model_url()¶
Get model URL list
- 返回:
URL address list
- get_node(name_or_index: Union[str, int]) Node¶
Get node by name or index
- 参数:
name_or_index – Node name or index
- 返回:
Node object
- get_node_param(node_name: str) Param¶
Get node parameter
- 参数:
node_name – Node name
- 返回:
Parameter object
- get_node_type(self: nndeploy._nndeploy_internal.dag.Node) nndeploy::dag::NodeType¶
- get_node_value()¶
Get all node values
- 返回:
Nested dictionary of node values, format: {node_name: {key: value}}
- 返回类型:
- get_node_wrapper(node: Union[Node, str]) NodeWrapper¶
Get node wrapper
- 参数:
node – Node object or node name
- 返回:
Node wrapper object
- get_nodes_by_key(key: str) List[Node]¶
Get all matching nodes by key
- 参数:
key – Node key
- 返回:
List of Node objects
- get_nodes_recursive(self: nndeploy._nndeploy_internal.dag.Graph) list[nndeploy._nndeploy_internal.dag.Node]¶
- get_nodes_run_status(self: nndeploy._nndeploy_internal.dag.Graph) dict[str, nndeploy::dag::RunStatus]¶
- get_nodes_run_status_recursive(self: nndeploy._nndeploy_internal.dag.Graph) dict[str, nndeploy::dag::RunStatus]¶
- get_other_url()¶
Get other URL list
- 返回:
URL address list
- get_output_node(self: nndeploy._nndeploy_internal.dag.Graph, index: int) nndeploy._nndeploy_internal.dag.Node¶
- get_output_type_info(self: nndeploy._nndeploy_internal.dag.Node) list[nndeploy::dag::EdgeTypeInfo]¶
- get_parallel_type(self: nndeploy._nndeploy_internal.dag.Node) nndeploy._nndeploy_internal.base.ParallelType¶
- get_param(self: nndeploy._nndeploy_internal.dag.Node) nndeploy._nndeploy_internal.base.Param¶
- get_resource_without_state(self: nndeploy._nndeploy_internal.dag.Graph, key: str) nndeploy::base::Any¶
- get_run_status(self: nndeploy._nndeploy_internal.dag.Node) nndeploy::dag::RunStatus¶
- get_stream(self: nndeploy._nndeploy_internal.dag.Node) nndeploy._nndeploy_internal.device.Stream¶
- get_video_url()¶
Get video URL list
- 返回:
URL address list
- init()¶
Initialize graph
- interrupt()¶
Interrupt graph execution
- is_inputs_changed(self: nndeploy._nndeploy_internal.dag.Node, inputs: list[nndeploy::dag::Edge]) bool¶
- mark_output_edge(outputs: List[Edge])¶
Mark edges as output edges
- 参数:
outputs – List of output edges
- remove_dropdown_param(self: nndeploy._nndeploy_internal.dag.Node, dropdown_param: str) nndeploy._nndeploy_internal.base.Status¶
- remove_io_param(self: nndeploy._nndeploy_internal.dag.Node, io_param: str) nndeploy._nndeploy_internal.base.Status¶
- remove_required_param(self: nndeploy._nndeploy_internal.dag.Node, required_param: str) nndeploy._nndeploy_internal.base.Status¶
- remove_ui_param(self: nndeploy._nndeploy_internal.dag.Node, ui_param: str) nndeploy._nndeploy_internal.base.Status¶
- remove_unused_node_names(*args)¶
Remove unused node names
- 参数:
node_name – Node name
- run()¶
Run graph execution
- set_composite_node(self: nndeploy._nndeploy_internal.dag.Node, composite_node: nndeploy::dag::CompositeNode) nndeploy._nndeploy_internal.base.Status¶
- set_device_type(self: nndeploy._nndeploy_internal.dag.Node, device_type: nndeploy._nndeploy_internal.base.DeviceType) nndeploy._nndeploy_internal.base.Status¶
- set_dropdown_params(self: nndeploy._nndeploy_internal.dag.Node, dropdown_params: dict[str, list[str]]) nndeploy._nndeploy_internal.base.Status¶
- set_edge_queue_max_size(queue_max_size: int)¶
Set edge queue maximum size
- 参数:
queue_max_size – Maximum queue size
- set_edge_queue_overflow_policy(self: nndeploy._nndeploy_internal.dag.Graph, policy: nndeploy._nndeploy_internal.base.QueueOverflowPolicy, drop_count: int = 1) nndeploy._nndeploy_internal.base.Status¶
- set_external_param(key: str, param: Param)¶
Set external parameter
- 参数:
key – Parameter key
param – Parameter object
- set_graph(self: nndeploy._nndeploy_internal.dag.Node, graph: nndeploy::dag::Graph) nndeploy._nndeploy_internal.base.Status¶
Set graph node stream sharing flag
- 参数:
flag – Flag value
- set_input(input: Edge, index: int = -1)¶
Set input edge
- 参数:
input – Input edge
index – Input edge index, default is -1
- set_input_name(self: nndeploy._nndeploy_internal.dag.Node, name: str, index: int = 0) nndeploy._nndeploy_internal.base.Status¶
- set_input_names(self: nndeploy._nndeploy_internal.dag.Node, names: list[str]) nndeploy._nndeploy_internal.base.Status¶
- set_input_type(input_type: type, desc: str = '')¶
Set input type
- 参数:
input_type – Input type
- 返回:
Status code
- set_input_type_info(self: nndeploy._nndeploy_internal.dag.Node, input_type_info: nndeploy::dag::EdgeTypeInfo, desc: str = '') nndeploy._nndeploy_internal.base.Status¶
- set_io_params(self: nndeploy._nndeploy_internal.dag.Node, io_params: list[str]) nndeploy._nndeploy_internal.base.Status¶
- set_iter_input(self: nndeploy._nndeploy_internal.dag.Node, input: nndeploy::dag::Edge, index: int = -1) nndeploy._nndeploy_internal.base.Status¶
- set_memory(self: nndeploy._nndeploy_internal.dag.Node, buffer: nndeploy._nndeploy_internal.device.Buffer) nndeploy._nndeploy_internal.base.Status¶
- set_node_desc(node: Node, desc: NodeDesc)¶
Set node description
- 参数:
node – Node object
desc – Node description object
- set_node_parallel_type(node_name: str, parallel_type: ParallelType)¶
Set node parallel type
- 参数:
node_name – Node name
parallel_type – Parallel type
- set_node_param(node_name: str, param: Param)¶
Set node parameter
- 参数:
node_name – Node name
param – Parameter object
- set_node_value(*args)¶
Set node value
Supports multiple calling methods: 1. set_node_value(node_value_str) - Set through JSON string 2. set_node_value(node_name, key, value) - Set single node key-value pair 3. set_node_value(node_value_map) - Set multiple node values through dictionary
- set_output(output: Edge, index: int = -1)¶
Set output edge
- 参数:
output – Output edge
index – Output edge index, default is -1
- set_output_data(self: nndeploy._nndeploy_internal.dag.Node, obj: object, index: int = 0, is_external: bool = True) nndeploy._nndeploy_internal.base.Status¶
- set_output_name(self: nndeploy._nndeploy_internal.dag.Node, name: str, index: int = 0) nndeploy._nndeploy_internal.base.Status¶
- set_output_names(self: nndeploy._nndeploy_internal.dag.Node, names: list[str]) nndeploy._nndeploy_internal.base.Status¶
- set_output_type(output_type: type, desc: str = '')¶
Set output type
- 参数:
output_type – Output type
- 返回:
Status code
- set_output_type_info(self: nndeploy._nndeploy_internal.dag.Node, output_type_info: nndeploy::dag::EdgeTypeInfo, desc: str = '') nndeploy._nndeploy_internal.base.Status¶
- set_parallel_type(self: nndeploy._nndeploy_internal.dag.Node, parallel_type: nndeploy._nndeploy_internal.base.ParallelType) nndeploy._nndeploy_internal.base.Status¶
- set_param(*args, **kwargs)¶
Overloaded function.
set_param(self: nndeploy._nndeploy_internal.dag.Node, param: nndeploy._nndeploy_internal.base.Param) -> nndeploy._nndeploy_internal.base.Status
set_param(self: nndeploy._nndeploy_internal.dag.Node, key: str, value: str) -> nndeploy._nndeploy_internal.base.Status
- set_required_params(self: nndeploy._nndeploy_internal.dag.Node, required_params: list[str]) nndeploy._nndeploy_internal.base.Status¶
- set_stream(self: nndeploy._nndeploy_internal.dag.Node, stream: nndeploy._nndeploy_internal.device.Stream) None¶
- set_ui_params(self: nndeploy._nndeploy_internal.dag.Node, ui_params: list[str]) nndeploy._nndeploy_internal.base.Status¶
- set_unused_node_names(*args)¶
Set unused node names
- 参数:
node_name – Node name
- synchronize()¶
Synchronize graph execution
- to_static_graph()¶
Convert to static graph representation
- 返回:
Static graph object
- trace(inputs: Optional[Union[List[Edge], Edge]] = None) List[Edge]¶
Trace graph execution flow
- 参数:
inputs – List of input edges, single edge or None. If None, use default inputs
- 返回:
List of traced edges
- update_edge(edge_wrapper: Edge, edge: Edge, is_external: bool = True)¶
Update edge
- 参数:
edge_wrapper – Edge wrapper
edge – Edge object
is_external – Whether it’s an external edge
- update_input(self: nndeploy._nndeploy_internal.dag.Node) nndeploy._nndeploy_internal.base.EdgeUpdateFlag¶
- class nndeploy.detect.yolo.YoloPyGraphCreator[源代码]¶
基类:
NodeCreator- create_node(name: str, inputs: list[nndeploy.dag.edge.Edge], outputs: list[nndeploy.dag.edge.Edge])[源代码]¶
Create a new node instance.
This method must be implemented by subclasses.
- 参数:
name – The name of the node
inputs – List of input edges
outputs – List of output edges
- 返回:
The created node instance