All Projects → imistyrain → Caffe Oneclick

imistyrain / Caffe Oneclick

Use caffe to train your own data in just one click

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Caffe Oneclick

R2CNN
caffe re-implementation of R2CNN: Rotational Region CNN for Orientation Robust Scene Text Detection
Stars: ✭ 80 (-57.22%)
Mutual labels:  ocr, caffe
Caffe Augmentation
Data Augmentation for Caffe
Stars: ✭ 178 (-4.81%)
Mutual labels:  caffe
Nnef Tools
The NNEF Tools repository contains tools to generate and consume NNEF documents
Stars: ✭ 165 (-11.76%)
Mutual labels:  caffe
Video Caffe
Video-friendly caffe -- comes with the most recent version of Caffe (as of Jan 2019), a video reader, 3D(ND) pooling layer, and an example training script for C3D network and UCF-101 data
Stars: ✭ 172 (-8.02%)
Mutual labels:  caffe
Ocr Table
Extract tables from scanned image PDFs using Optical Character Recognition.
Stars: ✭ 165 (-11.76%)
Mutual labels:  ocr
Captcha break
验证码识别
Stars: ✭ 2,268 (+1112.83%)
Mutual labels:  ocr
Adelaidet
AdelaiDet is an open source toolbox for multiple instance-level detection and recognition tasks.
Stars: ✭ 2,565 (+1271.66%)
Mutual labels:  ocr
Android Ocr
Experimental optical character recognition app
Stars: ✭ 2,177 (+1064.17%)
Mutual labels:  ocr
Hidden Two Stream
Caffe implementation for "Hidden Two-Stream Convolutional Networks for Action Recognition"
Stars: ✭ 179 (-4.28%)
Mutual labels:  caffe
Swiftytesseract
A Swift wrapper around Tesseract for use in iOS, macOS, and Linux applications
Stars: ✭ 170 (-9.09%)
Mutual labels:  ocr
Senet Caffe
A Caffe Re-Implementation of SENet
Stars: ✭ 169 (-9.63%)
Mutual labels:  caffe
Deformable Convnets Caffe
Deformable Convolutional Networks on caffe
Stars: ✭ 166 (-11.23%)
Mutual labels:  caffe
Tesseract Ocr For Php
A wrapper to work with Tesseract OCR inside PHP.
Stars: ✭ 2,247 (+1101.6%)
Mutual labels:  ocr
Open Semantic Etl
Python based Open Source ETL tools for file crawling, document processing (text extraction, OCR), content analysis (Entity Extraction & Named Entity Recognition) & data enrichment (annotation) pipelines & ingestor to Solr or Elastic search index & linked data graph database
Stars: ✭ 165 (-11.76%)
Mutual labels:  ocr
Deep Text Recognition Benchmark
Text recognition (optical character recognition) with deep learning methods.
Stars: ✭ 2,665 (+1325.13%)
Mutual labels:  ocr
Caffe Yolo9000
Caffe for YOLOv2 & YOLO9000
Stars: ✭ 164 (-12.3%)
Mutual labels:  caffe
Text Detection
Text detection with mainly MSER and SWT
Stars: ✭ 167 (-10.7%)
Mutual labels:  ocr
Ocr
The Best Image OCR SDK For BAT
Stars: ✭ 173 (-7.49%)
Mutual labels:  ocr
Hms Ml Demo
HMS ML Demo provides an example of integrating Huawei ML Kit service into applications. This example demonstrates how to integrate services provided by ML Kit, such as face detection, text recognition, image segmentation, asr, and tts.
Stars: ✭ 187 (+0%)
Mutual labels:  ocr
License Plate Recognition Nigerian Vehicles
A python program that uses the concept of OCR using machine learning to identify the characters on a Nigerian license plate
Stars: ✭ 183 (-2.14%)
Mutual labels:  ocr

caffe一键式训练评估集成开发环境

