mqdf python_GitHub - jugg1024/court_recognition
下载编译
下载
git clone --recuersive git@github.com:jugg1024/court_recognition.git
编译mqdf, 识别模块,得到OCRTool
cd mqdf && make
编译caffe-fast-rcnn,注意这里caffe有变动,需重新编译
cd Text-Detection-with-FRCN/py-faster-rcnn/caffe-fast-rcnn (配置caffe环境,写Makefile.config)
make -j16 && make pycaffe
编译fast-rcnn lib
cd Text-Detection-with-FRCN/py-faster-rcnn/lib
make
准备模型数据
检测模型,检测proto,识别模型,贴图字体,都在data目录下:
/home/ligen/court_recognition/data/test.prototxt \ #检测prototxt
/home/ligen/court_recognition/data/vgg16_faster_rcnn_on_court_img_iter_100000.caffemodel \ #检测weight
/home/ligen/court_recognition/mqdf/OCRTool \ #识别工具
/home/ligen/court_recognition/data/template_bimoment_chinese_4_1230train12_3_.dat \ #识别模型
demo
运行脚本1,./script/court_img_recognition.sh,可以可视化识别结果的脚本:
./python/court_video_text_detect.py
--data_type images \ #处理数据类型,可以使imags和videos
-if $1 \ #MP4文件或者jpg文件的目录
-of ./output/$2 \ #输出文件目录
--gpu 0 \ #gpu_id
--det_prototxt /home/ligen/court_recognition/data/test.prototxt \ #检测prototxt
--det_model /home/ligen/court_recognition/data/vgg16_faster_rcnn_on_court_img_iter_100000.caffemodel \ #检测weight
--ocr_tool /home/ligen/court_recognition/mqdf/OCRTool \ #识别工具
--ocr_model /home/ligen/court_recognition/data/template_bimoment_chinese_4_1230train12_3_.dat \ #识别模型
--limit 5 \ #单个视频输出有文字帧的上限
--interval 20 \ #采样帧的间隔
--recognize 1 \ #是否识别
--visualize 1 #是否可视化
封装类,及api,参考./python/court_rec.py
det_model = '/home/ligen/court_recognition/data/vgg16_faster_rcnn_on_court_img_iter_100000.caffemodel'
det_model_proto = '/home/ligen/court_recognition/data/test.prototxt'
rec_model = '/home/ligen/court_recognition/data/template_bimoment_chinese_4_1230train12_3_.dat'
rec_tool = '/home/ligen/court_recognition/mqdf/OCRTool'
gpu_id = 0 # -1 stand for cpu
初始化类,输入以上五个参数,分别是模型数据以及是否用gpu
cr = CourtRecognizor(det_model, det_model_proto, rec_model, rec_tool, gpu_id)
输入为im和框的二维数组im, b_rects, 输出为精确框以及识别结果bboxs,reg_results
im = cv2.imread('/home/ligen/court_recognition/demo/083_person_15_51s_grid24_bin17.jpg')
h, w, _ = im.shape
b_rects = [[0, 0, w, h]] # left top width height
bboxs, reg_results = cr.process(im, b_rects)
print bboxs
print reg_results
mqdf python_GitHub - jugg1024/court_recognition相关推荐
- demo python_GitHub - liutao910612/DEMO_Python
Email地址:^\w+([-+.]\w+)@\w+([-.]\w+).\w+([-.]\w+)*$ 域名:[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(/.[a-zA-Z0-9][-a ...
- github 运行python_Github Actions教程:运行python代码并Push到远端仓库
之前一篇文章介绍了AutoML论文聚合平台AutoML论文聚合平台zhuanlan.zhihu.com 因为频繁修改html文件很麻烦,所以这个平台是使用一个python脚本来生成. 具体生成的方法 ...
- 决策算法python_GitHub - nxety/MachineLearning_Python: 机器学习算法python实现
机器学习算法Python实现 目录 1.代价函数 其中: 下面就是要求出theta,使代价最小,即代表我们拟合出来的方程距离真实值最近 共有m条数据,其中代表我们要拟合出来的方程到真实值距离的平方,平 ...
- 最近很火的数据动图python_GitHub热榜第一,标星近万:这个用Python做交互式图形的项目火了...
乾明 发自 凹非寺 量子位 报道 | 公众号 QbitAI GitHub上,一份用Python做交互式图形的资源火了. 这一工具名为Bokeh,官方介绍称,它能读取大型数据集或者流数据,以简单快速的方 ...
- 腾讯云对象存储 python_GitHub - fushall1104/cos-python3-sdk: 腾讯云对象存储服务(cos)Python3.5版本SDK...
cos-python3-sdk 腾讯云对象存储服务(cos)Python3.5版本SDK *此版本非官方版本 项目进展:开发完成(分片上传待测试) 项目的来由:做基于Django个人网站时,采用了腾讯 ...
- rsa算法python_GitHub 热门:Python 算法大全,Star 超过 2 万
4 月 27 日,GitHub 趋势榜第 3 位是一个用 Python 编码实现的算法库,Star 数早已达到 26000+ 链接:https://github.com/TheAlgorithms/P ...
- github100天python_GitHub - 664028812/Python-100-Days: Python - 100天从新手到大师
Python - 100天从新手到大师 作者:骆昊 Python应用领域和就业形势分析 简单的说,Python是一个"优雅"."明确"."简单&quo ...
- mqdf matlab,mexopenCV的配置学习过程
前言 mexopenCV是一个十分实用的matlab工具箱,为matlab提供了openCV大部分的函数,用户可以在matlab中调用编译好的函数.详细介绍可以参考mexopencv官网. 准备 ma ...
- 天眼查python_GitHub - wagaman/Python-Tianyancha: 天眼查爬虫
Python-Tianyancha 2018-01-31 更新 看到有两位朋友提交了Issues,在这里集中回答一下. 这个项目是本人个人练习的项目,还很不完善,如果遇到问题,请提供详细描述或报错信息 ...
- 声纹识别开源框架python_GitHub - yeyupiaoling/VoiceprintRecognition-Tensorflow: 使用Tensorflow实现声纹识别,博客地址:...
前言 本章介绍如何使用Tensorflow实现简单的声纹识别模型,首先你需要熟悉音频分类,没有了解的可以查看这篇文章<基于Tensorflow实现声音分类>.基于这个知识基础之上,我们训练 ...
最新文章
- 系统设计与架构笔记:ETL工具开发和设计的建议
- 过去半年,二手楼市里的真实与残酷
- 《Android 开发入门与实战(第二版)》——6.6节配置改变
- mysql命令行批量添加数据_mysql命令行批量插入100条数据命令
- 【干货分享】32本优秀的 JavaScript 免费电子书
- C语言实现数据结构之栈的详解
- 银河麒麟v10更新异常问题
- Javascript实现的2048
- C++中 Map的了解与基本用法(代码演示+自我总结+map中一对多的用法)
- PATH和path,傻傻分不清
- Golang错误处理机制
- Ncurses 命令行图形库
- 用ghost备份和还原Linux系统(一)
- js两个问号代表什么_js中的Object.assign接受两个函数为参数的时候会发生什么?...
- e.target的用法
- 企业微信后台应用配置步骤
- 服务器没有显示器能接笔记本吗,笔记本能连显示器吗_笔记本能不能接显示器...
- win7麦克风没声音怎么设置
- 在DCore创建账户
- SPOJ 7258 SUBLEX 后缀自动机