236 lines
8.6 KiB
HTML
236 lines
8.6 KiB
HTML
<!DOCTYPE html>
|
||
|
||
<html lang="en" data-content_root="./">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
|
||
<title>演示系统示例 — demo_system_algorithm 0.1 documentation</title>
|
||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
|
||
<link rel="stylesheet" type="text/css" href="_static/classic.css?v=def86cc0" />
|
||
|
||
<script src="_static/documentation_options.js?v=2709fde1"></script>
|
||
<script src="_static/doctools.js?v=9a2dae69"></script>
|
||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||
|
||
<link rel="index" title="Index" href="genindex.html" />
|
||
<link rel="search" title="Search" href="search.html" />
|
||
<link rel="prev" title="demo_yolov5s_seg module" href="demo_yolov5s_seg.html" />
|
||
</head><body>
|
||
<div class="related" role="navigation" aria-label="Related">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="genindex.html" title="General Index"
|
||
accesskey="I">index</a></li>
|
||
<li class="right" >
|
||
<a href="py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="demo_yolov5s_seg.html" title="demo_yolov5s_seg module"
|
||
accesskey="P">previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="index.html">demo_system_algorithm 0.1 documentation</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">演示系统示例</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
<div class="body" role="main">
|
||
|
||
<section id="id1">
|
||
<h1>演示系统示例<a class="headerlink" href="#id1" title="Link to this heading">¶</a></h1>
|
||
<section id="id2">
|
||
<h2>概述<a class="headerlink" href="#id2" title="Link to this heading">¶</a></h2>
|
||
<p>所有示例通过 Python 接口实现下位机推理,前处理(数据标准化/归一化、通道变换)和反量化都已经加入网络中,下位机推理结果返回PC端做后处理,结果保存在模型工程目录下。提供源码地址、权重文件、nbg文件、测试图片。</p>
|
||
<ul>
|
||
<li><p>依赖安装</p>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>-r<span class="w"> </span>requirements.txt
|
||
</pre></div>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</section>
|
||
<section id="deeplab-mobilnet-v3">
|
||
<h2>deeplab_mobilnet_v3<a class="headerlink" href="#deeplab-mobilnet-v3" title="Link to this heading">¶</a></h2>
|
||
<p>语义分割模型,源码地址为:<a class="reference external" href="https://github.com/bubbliiiing/deeplabv3-plus-pytorch.git">https://github.com/bubbliiiing/deeplabv3-plus-pytorch.git</a></p>
|
||
<ul>
|
||
<li><p>输入、输出信息</p>
|
||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>INPUT:0
|
||
DATA_FORMAT:UINT8
|
||
NUM_OF_DIMENSION:4
|
||
SIZES_OF_DIMENSION:1536 512 1 1 0 0
|
||
QUANT_FORMAT:NONE
|
||
OUTPUT:0
|
||
DATA_FORMAT:FP32
|
||
NUM_OF_DIMENSION:4
|
||
SIZES_OF_DIMENSION:512 512 21 1 0 0
|
||
QUANT_FORMAT:NONE
|
||
</pre></div>
|
||
</div>
|
||
</li>
|
||
<li><p>后处理流程</p>
|
||
<ul class="simple">
|
||
<li><p>概率转换</p></li>
|
||
<li><p>预测类别生成</p></li>
|
||
<li><p>尺寸还原</p></li>
|
||
<li><p>标签映射</p></li>
|
||
</ul>
|
||
</li>
|
||
<li><p>执行</p>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>demo_deeplabv3.py
|
||
</pre></div>
|
||
</div>
|
||
</li>
|
||
<li><p>结果保存在test_src/models/deeplab_mobilnet_v3/result.jpg
|
||
<img alt="本地示例图" src="test_src/models/deeplab_mobilnet_v3/result.jpg" /></p></li>
|
||
</ul>
|
||
</section>
|
||
<section id="yolov5s-seg">
|
||
<h2>yolov5s-seg<a class="headerlink" href="#yolov5s-seg" title="Link to this heading">¶</a></h2>
|
||
<p>实例分割模型,源码地址:<a class="reference external" href="https://github.com/ultralytics/yolov5.git">https://github.com/ultralytics/yolov5.git</a></p>
|
||
<ul>
|
||
<li><p>输入、输出信息</p>
|
||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>INPUT:0
|
||
DATA_FORMAT:UINT8
|
||
NUM_OF_DIMENSION:4
|
||
SIZES_OF_DIMENSION:1920 640 1 1 0 0
|
||
QUANT_FORMAT:NONE
|
||
OUTPUT:0
|
||
DATA_FORMAT:FP32
|
||
NUM_OF_DIMENSION:3
|
||
SIZES_OF_DIMENSION:117 25200 1 0 0 0
|
||
QUANT_FORMAT:NONE
|
||
OUTPUT:1
|
||
DATA_FORMAT:FP32
|
||
NUM_OF_DIMENSION:4
|
||
SIZES_OF_DIMENSION:160 160 32 1 0 0
|
||
QUANT_FORMAT:NONE
|
||
</pre></div>
|
||
</div>
|
||
</li>
|
||
<li><p>后处理流程</p>
|
||
<ul class="simple">
|
||
<li><p>NMS</p></li>
|
||
<li><p>遍历检测预测</p></li>
|
||
<li><p>颜色和掩码可视化</p></li>
|
||
<li><p>掩码叠加</p></li>
|
||
<li><p>绘制检测框和文本标签</p></li>
|
||
</ul>
|
||
</li>
|
||
<li><p>执行</p>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>demo_yolov5s_seg.py
|
||
</pre></div>
|
||
</div>
|
||
</li>
|
||
<li><p>结果保存在/yolov5s-seg/result.jpg
|
||
<img alt="本地示例图" src="test_src/models/yolov5s-seg/result.jpg" /></p></li>
|
||
</ul>
|
||
</section>
|
||
<section id="resnet18">
|
||
<h2>resnet18<a class="headerlink" href="#resnet18" title="Link to this heading">¶</a></h2>
|
||
<p>分类模型,源码地址:<a class="reference external" href="https://github.com/ultralytics/yolov5.git">https://github.com/ultralytics/yolov5.git</a></p>
|
||
<ul>
|
||
<li><p>输入、输出信息</p>
|
||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>INPUT:0
|
||
DATA_FORMAT:UINT8
|
||
NUM_OF_DIMENSION:4
|
||
SIZES_OF_DIMENSION:672 224 1 1 0 0
|
||
QUANT_FORMAT:NONE
|
||
OUTPUT:0
|
||
DATA_FORMAT:FP32
|
||
NUM_OF_DIMENSION:2
|
||
SIZES_OF_DIMENSION:1000 1 0 0 0 0
|
||
QUANT_FORMAT:NONE
|
||
</pre></div>
|
||
</div>
|
||
</li>
|
||
<li><p>后处理流程</p>
|
||
<ul class="simple">
|
||
<li><p>softmax</p></li>
|
||
<li><p>topk</p></li>
|
||
</ul>
|
||
</li>
|
||
<li><p>执行</p>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>demo_resnet18.py
|
||
</pre></div>
|
||
</div>
|
||
</li>
|
||
<li><p>结果保存在/resnet18/result.jpg
|
||
<img alt="本地示例图" src="test_src/models/resnet18/result.jpg" /></p></li>
|
||
</ul>
|
||
<blockquote>
|
||
<div><p><em>作者 {{liangliangou}}</em></p>
|
||
</div></blockquote>
|
||
</section>
|
||
</section>
|
||
|
||
|
||
<div class="clearer"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
||
<div class="sphinxsidebarwrapper">
|
||
<div>
|
||
<h3><a href="index.html">Table of Contents</a></h3>
|
||
<ul>
|
||
<li><a class="reference internal" href="#">演示系统示例</a><ul>
|
||
<li><a class="reference internal" href="#id2">概述</a></li>
|
||
<li><a class="reference internal" href="#deeplab-mobilnet-v3">deeplab_mobilnet_v3</a></li>
|
||
<li><a class="reference internal" href="#yolov5s-seg">yolov5s-seg</a></li>
|
||
<li><a class="reference internal" href="#resnet18">resnet18</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
</div>
|
||
<div>
|
||
<h4>Previous topic</h4>
|
||
<p class="topless"><a href="demo_yolov5s_seg.html"
|
||
title="previous chapter">demo_yolov5s_seg module</a></p>
|
||
</div>
|
||
<div role="note" aria-label="source link">
|
||
<h3>This Page</h3>
|
||
<ul class="this-page-menu">
|
||
<li><a href="_sources/README.md.txt"
|
||
rel="nofollow">Show Source</a></li>
|
||
</ul>
|
||
</div>
|
||
<search id="searchbox" style="display: none" role="search">
|
||
<h3 id="searchlabel">Quick search</h3>
|
||
<div class="searchformwrapper">
|
||
<form class="search" action="search.html" method="get">
|
||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
||
<input type="submit" value="Go" />
|
||
</form>
|
||
</div>
|
||
</search>
|
||
<script>document.getElementById('searchbox').style.display = "block"</script>
|
||
</div>
|
||
</div>
|
||
<div class="clearer"></div>
|
||
</div>
|
||
<div class="related" role="navigation" aria-label="Related">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="genindex.html" title="General Index"
|
||
>index</a></li>
|
||
<li class="right" >
|
||
<a href="py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="demo_yolov5s_seg.html" title="demo_yolov5s_seg module"
|
||
>previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="index.html">demo_system_algorithm 0.1 documentation</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">演示系统示例</a></li>
|
||
</ul>
|
||
</div>
|
||
<div class="footer" role="contentinfo">
|
||
© Copyright 2025, liangliangou.
|
||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.4.7.
|
||
</div>
|
||
</body>
|
||
</html> |