mxnet-ssd icon indicating copy to clipboard operation
mxnet-ssd copied to clipboard

ImageDetRecordIOParser: label_pad_width: 350 smaller than estimated width: 380

Open dingding2 opened this issue 7 years ago • 3 comments

Hi, guys~ After turning my own data into .rec, .Ist files, I ran then train.py when I met problem like this ` src/io/iter_image_det_recordio.cc:281: ImageDetRecordIOParser: /home/ding/detector/mxnet-ssd/data/train.rec, use 39 threads for decoding.. Traceback (most recent call last): File "train.py", line 146, in tensorboard=args.tensorboard) File "/home/ding/detector/mxnet-ssd/train/train_net.py", line 223, in train_net label_pad_width=label_pad_width, path_imglist=train_list, **cfg.train) File "/home/ding/detector/mxnet-ssd/dataset/iterator.py", line 60, in init **kwargs) File "/usr/local/lib/python2.7/dist-packages/mxnet/io.py", line 936, in creator ctypes.byref(iter_handle))) File "/usr/local/lib/python2.7/dist-packages/mxnet/base.py", line 149, in check_call raise MXNetError(py_str(_LIB.MXGetLastError())) mxnet.base.MXNetError: [15:40:36] src/io/iter_image_det_recordio.cc:327: ImageDetRecordIOParser: label_pad_width: 350 smaller than estimated width: 380

Stack trace returned 10 entries: [bt] (0) /usr/local/lib/python2.7/dist-packages/mxnet/libmxnet.so(+0x30cbe2) [0x7fd8c901bbe2] [bt] (1) /usr/local/lib/python2.7/dist-packages/mxnet/libmxnet.so(+0x30d1b8) [0x7fd8c901c1b8] [bt] (2) /usr/local/lib/python2.7/dist-packages/mxnet/libmxnet.so(+0x2a1cda0) [0x7fd8cb72bda0] [bt] (3) /usr/local/lib/python2.7/dist-packages/mxnet/libmxnet.so(+0x2a1dbfa) [0x7fd8cb72cbfa] [bt] (4) /usr/local/lib/python2.7/dist-packages/mxnet/libmxnet.so(+0x2a198dd) [0x7fd8cb7288dd] [bt] (5) /usr/local/lib/python2.7/dist-packages/mxnet/libmxnet.so(+0x2a03fde) [0x7fd8cb712fde] [bt] (6) /usr/local/lib/python2.7/dist-packages/mxnet/libmxnet.so(+0x2a0361d) [0x7fd8cb71261d] [bt] (7) /usr/local/lib/python2.7/dist-packages/mxnet/libmxnet.so(MXDataIterCreateIter+0x1d0) [0x7fd8cb5ee180] [bt] (8) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c) [0x7fd955de9e40] [bt] (9) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x2eb) [0x7fd955de98ab]`.

In the file of 'iter_image_det_recordio.cc', I found this code if (max_label_width > param_.label_pad_width) { if (param_.label_pad_width > 0) { LOG(FATAL) << "ImageDetRecordIOParser: label_pad_width: " << param_.label_pad_width << " smaller than estimated width: " << max_label_width; } param_.label_pad_width = max_label_width; }. I found the estimated width increased as my data capacity increased. The hint noticed my params --label-width(label_pad_width in the .cc code) was smaller than the estimated width( max_label_width in the .cc code). What does the label-width mean? And how was the estimated width calculated? What may be the problems in my dataset?

dingding2 avatar Jul 04 '18 08:07 dingding2

This is the padding for label because labels can have arbitrary size. You can increase the pad-width manually.

zhreshold avatar Jul 04 '18 19:07 zhreshold

how should I increase the pad-width manually?

lbg12345 avatar Oct 03 '18 09:10 lbg12345

specify label_width manually: https://mxnet.incubator.apache.org/api/python/io/io.html?highlight=imagedetrecorditer#mxnet.io.ImageDetRecordIter

zhreshold avatar Oct 03 '18 17:10 zhreshold