Skip to content

victoriest/deep-learning-playgroud

Repository files navigation

deep-learning-playgroud

手写数字识别

How to use Keras fit and fit_generator (a hands-on tutorial)

文档边缘检测

目标是从照片识别出文档区域, 进行了两个模型的训练以及测试

路径1:

根据github项目https://github.com/senliuy/Keras_HED_with_modelhttps://github.com/lc82111/Keras_HED进行实践, 1. 下载训练数据:http://vcl.ucsd.edu/hed/HED-BSDS.tar 并解压到工程根目录下 2. 下载预训练模型:https://github.com/fchollet/deep-learning-models/releases 中搜索文件’vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5‘,下载并拷贝到./models目录下

路径2:

根据这篇文章:深度学习实践文档检测, 以及github项目https://github.com/RRanddom/tf_doc_localisation进行的相关的文档边缘检测实践.

不定长文本识别

参照github项目: https://github.com/YCG09/chinese_ocr进行实践

其中遇到的坑:

原型工程: ctpn: https://github.com/eragonruan/text-detection-ctpn chinese_ocr: https://github.com/YCG09/chinese_ocr

首先下载两个工程, 并按照readme安装相关依赖的python库

我们的首要使用的工程是chinese_ocr, 在该工程里, 有一个ctpn的目录, 该目录是一个cptn的模型, 这个比较麻烦, 重点讲这里:

在windows环境中, 需要使用c编译两个(三个?)库. 其目录在cptn/lib/utils中, 在linux环境下, 直接make.sh就可以了, 但是在windows下我们需要如下N步: 需要在命令行下, 进入该目录:

cython bbox.pyx
cython cython_nms.pyx
Cython nms.pyx
cython gpu_nms.pyx(GPU可选)

Python setup.py build_ext--inplace

不出意料的话会报错: 这时候就需要ctpn的工程下同目录的setup.py了,

from distutils.core import setup

Import numpy as np
From Cython.Build import cythonize

numpy_include=np.get_include()
#setup(ext_modules=cythonize("bbox.pyx"),include_dirs=[numpy_include])
setup(ext_modules=cythonize("cython_nms.pyx"),include_dirs=[numpy_include])

把编译好的东西拷贝到ctpn的工程的utils目录下 哦对了 你会遇到这个问题:

"ValueError: Buffer dtype mismatch, expected 'int_t' but got 'long long'" for sample_with_gt_wrapper 

改成 intp_t重新编译即可 CharlesShang/FastMaskRCNN#163

参考连接: 与CPTN(文字识别网络)作斗争的记录 来自 https://www.jianshu.com/p/027e9399e699

win10+tensorflow CPU 部署CTPN环境 来自 https://blog.csdn.net/u010554381/article/details/86519960

文本识别text-detection-ctpn环境搭建 来自 https://blog.csdn.net/qq_35513792/article/details/89174958

https://github.com/Li-Ming-Fan/OCR-DETECTION-CTPN eragonruan/text-detection-ctpn#73

参考文档

参考的git项目:

https://github.com/qjadud1994/CRNN-Keras https://github.com/xiaofengShi/CHINESE-OCR https://github.com/sbillburg/CRNN-with-STN https://github.com/eragonruan/text-detection-ctpn

常用的模型预训练数据的github项目

https://github.com/fchollet/deep-learning-models/releases

Tensorflow各种官方的预训练模型 - TensorFlow-Slim image classification model library

https://github.com/tensorflow/models/tree/1af55e018eebce03fb61bba9959a04672536107d/research/slim

对比许多模型在多个数据集中的测试效果的表格 - What is the class of this image ?

http://rodrigob.github.io/are_we_there_yet/build/classification_datasets_results.html

数据集

深度学习开放数据集

数据集大全:25个深度学习的开放数据集

CASIA Online and Offline Chinese Handwriting Databases

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published