利用 YOLOv8 和 PPOCRLabel 完成自动标注
本文原发表于公众号「ET的生活体验」(2025 年 2 月),现移植到 RRLab 博客。内容为门牌 OCR 项目实战记录的第二篇。
Originally published on the WeChat channel "ET's Life Experience" (February 2025), now migrated to the RRLab blog. This is the second installment in the doorplate OCR project series.
前几天聊过我使用 OCR 完成一个门牌识别软件,并通过云计算完成了 5000 多个学习材料的文本识别深度学习。最终得到了一个准确率(acc)达到 0.9961882961765042、归一化编辑距离(norm_edit_dis)为 0.9989873963592519 的模型结果。
A few days ago I wrote about using OCR to build a doorplate recognition system, completing deep-learning text recognition training on over 5,000 samples via cloud computing. The result was a model with accuracy (acc) of 0.9961882961765042 and normalized edit distance (norm_edit_dis) of 0.9989873963592519.
只是基于这个训练集的数量还是不够,为此想着要提供更多文本识别标签做训练集。照片我有很多……先整两万个试试?
But this training set is still not large enough, so I wanted to add more text-recognition labels. I have plenty of photos... how about 20,000 to start?
然后噩梦开始了……哈哈!之前做过几天"标签人",有点天昏地暗的感觉。现在要继续几万个……这个年就真的别过了……
And then the nightmare began... haha! I'd already spent days as a "labeling drone" before — a somewhat soul-crushing experience. Now, tens of thousands more? I could kiss the new year goodbye...
突然……我其实可以利用之前使用 YOLOv8 完成的"门牌目标检测识别"模型把照片里的门牌单独裁剪出来。然后交给 PPOCRLabel 做自动检测。这样至少工作量可以减少 90%!!!
Then it hit me — I could use the YOLOv8 doorplate detection model I'd already built to crop out the doorplates from photos, then feed them into PPOCRLabel for auto-labeling. That would cut manual work by at least 90%!
然后……遇到了 DeepSeek API 遭受恶意攻击……这 DeepSeek 是真的捅了马蜂窝啊!
And then... DeepSeek's API came under a malicious attack. DeepSeek really kicked the hornet's nest!
索性还有 TONGYI Lingma 可以使用,然后开始体会到 DeepSeek 的好了。之前 TONGYI Lingma 只是用来做辅助的,在使用 DeepSeek 出现卡壳的时候把问题丢给 TONGYI Lingma。现在主用 TONGYI Lingma 后发现,对于小白来说 DeepSeek 够自然……语言风格和逻辑思维都很自然!
Luckily TONGYI Lingma was still available, and I began to appreciate what made DeepSeek good. Before, TONGYI Lingma was just a backup — whenever DeepSeek got stuck I'd toss the problem over. Now that I was using TONGYI Lingma as the primary, I realized how natural DeepSeek had been for a newbie... the language style and logical flow were genuinely natural!
也是费了九牛二虎的力,终于……先给喂个两万张照片……哈哈!
After a ton of effort, finally... let's feed it 20,000 photos first... haha!