waldo-seg / waldo

image-segmentation and text-localization
Apache License 2.0
13 stars 13 forks source link

Some changes to shared code #31

Closed danpovey closed 6 years ago

danpovey commented 6 years ago

These changes document our decisions about order of indexes in the arrays, and also add a 'data_transformation.py' file where we will put things like random cropping. Note: some of these changes may break working code and cause compilation errors, e.g. I removed the 'train_image_size' arg from 'convert_to_combined_image' but didn't change the internal code much. Also my new functions are un-implemented, and my changes about order of indexes in arrays just change documentation, not the functions. @desh2608 is going to change some (before 'combined image'), and @YiwenShaoStephen the ones at and after 'combined image'.

@aarora8, please try to use the interfaces I sketched in data_transformation.py (or similar ones) when you downsize the madcat images. I was thinking of 'scale_down_image_with_objects'. We may later support more general, e.g. affine, transforms for images with objects, to generate augmented training data.

I want to remind people that if you ever change a function's behavior you need to keep the documentation in sync. The documentation should be considered the "master" reference for what a function should do.