Describir: How to Optimally Sample and Resample Images