-
Notifications
You must be signed in to change notification settings - Fork 19.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change interpolation in apply_transform() from nearest to bilinear. #8849
Conversation
This is also a potentially breaking change. |
Yes, but it doesn't affect any pretrained models. Current default is highly unexpected, since we have fractional shifts, rotations, zooms and whatnot, and probably makes things worse vast majority of the time. I actually spent some time looking at But we could introduce |
This would break existing code for segmentation DA. |
what is "segmentation DA"? |
Sorry, |
I thought segmentation DA currently doesn't really work anyway: search for "segmentation" in #3338. Also see #6538. Also 2D softmax was merged only a couple of weeks ago. But it is a valid use case for nearest, thank you. BTW, for binary labels, and binary crossentropy, it may make things better. Automatic soft labels. |
That's what I found last time I tried things out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's go with this change. Hopefully it won't break any users...
I knew it! Use random linear interpolation for data & labels to improve stuff mixup: Beyond Empirical Risk Minimization (1017) |
* 'master' of github.com:fchollet/keras: (57 commits) Minor README edit Speed up Travis tests (keras-team#9386) fix typo (keras-team#9391) Fix style issue in docstring Prepare 2.1.4 release. Fix activity regularizer + model composition test Corrected copyright years (keras-team#9375) Change default interpolation from nearest to bilinear. (keras-team#8849) a capsule cnn on cifar-10 (keras-team#9193) Enable us to use sklearn to do cv for functional api (keras-team#9320) Add support for stateful metrics. (keras-team#9253) The type of list keys was float (keras-team#9324) Fix mnist sklearn wrapper example (keras-team#9317) keras-team#9287 Fix most of the file-handle resource leaks. (keras-team#9309) Pass current learning rate to schedule() in LearningRateScheduler (keras-team#8865) Simplify with from six.moves import input (keras-team#9216) fixed RemoteMonitor: Json to handle np.float32 and np.int32 types (keras-team#9261) Update tweet length from 140 to 280 in docs Add `depthconv_conv2d` tests (keras-team#9225) Remove `force` option in progbar ...
Before #2446, interpolation was inconsistently sometimes nearest, sometimes bicubic. AFAIK, in other libraries and tools default interpolation is never 'nearest'. Sometimes it's bicubic, sometimes it's bilinear. For Keras bilinear is better because it's much faster, and is something a single (de)convolutional layer can learn (i.e. it is, basically a single hardcoded non-trainable (de)convolutional layer. Which is not true of nearest, even with pooling.
Also see
load_img()
#8435