sukritshankar / Caffe-LMDBCreation-MultiLabel

Creation of LMDB for training a multi-label loss in Caffe
71 stars 35 forks source link

not able to generate lmdb #2

Open kushNumberTheory opened 7 years ago

kushNumberTheory commented 7 years ago

i gave path to each and every variable in create_data_lmdb.sh

EXAMPLE=/home/kush/Desktop/Caffe_project/lmdbs       # Path where the output LMDB is stored
DATA=/home/kush/Desktop/Caffe_project/                          # Path where the data.txt file is present 
TOOLS=/home/kush/caffe/tools                        Caffe dependency to access the convert_imageset 
DATA_ROOT=/home/kush/Desktop/Caffe_project/traintemp/ 

GLOG_logtostderr=1 $TOOLS/convert_imageset.cpp \
    $DATA_ROOT \
    $DATA/data.txt \
    $EXAMPLE/data_lmdb

Example = my empty directory to get the output my data.txt file looks like this```

"COCO_train2014_000000000009.jpg 0 COCO_train2014_000000000025.jpg 1 COCO_train2014_000000000030.jpg 2

tool= path to my caffe repository where convert_imageset.cpp is located
DATA_ROOT = path to the images.
But i dont know why i am not able to get lmdb output. My console output is

Creating data lmdb... /home/kush/caffe/tools/convert_imageset.cpp: line 1: //: Is a directory /home/kush/caffe/tools/convert_imageset.cpp: line 2: //: Is a directory /home/kush/caffe/tools/convert_imageset.cpp: line 3: //: Is a directory /home/kush/caffe/tools/convert_imageset.cpp: line 4: //: Is a directory /home/kush/caffe/tools/convert_imageset.cpp: line 5: //: Is a directory /home/kush/caffe/tools/convert_imageset.cpp: line 6: //: Is a directory /home/kush/caffe/tools/convert_imageset.cpp: line 7: //: Is a directory /home/kush/caffe/tools/convert_imageset.cpp: line 8: //: Is a directory /home/kush/caffe/tools/convert_imageset.cpp: line 9: //: Is a directory /home/kush/caffe/tools/convert_imageset.cpp: line 27: syntax error near unexpected token (' /home/kush/caffe/tools/convert_imageset.cpp: line 27:using namespace caffe; // NOLINT(build/namespaces)' Done. What i am doing wrong

kushNumberTheory commented 7 years ago

Ok.. so the problem was my Caffe was not build. But now it gives me different error

/home/kush/Desktop/Caffe_project/traintemp/
I0120 11:09:49.811153 18716 convert_imageset.cpp:89] A total of 10 images.
F0120 11:09:49.811308 18716 db_lmdb.cpp:13] Check failed: mkdir(source.c_str(), 0744) == 0 (-1 vs. 0) mkdir /home/kush/Desktop/Caffe_project/lmdbs/data_lmdb failed
*** Check failure stack trace: ***
    @     0x7f3f8b3fedaa  (unknown)
    @     0x7f3f8b3fece4  (unknown)
    @     0x7f3f8b3fe6e6  (unknown)
    @     0x7f3f8b401687  (unknown)
    @     0x7f3f8ba824f1  caffe::db::LMDB::Open()
    @           0x403e4c  main
    @     0x7f3f8a3f6f45  (unknown)
    @           0x40521b  (unknown)
    @              (nil)  (unknown)
./create_data_lmdb.sh: line 31: 18716 Aborted                 (core dumped) GLOG_logtostderr=1 $TOOLS/convert_imageset $DATA_ROOT $DATA/data.txt $EXAMPLE/data_lmdb
kushNumberTheory commented 7 years ago

For further i got new error now while creating data.binaryproto cannot execute binary file: Exec format error

sukritshankar commented 7 years ago

Hi ! I am not sure of this error frankly !! I have never seen this !! I have a deadline on 24th !! I can look into this after that !! Thanks !!

On Fri, Jan 20, 2017 at 5:40 AM, kushNumberTheory notifications@github.com wrote:

Ok.. so the problem was my Caffe was not build. But now it gives me different error

/home/kush/Desktop/Caffe_project/traintemp/ I0120 11:09:49.811153 18716 convert_imageset.cpp:89] A total of 10 images. F0120 11:09:49.811308 18716 db_lmdb.cpp:13] Check failed: mkdir(source.c_str(), 0744) == 0 (-1 vs. 0) mkdir /home/kush/Desktop/Caffe_project/lmdbs/data_lmdb failed Check failure stack trace: @ 0x7f3f8b3fedaa (unknown) @ 0x7f3f8b3fece4 (unknown) @ 0x7f3f8b3fe6e6 (unknown) @ 0x7f3f8b401687 (unknown) @ 0x7f3f8ba824f1 caffe::db::LMDB::Open() @ 0x403e4c main @ 0x7f3f8a3f6f45 (unknown) @ 0x40521b (unknown) @ (nil) (unknown) ./create_data_lmdb.sh: line 31: 18716 Aborted (core dumped) GLOG_logtostderr=1 $TOOLS/convert_imageset $DATA_ROOT $DATA/data.txt $EXAMPLE/data_lmdb

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sukritshankar/Caffe-LMDBCreation-MultiLabel/issues/2#issuecomment-273982387, or mute the thread https://github.com/notifications/unsubscribe-auth/AIN9tXpPedVzuKnwPY06LINQst3khtthks5rUEjEgaJpZM4LoG3_ .

pearlmary commented 6 years ago

how to convert binary images to lmdb format using convert_imageset in caffe-master???????????

NarcissusInMirror commented 4 years ago

Ok.. so the problem was my Caffe was not build. But now it gives me different error

/home/kush/Desktop/Caffe_project/traintemp/
I0120 11:09:49.811153 18716 convert_imageset.cpp:89] A total of 10 images.
F0120 11:09:49.811308 18716 db_lmdb.cpp:13] Check failed: mkdir(source.c_str(), 0744) == 0 (-1 vs. 0) mkdir /home/kush/Desktop/Caffe_project/lmdbs/data_lmdb failed
*** Check failure stack trace: ***
    @     0x7f3f8b3fedaa  (unknown)
    @     0x7f3f8b3fece4  (unknown)
    @     0x7f3f8b3fe6e6  (unknown)
    @     0x7f3f8b401687  (unknown)
    @     0x7f3f8ba824f1  caffe::db::LMDB::Open()
    @           0x403e4c  main
    @     0x7f3f8a3f6f45  (unknown)
    @           0x40521b  (unknown)
    @              (nil)  (unknown)
./create_data_lmdb.sh: line 31: 18716 Aborted                 (core dumped) GLOG_logtostderr=1 $TOOLS/convert_imageset $DATA_ROOT $DATA/data.txt $EXAMPLE/data_lmdb

this is because the directory has already existed, the script may create the directory when you run it before, but there may be some error which makes you didn't aware of.