Neuroglycerin / neukrill-net-tools

Tools coded as part of the NDSB competition.
MIT License
0 stars 0 forks source link

Bug with augment.py in new commit #77

Closed gngdb closed 9 years ago

gngdb commented 9 years ago

When loading a preprocessing function to simply resize an image my images are coming back non-resized. Should make a unit test to make sure this stays fixed.

ipdb> print(image.shape)
(66, 59)
ipdb> print(processing_settings)
{u'resize': [48, 48]}
ipdb> processing = neukrill_net.augment.augmentation_wrapper(processing_settings)
ipdb> print(processing(image)[0].shape)
(66, 59)
scottclowe commented 9 years ago

I changed augmentation_wrapper to take keyword ags instead of a dictionary.

Change it to:

processing = neukrill_net.augment.augmentation_wrapper(**processing_settings)
scottclowe commented 9 years ago

I changed it to **kwargs because I needed to set a default value for the units variable, and that input should still be handled the same way as the rest. I'm pretty sure this is the proper way to do things in python.

gngdb commented 9 years ago

Yeah, seems better. Guess we already have a unit test for this. Only one call to augmentation_wrapper to fix in the dense dataset initialisation. Fixing that myself now.