Comments (10)
@Godricly I do this two step
- convert the SynthText to xml format
- use the examples in https://github.com/weiliu89/caffe/tree/ssd to create LMDB file
from textboxes.
Thank you for the help. I got it done.
from textboxes.
Hi...I am new in caffe and i just know basic working of caffe. For single character recognition we just provide image path and label in train.txt and val.txt file. Can anyone please tell me in Textboxes what is format of train.txt and val.txt for creating lmdb?
My train.txt file contains image path and annotation file path for coco dataset is it right ? and how can we open lmdb file which contains annotations ?
Thank you.
from textboxes.
I used following code for reading LMDB file
import caffe
import lmdb
import numpy as np
import cv2
import matplotlib.pyplot as plt
from caffe.proto import caffe_pb2
lmdb_file='/home/arha/workarea/ocr_project/cocotext/data/lmdb/coco_val_lmdb'
lmdb_env = lmdb.open(lmdb_file)
lmdb_txn = lmdb_env.begin()
lmdb_cursor = lmdb_txn.cursor()
datum = caffe_pb2.Datum()
for key, value in lmdb_cursor:
datum.ParseFromString(value)
label = datum.label
print 'label=',label
data = caffe.io.datum_to_array(datum)
print data.shape
print 'data=',data
image = np.transpose(data, (1,2,0))
cv2.imshow('cv2', image)
cv2.waitKey(0)
print('{},{}'.format(key, label))
And It is giving output as follow
label= 0
(0, 0, 0)
data= []
OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /home/arha/softwares/opencv-2.4.13/modules/highgui/src/window.cpp, line 261
Traceback (most recent call last):
File "lm.py", line 28, in
cv2.imshow('cv2', image)
cv2.error: /home/arha/softwares/opencv-2.4.13/modules/highgui/src/window.cpp:261: error: (-215) size.width>0 && size.height>0 in function imshow
Please clear my doubts.
Thank you
from textboxes.
@Godricly Can you share the code for converting SynthText to xml format?
from textboxes.
You can do it following PASCAL format.
from textboxes.
Hello @Godricly & @zjuDebug ,
l have my own dataset. To create the LMBD file l need to
use the [](examples in https://github.com/weiliu89/caffe/tree/ssd) only or l have to convert my dataset into xml format ?
If yes, how can l convert mydataset to xml formalt ?
Thank you a lot
from textboxes.
from textboxes.
Thank you for your answer. How can convert my dataset to xml format so ?
Thank you
from textboxes.
from textboxes.
Related Issues (20)
- Running TextBoxes on Caffe installed in Anaconda3 env HOT 2
- can not compile the CRNN HOT 5
- cannot find -lopencv_imgcodes HOT 1
- 关于模型的参数设置问题 HOT 3
- demo.py takes about 0.4s per image, when the model load only once and single scale is 700*700
- 关于 multi-scale的问题
- 关于Test的一些问题 HOT 8
- when i run "python examples/TextBoxes/train_icdar13.py",the error is occured when i train on my dataset.
- importError: libhdf5.so.101 HOT 1
- Where to place the downloaded model?
- Failed to run make -j8 HOT 1
- 请问如何您有synthtext数据集格式转换为icdar格式的脚本嘛,谢谢您分享一下鸭
- 请问如何能分享一下synthtext格式转换为icdar格式的脚本吗,谢谢鸭
- testing results on Total-Text HOT 1
- call for loss info/curve.
- 关于TextBoxes_icdar13.caffemodel模型
- Question about mismatch between the code with original paper
- icdar13 dataset consists of 229 training images and 233 testing images,
- will this work as an OCR solution? HOT 1
- Fine tuning on custom dataset: converting to LMDB HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from textboxes.