• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

轻量级YOLOv5开发构建汉字检测识别系统

武飞扬头像
Together_CZ
帮助1

汉字检测、字母检测、手写数字检测、藏文检测、甲骨文检测在我之前的文章中都有做过了,今天主要是因为实际项目的需要,之前的汉字检测模型较为古老了还使用的yolov3时期的模型,检测精度和推理速度都有不小的滞后了,这里要基于yolov5轻量级的模型来开发构建新版的目标检测模型,首先看下效果图:

学新通

接下来简单看下数据集情况:

学新通

YOLO格式标注文件截图如下:

学新通

实例标注内容如下所示:

  1.  
    17 0.245192 0.617788 0.038462 0.038462
  2.  
    6 0.102163 0.830529 0.045673 0.045673
  3.  
    16 0.894231 0.096154 0.134615 0.134615
  4.  
    4 0.456731 0.524038 0.134615 0.134615
  5.  
    15 0.367788 0.317308 0.269231 0.269231

VOC格式数据标注文件截图如下:

学新通

实例标注内容如下所示:

  1.  
    <annotation>
  2.  
    <folder>DATASET</folder>
  3.  
    <filename>0ace8eaf-8e86-488b-9229-95255c69158c.jpg</filename>
  4.  
    <source>
  5.  
    <database>The DATASET Database</database>
  6.  
    <annotation>DATASET</annotation>
  7.  
    <image>DATASET</image>
  8.  
    </source>
  9.  
    <owner>
  10.  
    <name>YMGZS</name>
  11.  
    </owner>
  12.  
    <size>
  13.  
    <width>416</width>
  14.  
    <height>416</height>
  15.  
    <depth>3</depth>
  16.  
    </size>
  17.  
    <segmented>0</segmented>
  18.  
     
  19.  
    <object>
  20.  
    <name>17</name>
  21.  
    <pose>Unspecified</pose>
  22.  
    <truncated>0</truncated>
  23.  
    <difficult>0</difficult>
  24.  
    <bndbox>
  25.  
    <xmin>214</xmin>
  26.  
    <ymin>302</ymin>
  27.  
    <xmax>230</xmax>
  28.  
    <ymax>318</ymax>
  29.  
    </bndbox>
  30.  
    </object>
  31.  
     
  32.  
    <object>
  33.  
    <name>16</name>
  34.  
    <pose>Unspecified</pose>
  35.  
    <truncated>0</truncated>
  36.  
    <difficult>0</difficult>
  37.  
    <bndbox>
  38.  
    <xmin>210</xmin>
  39.  
    <ymin>67</ymin>
  40.  
    <xmax>229</xmax>
  41.  
    <ymax>86</ymax>
  42.  
    </bndbox>
  43.  
    </object>
  44.  
     
  45.  
    <object>
  46.  
    <name>18</name>
  47.  
    <pose>Unspecified</pose>
  48.  
    <truncated>0</truncated>
  49.  
    <difficult>0</difficult>
  50.  
    <bndbox>
  51.  
    <xmin>260</xmin>
  52.  
    <ymin>7</ymin>
  53.  
    <xmax>274</xmax>
  54.  
    <ymax>21</ymax>
  55.  
    </bndbox>
  56.  
    </object>
  57.  
     
  58.  
    <object>
  59.  
    <name>10</name>
  60.  
    <pose>Unspecified</pose>
  61.  
    <truncated>0</truncated>
  62.  
    <difficult>0</difficult>
  63.  
    <bndbox>
  64.  
    <xmin>121</xmin>
  65.  
    <ymin>103</ymin>
  66.  
    <xmax>143</xmax>
  67.  
    <ymax>125</ymax>
  68.  
    </bndbox>
  69.  
    </object>
  70.  
     
  71.  
    <object>
  72.  
    <name>11</name>
  73.  
    <pose>Unspecified</pose>
  74.  
    <truncated>0</truncated>
  75.  
    <difficult>0</difficult>
  76.  
    <bndbox>
  77.  
    <xmin>296</xmin>
  78.  
    <ymin>289</ymin>
  79.  
    <xmax>352</xmax>
  80.  
    <ymax>345</ymax>
  81.  
    </bndbox>
  82.  
    </object>
  83.  
     
  84.  
    <object>
  85.  
    <name>0</name>
  86.  
    <pose>Unspecified</pose>
  87.  
    <truncated>0</truncated>
  88.  
    <difficult>0</difficult>
  89.  
    <bndbox>
  90.  
    <xmin>56</xmin>
  91.  
    <ymin>132</ymin>
  92.  
    <xmax>196</xmax>
  93.  
    <ymax>272</ymax>
  94.  
    </bndbox>
  95.  
    </object>
  96.  
     
  97.  
    <object>
  98.  
    <name>0</name>
  99.  
    <pose>Unspecified</pose>
  100.  
    <truncated>0</truncated>
  101.  
    <difficult>0</difficult>
  102.  
    <bndbox>
  103.  
    <xmin>213</xmin>
  104.  
    <ymin>142</ymin>
  105.  
    <xmax>353</xmax>
  106.  
    <ymax>282</ymax>
  107.  
    </bndbox>
  108.  
    </object>
  109.  
     
  110.  
    </annotation>

因为是主打轻量级网络,这里选择了也是最为轻量级的n系列的模型,最终训练得到的模型文件不足4MB大小,网络结构图如下所示:

学新通

默认100次epoch的计算,结果目录如下所示:

【混淆矩阵】

学新通

【F1值曲线】

学新通

【PR曲线】

学新通

【训练日志可视化】

学新通

【batch计算实例】

学新通

可视化界面推理样例如下:

学新通
学新通
学新通

从评估指标结果上面来看检测效果还是很不错的。

学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhfiikkf
系列文章
更多 icon
同类精品
更多 icon
继续加载