deep learning - how to prepare gray image data for caffe input -
i have read lots of references prepare image data caffe input have not been able solve problem yet!!
i have put .jpg
image files in 2 seperate folders:
folder train: containing 100,000 image files of size 227*227 folder val: containing 9,000 image files of size 227*227
i put them in folder in /home/user/dl
then made 2 text files listing names of images in train
, val
folders as:
. . p127.jpg 2 p943.jpg 2 p8765.jpg 1 . .
and put these 2 files in /home/user/caffe-master/data/dl
.
i made dl_create.sh
located in /home/user/caffe-master/examples/dl
bellow:
set -e example=examples/dl data=data/dl tools=build/tools train_data_root=/home/user/dl/train/ val_data_root=/home/user/dl/val/ resize=true if $resize; resize_height=227 resize_width=227 else resize_height=0 resize_width=0 fi if [ ! -d "$train_data_root" ]; echo "error: train_data_root not path directory: $train_data_root" echo "set train_data_root variable in create_dl.sh path" \ "where dl training data stored." exit 1 fi if [ ! -d "$val_data_root" ]; echo "error: val_data_root not path directory: $val_data_root" echo "set val_data_root variable in create_dl.sh path" \ "where dl validation data stored." exit 1 fi echo "creating train lmdb..." glog_logtostderr=1 $tools/convert_imageset \ --resize_height=$resize_height \ --resize_width=$resize_width \ --shuffle \ --gray \ $train_data_root \ $data/train.txt \ $example/dl_train_lmdb echo "creating val lmdb..." glog_logtostderr=1 $tools/convert_imageset \ --resize_height=$resize_height \ --resize_width=$resize_width \ --shuffle \ --gray \ $val_data_root \ $data/val.txt \ $example/dl_val_lmdb echo "done."
then when run dl_create.sh
script change image data lmdb
can not find images , gives messages like:
. . . e0922 14:35:24.152361 31301 io.cpp:80] not open or find file /home/user/caffe-master/data/dl/train/p84167.jpg e0922 14:35:24.160773 31301 io.cpp:80] not open or find file /home/user/caffe-master/data/dl/train/p24118.jpg . . .
could please me know doing mistake??!?!
the problem images had uint16 bitmap!! however, after lots of search found caffe works on uint8 bitmap
Comments
Post a Comment