FCN + Multilabel Caffe方法综述

Multilabel Caffe方法综述

说明:一年前项目总结。

法一:FCN的车牌图像识别,end-to-end 目标定位、图像识别

优点:全图识别带分割框

代码位置:E:\FCN+MultiLabel\FCN+detect

步骤:https://github.com/CrazyVertigo/digits2.0

To train:

  • Git clone and put it into CAFFE_ROOT/examples/;

E:\FCN\digit-fdigit\examples

  • Download the fcn-32s-pascalcontext.caffemodel here and move it into CAFFE_ROOT/models/fcn-32s-pascalcontext.caffemodel;
  • Download the dataset and put it into CAFFE_ROOT/data/;

其中mat为下图对应的像素值,底为0,其他对应为label值

命名方式为:一一对应

  • Run CAFFE_ROOT/examples/digits2.0/covert.py for converting data into lmdb;
  • Run solve.py to start training.

To test:

  • Download the pre-trained model or train your own model as mentioned above;
  • Run CAFFE_ROOT/examples/digits2.0/test_fcn11_full.m(need Matlab and matcaffe);
  • E:\FCN+MultiLabel\FCN+detect\vs2013_caffe_FCN  纯C代码使用,根据下图进行结果筛选显示

 

 

 

法二:slice和concat实现MultiTask

E:\FCN+MultiLabel\FCN+slice

https://github.com/ChenJoya/Caffe_MultiLabel_Classification

标签制作方式:

Audi : 0

BMW : 1

Benz : 2

 

Sedan: 0

SUV : 1

For instance, if there is a Audi SUV in thepicture, the label's format would be:

xxx.jpg 0 1 例如下图:

1.jpg 0 0

2.jpg 0 0

3.jpg 0 1

4.jpg 0 1

5.jpg 1 0

6.jpg 1 0

7.jpg 1 1

8.jpg 1 1

9.jpg 2 0

10.jpg 2 0

11.jpg 2 1

12.jpg 2 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

法三:multilabel 基于回归实现多标签识别,去掉softmax回归

目录:E:\FCN+MultiLabel\multilabel

第一步:step1 generateData-multilabel

生成数据标签txt文件

90\2017_10_11_22_33_8_5960.bmp1012Norm.jpg1 0 0 0 0 0 0 0 0 1 0

3\14968norm.bmp 0 0 0 1 0 0 0 0 0 0 0

5\19068norm.bmp 0 0 0 0 0 1 0 0 0 0 0

 

图像路径后面的标签对应的意思为:90\2017_10_11_22_33_8_5960.bmp1012Norm.jpg 1 0 0 0 0 0 0 0 0 1 0对应该jpg图片为多标签类,标签为0或者9,其中0 1 2 3 4 5 6 7 8 9 10分别对应数字 0 1 2 3 4 5 6 7 8 9 和背景类。

 

第二步:step2_generateData_python

利用python生成对应的hdf5文件,缺陷,占用内存空间非常大。

 

 

 

你可能感兴趣的:(字符识别OCR研究)