Last Update 2020.07.08

概述

本项目提供一个集成式开发环境,在配好caffe环境的前提下,只需将准备好的图片放入data目录下,便可以一键生成lmdb数据文件、均值文件、标注文件和测试评估模型、找出错误样本、部署模型等所有的操作,更难能可贵的是它是跨平台的,可以无缝的在Windos和Linux间切换。

使用深度学习完成一个特定的任务比如说字符识别、人脸识别等大致可以分为数据准备、定义模型、训练模型、评估模型和部署模型等几个步骤。

配置caffe

现在配置caffe十分方便,仅需几行命令即可搞定,确保安装了所需的依赖,这里仅摘录最关键的部分,其余的详细内容可参见参考链接.

Windows

::为了减少日后不必要的麻烦,建议VS2015,Cuda8.0,cudnn5.1及以上,python2.7
git clone https://github.com/BVLC/caffe
cd caffe
git checkout windows
scripts\build_win.cmd

Linux

git clone https://github.com/BVLC/caffe
cd caffe
mkdir build
cd build
cmake ..
make -j8

1.数据准备

首先收集要任务相关的数据,这里准备了一个车牌字符数据(仅包含0-9共10个数字),直接解压data.zip到当前文件夹即可,格式如下图所示,每类图片对应一个文件夹,放到一个data文件夹下,注意格式一致型(都为.jpg或.png文件),仔细筛查,不要含有其他的非图片文件在里面,你也可以用自己的数据替换这些车牌字符数据。

structures

caffe使用了lmdb内存数据库等来加快训练时读取数据的速度,为此,caffe自带的tools里提供了一个工具(可由convert_imageset.cpp编译生成),它的输入是图片路径和标签对组成的文件,每次都手动生成这个文件不胜其烦。

我们希望是自动化的从文件夹读取的功能,因此,本项目通过preprocess/preprocess.py来获取如下图所示的文件夹下所有的文件路径以及对应的文件标签的功能,它输出训练和验证集preprocess/train.txt和preprocess/val.txt以及标签映射文件modef/labels.txt

你也可以直接下载已经转换好的lmdb.tar.gz文件直接使用

2.定义模型

训练定义文件位于models下的plate_train_test.prototxt,部署文件在deploy.prototxt,你可以通过网络结构可视化对这些网络进行可视化,以便更清晰的理解他们的含义

3.训练模型

./train.sh

4.评估模型

evaluation.py用来对data文件下下的数据进行评估,它会得出迭代次数为10000时模型的错误率,并且打印出误识别图片对应的真值和预测值,并把相应数据保存在error文件夹下,命名格式为字符文件夹/图片在文件夹内的序号_真值类别_预测类别(以0/190_0_4.jpg为例,代表0/190.jpg被误识为4),这些错误识别的样本需要仔细分析,不断调试参数,以获得期望的结果。

本项目提供了一个训练好的模型文件,其错误率低于0.1%,这就意味着其达到了99.9%以上的准确率。

5.部署模型

由于速度原因,实际中多使用C++而不是python进行部署,因此本项目在cpp文件夹下提供了evaluationcpp工程,它使用单例模式来防止每次预测都加载模型,只需使用如下代码即可在你的项目中一行代码使用CNN,此外,该项目也提供了对模型进行评估的功能。

 cv::Mat img=cv::imread("imagepath.jpg");
 string result=CnnPredictor::getInstance()->predict(img);

当然,你也可以运行calssification.bat来调用caffe自身进行分类识别

"../build/examples/cpp_classification/classification" "modeldef/deploy.prototxt" "trainedmodels/platerecognition_iter_1000.caffemodel" "modeldef/mean.binaryproto" "modeldef/labels.txt" "data/0/4-3.jpg"

其返回了最高的5个类别的相似度,不难看出训练的网络对于data/0/0.jpg有高达93%的概率认为其属于0这个字符,结果还是非常理想的

参考

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].