MediaPipe框架- 可视化工具

Visualizer

可视化工具

To help users understand the structure of their calculator graphs and to understand the overall behavior of their machine learning inference pipelines, we have built the MediaPipe Visualizer that is available online.

​为了帮助用户理解他们的计算器图的结构,并了解他们的机器学习推理管道的整体行为,我们构建了在线提供的MediaPipe Visualizer。

  • A graph view allows users to see a connected calculator graph as expressed through a graph configuration that is pasted into the graph editor or uploaded. The user can visualize and troubleshoot a graph they have created.

  • 图视图允许用户查看通过粘贴到图编辑器或上传的图形配置表达的连接计算器图。用户可以对他们创建的图形进行可视化和故障排除。

Working within the Editor

在编辑器中工作

Getting Started:

入门:

The graph can be modified by adding and editing code in the Editor view.

可以通过在编辑器视图中添加和编辑代码来修改图。

  • Pressing the "New" button in the upper right corner will clear any existing code in the Editor window.

  • 按下右上角的“新建”按钮将清除编辑器窗口中的任何现有代码。

  • Pressing the "Upload" button will prompt the user to select a local PBTXT file, which will overwrite the current code within the editor.

  • 按下“上传”按钮将提示用户选择本地PBTXT文件,该文件将覆盖编辑器中的当前代码。

  • Alternatively, code can be pasted directly into the editor window.

  • 或者,代码可以直接粘贴到编辑器窗口中。

  • Errors and informational messages will appear in the Feedback window.

  • “反馈”窗口中将显示错误和信息性消息。

Understanding the Graph

了解图形

The visualizer graph shows the connections between calculator nodes.

可视化工具图显示计算器节点之间的连接。

  • Streams exit from the bottom of the calculator producing the stream and enter the top of any calculator receiving the stream. (Notice the use of the key, "input_stream" and "output_stream").

  • 流从产生流的计算器的底部退出,并进入接收流的任何计算器的顶部。(请注意键“input_stream”和“output_stream“的使用)。

  • Sidepackets work the same, except that they exit a node on the right and enter on the left. (Notice the use of the key, "input_side_packet" and "output_side_packet").

  • 侧包的工作原理是一样的,只是它们在右边退出一个节点,在左边进入。(请注意密钥“input_side_packet”和“output_side_paket”的使用)。

  • There are special nodes that represent inputs and outputs to the graph and can supply either side packets or streams.

  • 有一些特殊的节点表示图的输入和输出,可以提供边数据包或流。

Visualizing Subgraphs

可视化子图

The MediaPipe visualizer can display multiple graphs in separate tabs. If a graph has a type field in the top level of the graph's text proto definition, and that value of graph type is used as a calculator name in another graph, it is considered a subgraph by the visualizer and colored appropriately where it is used. Clicking on a subgraph will navigate to the corresponding tab which holds the subgraph's definition.

MediaPipe可视化工具可以在单独的选项卡中显示多个图。如果一个图在其文本原型定义的顶级中有一个类型字段,并且该图类型的值被用作另一个图中的计算器名称,则可视化工具会将其视为子图,并在使用时进行适当的着色。单击子图将导航到保存子图定义的相应选项卡。

For instance, there are two graphs involved in MediaPipe Hands: the main graph (source pbtxt file) and its associated subgraph (source pbtxt file). To visualize them:

​例如,MediaPipe Hands中涉及两个图:主图(源pbtxt文件)及其关联的子图(源pbtxt文件)。要将它们可视化:

  • In the MediaPipe visualizer, click on the upload graph button and select the 2 pbtxt files to visualize (main graph and its associated subgraph).

  • 在MediaPipe可视化工具中,单击上传图形按钮,然后选择要可视化的2个pbtxt文件(主图及其关联的子图)。

  • There will be 2 additional tabs. The main graph tab is hand_detection_mobile.pbtxt.

  • 将有2个附加选项卡。主图选项卡是hand_detection_mobile.pbtxt。

  • Clicking on the HandDetection node in purple redirects the view to the hand_detection_gpu.pbtxt tab.

  • 单击紫色的HandDetection节点会将视图重定向到hand_detection_gpu.pbtxt选项卡。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值