sp.ndimage.zoom / tf.image.resize_images alternative
See original GitHub issueIt would be nice to have a batched image resize (interpolation) operation implemented in JAX, afaik these are scipy.ndimage.zoom
in scipy or tensorflow.image.resize_images
in Tensorflow.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
scipy.ndimage.zoom — SciPy v1.9.3 Manual
The array is zoomed using spline interpolation of the requested order. Parameters. inputarray_like. The input array. zoomfloat or sequence. The zoom factor ...
Read more >MRI mask 3D array resize with scipy.ndimage.zoom, the ...
This issue was asked in another post A weird image modification after applying scipy.ndimage.zoom function to a mri segmentation image and ...
Read more >When to use those similar layers in Keras?
Resizing ZeroPadding2D UpSampling2D sp.ndimage.zoom Conv2DTranspose Cropping2D. Group 2. Reshape RepeatVector.
Read more >Python Scipy Ndimage Zoom With Examples
In the above code, we have provided the image to a method zoom() with zoom factor equal to 1.5. View the zoomed image...
Read more >cupyx.scipy.ndimage.zoom — CuPy 11.4.0 documentation
cupyx.scipy.ndimage.zoom(input, zoom, output=None, order=3, mode='constant', ... The array is zoomed using spline interpolation of the requested order.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I spent a bit of time looking at this. My guess is that perhaps
skimage.transform.resize
(orrescale
) is a good choice? It looks to me likescipy.ndimage.zoom
suffers from some of the same pixel-centering bugs that TF’s resize bilinear used to suffer from (https://hackernoon.com/how-tensorflows-tf-image-resize-stole-60-days-of-my-life-aba5eb093f35)Good idea! Is
scipy.ndimage.zoom
the API you want?In the meantime here’s a pure-NumPy snippet you can use: