aleju / imgaug

Image augmentation for machine learning experiments.
http://imgaug.readthedocs.io
MIT License
14.44k stars 2.45k forks source link

grid = seq.draw_grid(image, cols=8, rows=8) #20

Closed Sophia-intel closed 7 years ago

Sophia-intel commented 7 years ago

after load image,make draw_grid(image,cols=8,rows=8),there have a problem boundary mode not supported.how to deal with?

aleju commented 7 years ago

You will have to post your whole augmentation sequence and the full error message. A quick googling makes it sound like you might have chosen an invalid value for mode in Affine.

Sophia-intel commented 7 years ago

full error: -PC:~/Downloads/imgaug-master$ python ./generate_example_images.py /usr/lib/python2.7/dist-packages/skimage/segmentation/slic_superpixels.py:96: UserWarning: Default value of keyword sigma changed from 1 to 0. warnings.warn('Default value of keyword sigma changed from 1 ' Traceback (most recent call last): File "./generate_example_images.py", line 177, in main() File "./generate_example_images.py", line 15, in main draw_single_sequential_images() File "./generate_example_images.py", line 56, in draw_single_sequential_images grid = seq.draw_grid(image, cols=8, rows=8) File "/home/wxb/Downloads/imgaug-master/imgaug/augmenters.py", line 271, in draw_grid augs.append(det.augment_images([image] (rows cols))) File "/home/Downloads/imgaug-master/imgaug/augmenters.py", line 170, in augment_images hooks=hooks File "/home/Downloads/imgaug-master/imgaug/augmenters.py", line 547, in _augment_images hooks=hooks File "/home/Downloads/imgaug-master/imgaug/augmenters.py", line 170, in augment_images hooks=hooks File "/home/Downloads/imgaug-master/imgaug/augmenters.py", line 683, in _augment_images hooks=hooks File "/home/Downloads/imgaug-master/imgaug/augmenters.py", line 170, in augment_images hooks=hooks File "/home/Downloads/imgaug-master/imgaug/augmenters.py", line 555, in _augment_images hooks=hooks File "/home/Downloads/imgaug-master/imgaug/augmenters.py", line 170, in augment_images hooks=hooks File "/home/Downloads/imgaug-master/imgaug/augmenters.py", line 2725, in _augment_images cval=cval File "/usr/lib/python2.7/dist-packages/skimage/transform/_geometric.py", line 1085, in warp mode=mode, order=order, cval=cval) File "/usr/lib/python2.7/dist-packages/scipy/ndimage/interpolation.py", line 300, in map_coordinates mode = _extend_mode_to_code(mode) File "/usr/lib/python2.7/dist-packages/scipy/ndimage/interpolation.py", line 45, in _extend_mode_to_code mode = _ni_support._extend_mode_to_code(mode) File "/usr/lib/python2.7/dist-packages/scipy/ndimage/_ni_support.py", line 52, in _extend_mode_to_code raise RuntimeError('boundary mode not supported') RuntimeError: boundary mode not supported Exception TypeError: TypeError("'NoneType' object is not callable",) in <bound method UmfpackContext.new_del of <scipy.sparse.linalg.dsolve.umfpack.umfpack.UmfpackContext object at 0x7fda3efa3210>> ignored don't know what the problem it is!

aleju commented 7 years ago

Your skimage version seems to be fairly outdated. The warning shown was removed about two years ago. Try running sudo pip install --upgrade skimage. It should work with version 0.12.x .

Sophia-intel commented 7 years ago

I have done sudo pip install --upgrade scikit-image && sudo pip install --upgrade Cython ,it really worked,thank you very much,this code really help me enlarge my dateset!