weiliu89 / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
4.77k stars 1.67k forks source link

Getting error on running create_data.sh on my own dataset #588

Closed tahasadr closed 7 years ago

tahasadr commented 7 years ago

Hi, @weiliu89 I want to train ssd on my own dataset with 3 classes. I edited labelmap_voc.prototxt to support my classes. I also change num_classes to 4 (3 classes + background) in ssd_pascal.py. I can run create_list and generate 3 filses: test.txt, test_name_size.txt and trainval.txt. but when i run create_data.sh i get this error:

F0513 15:52:03.805228 22320 io.cpp:325] Check failed: 'anno' Must be non NULL Check failure stack trace: @ 0x7f68e53b9daa (unknown) @ 0x7f68e53b9ce4 (unknown) @ 0x7f68e53b96e6 (unknown) @ 0x7f68e53bc687 (unknown) @ 0x7f68e582e3bd google::CheckNotNull<>() @ 0x7f68e5829041 caffe::ReadXMLToAnnotatedDatum() @ 0x7f68e582ab9e caffe::ReadRichImageToAnnotatedDatum() @ 0x404b7b main @ 0x7f68e43b5f45 (unknown) @ 0x405ea2 (unknown) @ (nil) (unknown)

zgplvyou commented 7 years ago

maybe the path of your annotation folder is wrong . if you put you data under the VOCdevkit folder as the style of VOC0712.(Annotations ImageSets JPGEimages ),note that the names of the three folders cannot be wrong. then ,run the creat_list and the creat_data ,it will be work

FLsur commented 7 years ago

Hi @tahasadr , it would help if you put the previous output of the command. I am facing the same problem as you, i want to train ssd on my own dataset, with 3 classes. I get this error:

sur@kungfu:~/SSD_single_shot_multibox_detector/caffe/data/dummy_db$ ./create_data.sh /home/sur/SSD_single_shot_multibox_detector/caffe/build/tools/convert_annoset --anno_type=detection --label_type=xml --label_map_file=/home/sur/SSD_single_shot_multibox_detector/caffe/data/dummy_db/../../data/dummy_db/labelmap_SUR.prototxt --check_label=True --min_dim=0 --max_dim=0 --resize_height=0 --resize_width=0 --backend=lmdb --shuffle=False --check_size=False --encode_type=jpg --encoded=True --gray=False /home/sur/data/SURDatasets/ /home/sur/SSD_single_shot_multibox_detector/caffe/data/dummy_db/../../data/dummy_db/test.txt /home/sur/data/SURDatasets/dummy_db/lmdb/dummy_db_test_lmdb I0518 12:47:28.488996 23238 convert_annoset.cpp:122] A total of 8 images. I0518 12:47:28.489323 23238 db_lmdb.cpp:35] Opened lmdb /home/sur/data/SURDatasets/dummy_db/lmdb/dummy_db_test_lmdb I0518 12:47:30.988039 23238 convert_annoset.cpp:201] Processed 8 files. /home/sur/SSD_single_shot_multibox_detector/caffe/build/tools/convert_annoset --anno_type=detection --label_type=xml --label_map_file=/home/sur/SSD_single_shot_multibox_detector/caffe/data/dummy_db/../../data/dummy_db/labelmap_SUR.prototxt --check_label=True --min_dim=0 --max_dim=0 --resize_height=0 --resize_width=0 --backend=lmdb --shuffle=False --check_size=False --encode_type=jpg --encoded=True --gray=False /home/sur/data/SURDatasets/ /home/sur/SSD_single_shot_multibox_detector/caffe/data/dummy_db/../../data/dummy_db/trainval.txt /home/sur/data/SURDatasets/dummy_db/lmdb/dummy_db_trainval_lmdb I0518 12:47:31.442313 23244 convert_annoset.cpp:122] A total of 72 images. I0518 12:47:31.442631 23244 db_lmdb.cpp:35] Opened lmdb /home/sur/data/SURDatasets/dummy_db/lmdb/dummy_db_trainval_lmdb F0518 12:47:39.947108 23244 io.cpp:292] Unknown name: other Check failure stack trace: @ 0x7f5edfe4bdaa (unknown) @ 0x7f5edfe4bce4 (unknown) @ 0x7f5edfe4b6e6 (unknown) @ 0x7f5edfe4e687 (unknown) @ 0x7f5ee0405c7e caffe::ReadXMLToAnnotatedDatum() @ 0x7f5ee0406e8e caffe::ReadRichImageToAnnotatedDatum() @ 0x404bab main @ 0x7f5edee56ec5 (unknown) @ 0x405ed2 (unknown) @ (nil) (unknown)

It is a very small dataset (80 images)

weiliu89 commented 7 years ago

You guys should go to the code itself and debug the problem

FLsur commented 7 years ago

Already solved the problem. Turned out some of the XML annotation files were badly created, with mispelled classes names.

Thank you very much

tahasadr commented 7 years ago

The problem solved. My annotation xml files had some problems.