train.txt
, train_label.txt
, val.txt
, val_label.txt
) indicating path to each image in each folder. For many days, it is taking my time and still I am not successful. I am a beginner in python
and caffe
I will be thankful if somebody helps me here. I tried the attached code. Creating Training Data LMDB File .....
0 /home/user2/caffe-pascalcontext-fcn32s/dataset/Train/PNG/image-001-001.png
(281, 389)
(1, 281, 389)
Traceback (most recent call last):
File "lmdb_data.py", line 104, in <module>
img_to_lmdb(train_img_paths, train_img_lmdb)
File "lmdb_data.py", line 46, in img_to_lmdb
im_dat = caffe.io.array_to_datum(im)
File "/home/user2/caffe-master/python/caffe/io.py", line 78, in array_to_datum
datum.float_data.extend(arr.flat)
File "/home/user2/anaconda2/envs/caffeenv/lib/python2.7/site-packages/google/protobuf/internal/containers.py", line 275, in extend
new_values = [self._type_checker.CheckValue(elem) for elem in elem_seq_iter]
File "/home/user2/anaconda2/envs/caffeenv/lib/python2.7/site-packages/google/protobuf/internal/type_checkers.py", line 108, in CheckValue
raise TypeError(message)
TypeError: 66 has type <type 'numpy.int32'>, but expected one of: ((<type 'float'>, <type 'int'>, <type 'long'>),)
convert_imageset
(Caffe built-in converter) for this task? If yes, please let me know how can I do that?Your help is really appreciated.