This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] SK-AM62A-LP:AM62A 上的 TIDL 推理

Guru**** 2478805 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1540439/sk-am62a-lp-tidl-inference-on-am62a

器件型号:SK-AM62A-LP


工具/软件:

您好、专家:

前几天、我在运行流水线时正在努力找到以下文本叠加。



这是我使用的流水线。  

gst-launch-1.0 -e \
v4l2src device=/dev/video-imx219-cam1 io-mode=5 ! \
queue leaky=2 ! video/x-bayer, width=3280, height=2464, framerate=15/1, format=rggb10 ! \
tiovxisp sensor-name=SENSOR_SONY_IMX219_RPI dcc-isp-file=/opt/imaging/imx219/linear/7140.dcc_viss.bin format-msb=9 \
sink_0::dcc-2a-file=/opt/imaging/imx219/linear/7140.dcc_2a.bin sink_0::device=/dev/v4l-imx219-subdev1 ! \
video/x-raw, format=NV12 ! \
tiovxmultiscaler src_1::pool-size=4 name=split_01 src_0::roi-startx=205 src_0::roi-starty=154 src_0::roi-width=2870 src_0::roi-height=2156 target=0 \
split_01. ! queue ! video/x-raw, format=NV12, width=718, height=540, framerate=15/1 ! tiovxmultiscaler target=1 ! \
video/x-raw, width=224, height=224 ! tiovxdlpreproc model=/opt/model_zoo/mobileNetV2  out-pool-size=4 ! \
application/x-tensor-tiovx ! tidlinferer target=1  model=/opt/model_zoo/mobileNetV2 ! post_0.tensor \
split_01. ! queue ! video/x-raw, format=NV12, width=3280, height=2464, framerate=15/1 ! post_0.sink \
tidlpostproc name=post_0 model=/opt/model_zoo/mobileNetV2 top-N=1 display-model=false ! \
kmssink

1.尝试找到它,在 gsttidlpostproc.cpp 和 gsttidlinferer.cpp 存在于 /opt/edgeai-gst-plugins/ext/ti . 遗憾的是、绘制此文本覆盖和对比色框没有什么关系。
在 apps_python 中、它位于 post_process.py 文件中。 我尝试为我的用例创建一个 python 应用程序。 在哪里可以找到此文本覆盖?

2.在哪里可以找到识别 class_name 的逻辑。  post_process.py、 #L156 至#L167。  我的意思是、我需要对模型检测到的 class_name 进行一些调整。

请帮助我在代码中找到这两个部分。

此致、
Sajan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Sajan、  

    您要查找的某些代码可能位于/opt/edgeai-dl-inferer [0]中、它是该 gsttidlpostproc.cpp 的依赖项

    我想您会在 edgeai-dl-inferer 中找到与您的问题相关的源代码。

    如果您对此处的依赖项感到好奇、请参阅 edgeai-app-stack 存储库[1]、该库提供了一个很好的图形来说明这一点

    [0] https://git.ti.com/cgit/edgeai/edgeai-dl-inferer/tree/post_process/src / ti_post_process_image_classification.cpp 

    [1] https://github.com/TexasInstruments/edgeai-app-stack

    BR、
    Reese

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Reese、

    您能回答我说。 如何在 apps_python 中非常简单地进行这些修改。 我可以在计划中执行吗? 已使用 OptiFlow 管道创建应用程序。


    我是否可以将分辨率提高到更多:
    SPLIT_01。 ! 排队! video/x-raw、格式=NV12、宽度=718、高度=540、帧速率=15/1! tiovxmultiscaler target=1! \
    视频/x-RAW、宽度=224、高度=224! tiovxdlpreproc model=/opt/model_zoo/mobileNetV2 out-pool-size=4!
    这些是否会影响模型的准确性


    我也无法  在上面的链接中找到文本“已识别的类(顶部%d):“
    https://github.com/TexasInstruments/edgeai-app-stack/blob/main/edgeai-dl-inferer 404 未找到

    此致、
    Sajan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Sajan、

    您可以直接修改 apps_python 文件以更改此后处理代码--您的原始消息表明您已经找到了用于基于 python 的后处理的此代码。  

    OptiFlow 仅使用 gstreamer 插件、因此使用此应用程序框架需要编辑该插件使用的源代码、重新编译和重新安装。 edgeai-gst-apps/scripts 下有用于构建/安装 edgeai-app-stack 内每个组件的脚本。  

    更改基于 OptiFlow 的应用程序的后处理意味着您必须更改 GST 插件。  

    我能提高分辨率给更多人吗:
    SPLIT_01。 ! 排队! video/x-raw、格式=NV12、宽度=718、高度=540、帧速率=15/1! tiovxmultiscaler target=1! \
    视频/x-RAW、宽度=224、高度=224! tiovxdlpreproc model=/opt/model_zoo/mobileNetV2 out-pool-size=4!
    这些是否会影响模型
    的准确性

    否、模型尺寸是静态的。 您需要更改模型分辨率(独立于 TI 工具)、然后重新编译模型。 对于分类模型、这通常是直截了当的、因为该结构通常与分辨率无关。 ONNX 模型最简单,而 TFLITE 通常更难修改。  

    另外、我  在上面的链接中找不到文本“已识别的类(前%d 个):“
    https://github.com/TexasInstruments/edgeai-app-stack/blob/main/edgeai-dl-inferer 404 未找到

    edgeai-dl-inferer 是 GitHub 无法搜索的单独存储库。 它属于我们自己的 GIT 基础设施。  

    您也可以尝试在 SDK 中的/opt/edgeai-dl-inferer.下搜索 在 SDK 10.1 中、我在 ti_post_process_image_classification.cpp 的第 184 行中找到此信息
    https://git.ti.com/cgit/edgeai/edgeai-dl-inferer/tree/post_process/src ti_post_proce_image_classification.cpp?h=10.01.00.06#n184 

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    edgeai-gst-apps/scripts 下有用于构建/安装 edgeai-app-stack
    内每个组件的脚本

    然后可以创建 apps_python 等应用。 因此、我认为无需更改插件即可轻松修改代码。 这意味着 apps_python post_process.py 代码会覆盖 edgeai-dl-inferer