weiliu89 / caffe

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

creat lmdb file error with coco dateset #716

Closed Anhaoxu closed 7 years ago

Anhaoxu commented 7 years ago

Hello @weiliu89 , I followed the instruction to create lmdb files for coco, only changed the classes, the problem is it's ok for my test lmdb,but for train lmdb, it met the following mistakes, why it happened? I0820 19:07:13.075296 7382 convert_annoset.cpp:122] A total of 118287 images. I0820 19:07:13.075664 7382 db_lmdb.cpp:35] Opened lmdb /home/liu/data/coco/lmdb/coco_train_lmdb F0820 19:07:13.136318 7382 io.cpp:393] Unknown name: 17 Check failure stack trace: @ 0x7f4a3168f5cd google::LogMessage::Fail() @ 0x7f4a31691433 google::LogMessage::SendToLog() @ 0x7f4a3168f15b google::LogMessage::Flush() @ 0x7f4a31691e1e google::LogMessageFatal::~LogMessageFatal() @ 0x7f4a31cbf1d8 caffe::ReadJSONToAnnotatedDatum() @ 0x7f4a31cbf5f1 caffe::ReadRichImageToAnnotatedDatum() @ 0x407dba main @ 0x7f4a30607830 __libc_start_main @ 0x4089d9 _start @ (nil) (unknown) /home/liu/caffe-ssd/build/tools/convert_annoset --anno_type=detection --label_type=json --label_map_file=/home/liu/caffe-ssd/data/coco/../../data/coco/labelmap_coco.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/liu/data/coco/ /home/liu/caffe-ssd/data/coco/../../data/coco/train.txt /home/liu/data/coco/lmdb/coco_train_lmdb How to solve the problem? my labels are: 1,1,person 2,2,bicycle 3,3,car 4,4,motorcycle 6,5,bus 8,6,truck

FoolishMao commented 6 years ago

@Anhaoxu so, may I ask for the method how you solve? thanks!

Haffon commented 5 years ago

I'm using coco data 2017, and have the same error: Unknown name: 98/121(two unknown names), and I checked the data/coco/labelmap_coco.prototxt file, 98/121 is not listed in it, I think I need update the labelmap_coco.prototxt file. If @FoolishMao you are using the coco data 2014, name 17 should inside labelmap_coco.prototxt already.

Haffon commented 5 years ago

I suddenly add the coco 2017 caption and stuff label to detection dataset, and the full labelmap_coco.prototxt can be created with https://github.com/nightrome/cocostuff/blob/master/labels.txt There is only 80 categories in the original instances dataset.

Haffon commented 5 years ago

No need to edit labelmap_coco.prototxt, coco 2014 and 2017 have the same labels. caption and stuff shouldn't be used with train/val for detection network.