Code Monkey home page Code Monkey logo

ocr-baseline's Introduction

粤港澳街景图像中店面招牌文字识别比赛

本仓库是官方提供的 Baseline 代码,为了方便各位选手使用和交流我们的官方 Baseline 代码和计图框架,我们创建了官方 QQ 群聊 640858766,扫下面的二维码可以入群。

Jittor 是一个基于即时编译和元算子的高性能深度学习框架,整个框架在即时编译的同时,还集成了强大的 Op 编译器和调优器,为您的模型生成定制化的高性能代码。Jittor 还包含了丰富的高性能模型库,涵盖范围包括:图像识别、检测、分割、生成、可微渲染、几何学习、强化学习等。

Jittor 前端语言为 Python,使用了主流的包含模块化和动态图执行的接口设计,后端则使用高性能语言进行了深度优化。更多关于 Jittor 的信息可以参考:

使用之前请先通过 pip install -U jittor 更新 Jittor 框架,确保版本在 1.3.5 以上。

项目介绍

店面招牌是街景图像中的重要信息,自然场景下的文字识别也是计算机视觉的重要研究方向,两者结合的街景店面招牌文字识别技术正在大规模应用在地图导航及推荐、智能城市规划分析、商业区商业价值分析等实际落地领域,具有很高的研究价值和业务使用价值。

比赛网址: https://www.cvmart.net/race/10351/des

本项目基于国产框架计图 Jittor,实现了粤港澳街景图像中店面招牌文字识别比赛的 Baseline,整体采用了 ‘JDet-PixelLink-CRNN’ 的模型组合。

总体思路:

Step 1. 使用 JDet 检测出街景图像中的店面招牌;

Step 2. 使用 PixelLink 从招牌图像中检测出文本框位置,并选择最大的文本框作为候选;

Step 3. 使用 CRNN 从文本框图像中识别出文字。

示例:

训练与评测

模型训练

请移步到各模型目录下阅读 README.md

评测

第一步,根据街景图像,进行预测。请执行:

python prediction.py --image_dir [街景图片目录] --save_dir [保存预测文件目录]

或许,您需要重新指定模型参数路径,则可按以下方式执行:

python prediction.py -i [街景图片目录] -s [保存预测文件目录] -j [JDet模型参数路径] -p [PixelLink模型参数路径] -c [CRNN模型参数路径]

第二步,根据预测结果,进行评测。请执行:

python evaluation.py --pred_dir [预测文件目录] --gt_dir [真实值文件目录]

模型参数

已训练好的模型参数可通过以下地址进行下载:

JDet 模型参数:
https://cloud.tsinghua.edu.cn/f/0b1ed1cc311245ed901c/?dl=1

PixelLink 模型参数:
https://cloud.tsinghua.edu.cn/f/4e7e633085e241729e14/?dl=1

CRNN 模型参数:
https://cloud.tsinghua.edu.cn/f/2fc669b2dd6e475b9511/?dl=1

CRNN 预训练模型参数:
https://cloud.tsinghua.edu.cn/f/80825967dd344a91a2da/?dl=1

ocr-baseline's People

Contributors

letianlee avatar uyzhang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.