resize-right
Resize Right
What it is and what it does
ResizeRight is a tensor resizing library designed for machine learning and image enhancement tasks. It supports both NumPy and PyTorch tensors seamlessly, automatically choosing the framework based on input type, and performs fully differentiable operations suitable for training. The package addresses what the author identifies as correctness issues in existing resizers: it produces results matching MATLAB's imresize for simple cases, implements anti-aliasing for downscaling to prevent artifacts, and crucially handles the non-integer scaling case by accepting both scale-factor and output-size parameters to maintain consistency and centering.
The library offers multiple interpolation methods (cubic, linear, Lanczos, box), supports N-dimensional tensors with M-dimensional resizing, and can apply different scale-factors per dimension. For rational scale-factors with small numerators, it can use efficient convolution-based calculation. It includes flexible padding modes and allows custom interpolation methods. However, the package has been abandoned since mid-2023 with no updates or maintenance.
Use it for:
- Preprocessing images for super-resolution models where consistent scale-factor and output-size handling is critical for training stability.
- Downscaling high-resolution images while preserving detail through anti-aliasing, avoiding artifacts common in other resizing libraries.
- Building differentiable image processing pipelines where gradients must flow through the resizing operation.
- Implementing zero-shot super-resolution or other learning-based image enhancement tasks requiring precise, centered resizing.
- Batch processing large tensors efficiently using convolution-based resizing when scale-factors are rational with small numerators.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Resizes images or tensors in NumPy or PyTorch with differentiable operations, supporting anti-aliasing, multiple interpolation methods, and flexible scale-factor or output-size specification.
Yes, if you need differentiable resizing with anti-aliasing and are willing to accept an abandoned package with no ongoing maintenance. The core algorithm appears sound for its stated use cases (super-resolution, image restoration), but expect no bug fixes, no compatibility updates, and no support. Suitable for research or one-off projects; risky for production systems or long-term codebases.
Install
resize-right on PyPI
pip
pip install resize-rightuv
uv add resize-rightpoetry
poetry add resize-rightInstalling resize-right
Before you install
Low install friction with no runtime dependencies; however, the package is abandoned (last commit 2023-07-13, no releases since 2022-05-05), so expect no maintenance or bug fixes going forward.
License in practice
MIT license is permissive, allowing commercial and private use with minimal restrictions—you may use, modify, and distribute this package freely as long as you include the license notice.
Quickstart
pip install resize-right
import resize_right
resized = resize_right.resize(input, scale_factors=0.5)
Requires either NumPy or PyTorch installed; the package itself has no hard dependency but will not function without at least one of them.
Verify before relying
- Whether the package's claimed correctness advantages over MATLAB and other resizers hold up under real-world use cases beyond the author's test cases.
- Current compatibility with modern Python versions beyond 3.6, given the package is abandoned and has not been tested recently.
- Performance characteristics and memory efficiency when processing very large batches or high-resolution tensors with the convolution-based optimization.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,562 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 198,695/month — #9,721 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: resize_right-0.0.2-py3-none-any.whl
Keywords: deep learning, image resize
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
unfoldNdExtends PyTorch's unfold and fold operations to…
permissive · top 15,000 on PyPI
juliusJulius provides differentiable, GPU-accelerated…
permissive · top 5,000 on PyPI
torchPyTorch provides GPU-accelerated tensor…
permissive · top 1,000 on PyPI
tensorflow-graphicsTensorFlow Graphics provides differentiable…
permissive · top 15,000 on PyPI
imutilsimutils provides convenience wrappers around…
unclear · top 15,000 on PyPI
causal-conv1dImplements a CUDA-optimized causal depthwise 1D…
permissive · top 15,000 on PyPI
pytorchcvProvides a collection of pretrained computer…
unclear · top 15,000 on PyPI
torchsrProvides pretrained neural network models for…
permissive · top 15,000 on PyPI
basicsrBasicSR is a PyTorch-based toolbox for image…
permissive · top 15,000 on PyPI
realesrganReal-ESRGAN upscales images and videos using…
permissive · top 15,000 on PyPI