Closed gopi77 closed 7 years ago
Executed commands below.
gopi@gp:~/crfasrnn$ git clone --recursive https://github.com/martinkersner/train-CRF-RNN Cloning into 'train-CRF-RNN'... remote: Counting objects: 166, done. remote: Total 166 (delta 0), reused 0 (delta 0), pack-reused 166 Receiving objects: 100% (166/166), 36.65 KiB | 0 bytes/s, done. Resolving deltas: 100% (94/94), done. Checking connectivity... done. Submodule 'py_img_seg_eval' (https://github.com/martinkersner/py_img_seg_eval.git) registered for path 'py_img_seg_eval' Cloning into 'py_img_seg_eval'... remote: Counting objects: 31, done. remote: Total 31 (delta 0), reused 0 (delta 0), pack-reused 31 Unpacking objects: 100% (31/31), done. Checking connectivity... done. Submodule path 'py_img_seg_eval': checked out 'c0bf9787ebbe3e5e2c7833efe78b5b2d392afaf1' gopi@gp:~/crfasrnn$ cd train-CRF-RNN/ gopi@gp:~/crfasrnn/train-CRF-RNN$ ln -s /home/gopi/crfasrnn/train-CRF-RNN/VOCdevkit/VOC2012/SegmentationClass labels gopi@gp:~/crfasrnn/train-CRF-RNN$ ln -s /home/gopi/crfasrnn/train-CRF-RNN/VOCdevkit/VOC2012/JPEGImages/ images gopi@gp:~/crfasrnn/train-CRF-RNN$ find labels/ -printf '%f\n' | sed 's/.png//' | tail -n +2 > train.txt gopi@gp:~/crfasrnn/train-CRF-RNN$ python filter_images.py labels/ train.txt gopi@gp:~/crfasrnn/train-CRF-RNN$ python data2lmdb.py 572 train images 62 test images Train images Traceback (most recent call last): File "data2lmdb.py", line 228, in main() File "data2lmdb.py", line 47, in main convert2lmdb(path_src, train_imgs, image_ext, path_dst, class_ids, preprocess_mode, im_sz, 'image') File "data2lmdb.py", line 154, in convert2lmdb img = preprocess_image(img, preprocess_mode, im_sz) File "data2lmdb.py", line 160, in preprocess_image img = preprocess_data(img, mode, im_sz, 'image') File "data2lmdb.py", line 190, in preprocess_data img = np.pad(img, ((0, im_sz-img.shape[0]), (0, im_sz-img.shape[1]), (0,0)), 'constant', constant_values=(0)) File "/usr/lib/python2.7/dist-packages/numpy/lib/arraypad.py", line 1318, in pad pad_width = _validate_lengths(narray, pad_width) File "/usr/lib/python2.7/dist-packages/numpy/lib/arraypad.py", line 1109, in _validate_lengths raise ValueError(fmt % (number_elements,)) ValueError: ((0, -247), (0, -372), (0, 0)) cannot contain negative values. gopi@gp:~/crfasrnn/train-CRF-RNN$
System info: OS: Ubuntu 16.04 gopi@gp:~$ python Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2
tried editing the comment, still many texts appear as crossed out, not sure why
Issue occurs when the im_sz = 128, (line 20 of data2lmdb.py) Reverted to original value of 500 & all ok after.
Executed commands below.
gopi@gp:~/crfasrnn$ git clone --recursive https://github.com/martinkersner/train-CRF-RNN Cloning into 'train-CRF-RNN'... remote: Counting objects: 166, done. remote: Total 166 (delta 0), reused 0 (delta 0), pack-reused 166 Receiving objects: 100% (166/166), 36.65 KiB | 0 bytes/s, done. Resolving deltas: 100% (94/94), done. Checking connectivity... done. Submodule 'py_img_seg_eval' (https://github.com/martinkersner/py_img_seg_eval.git) registered for path 'py_img_seg_eval' Cloning into 'py_img_seg_eval'... remote: Counting objects: 31, done. remote: Total 31 (delta 0), reused 0 (delta 0), pack-reused 31 Unpacking objects: 100% (31/31), done. Checking connectivity... done. Submodule path 'py_img_seg_eval': checked out 'c0bf9787ebbe3e5e2c7833efe78b5b2d392afaf1' gopi@gp:~/crfasrnn$ cd train-CRF-RNN/ gopi@gp:~/crfasrnn/train-CRF-RNN$ ln -s /home/gopi/crfasrnn/train-CRF-RNN/VOCdevkit/VOC2012/SegmentationClass labels gopi@gp:~/crfasrnn/train-CRF-RNN$ ln -s /home/gopi/crfasrnn/train-CRF-RNN/VOCdevkit/VOC2012/JPEGImages/ images gopi@gp:~/crfasrnn/train-CRF-RNN$ find labels/ -printf '%f\n' | sed 's/.png//' | tail -n +2 > train.txt gopi@gp:~/crfasrnn/train-CRF-RNN$ python filter_images.py labels/ train.txt gopi@gp:~/crfasrnn/train-CRF-RNN$ python data2lmdb.py 572 train images 62 test images Train images Traceback (most recent call last): File "data2lmdb.py", line 228, in
main()
File "data2lmdb.py", line 47, in main
convert2lmdb(path_src, train_imgs, image_ext, path_dst, class_ids, preprocess_mode, im_sz, 'image')
File "data2lmdb.py", line 154, in convert2lmdb
img = preprocess_image(img, preprocess_mode, im_sz)
File "data2lmdb.py", line 160, in preprocess_image
img = preprocess_data(img, mode, im_sz, 'image')
File "data2lmdb.py", line 190, in preprocess_data
img = np.pad(img, ((0, im_sz-img.shape[0]), (0, im_sz-img.shape[1]), (0,0)), 'constant', constant_values=(0))
File "/usr/lib/python2.7/dist-packages/numpy/lib/arraypad.py", line 1318, in pad
pad_width = _validate_lengths(narray, pad_width)
File "/usr/lib/python2.7/dist-packages/numpy/lib/arraypad.py", line 1109, in _validate_lengths
raise ValueError(fmt % (number_elements,))
ValueError: ((0, -247), (0, -372), (0, 0)) cannot contain negative values.
gopi@gp:~/crfasrnn/train-CRF-RNN$
System info: OS: Ubuntu 16.04 gopi@gp:~$ python Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2