--- id: resize-right version: "0.0.2" license: MIT license_treatment: permissive maintenance: abandoned --- # resize-right — Resize Right License: permissive · Maintenance: abandoned · Downloads: 198.7K/mo ## 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 above — 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 pip install resize-right uv add resize-right poetry add resize-right ## Installing 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: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 198.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags image resize numpy pytorch, differentiable tensor resizing, anti-aliasing downscaling, super-resolution preprocessing, image restoration resizing, bicubic interpolation tensors, scale-factor output-size resize, image-processing, differentiable-ops, abandoned [View on SkillFed](https://skillfed.io/packages/resize-right) · [View on PyPI](https://pypi.org/project/resize-right/)