Skip to main content

A Python library to resize images using PyTorch

Project description

# Resize Images using PyTorch

This package allows resizing images from the command line using PyTorch.

## Dependencies

  • Python 3.4++

  • gputil 1.4.0

  • tqdm 4.59.0

  • torchvision 0.9.0

  • torch 1.8.0

  • Pillow 2.7++

## Installation

Install torch-resize-images using pip:

` pip install torch-resize-images `

## Usage

Given images in some <input_dir>, the following line first resizes and then center-crops all images to the size 224x224.

` torch-resize -r <input_dir> -o <output_dir> --width 224 --height 224 `

You can speed up processing by running multiple processes in parallel using the -n flag. This defaults to 1 and is limited by your system memory.

` torch-resize -r <input_dir> -o <output_dir> --width 224 --height 224 -n 8 `

## Example ![Alt text](./images/resize.png “Example File”)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torch-resize-images-0.1.7.tar.gz (3.2 kB view details)

Uploaded Source

Built Distributions

torch_resize_images-0.1.7-py3.8.egg (5.4 kB view details)

Uploaded Source

torch_resize_images-0.1.7-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file torch-resize-images-0.1.7.tar.gz.

File metadata

  • Download URL: torch-resize-images-0.1.7.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for torch-resize-images-0.1.7.tar.gz
Algorithm Hash digest
SHA256 9900a666c933d881e220cf8f4dfd2a59f4cd2e912e92b28dfe2ced6465449996
MD5 4da7897a6728ea3ffaf5a06a53ab8176
BLAKE2b-256 a7fa79bcc3bd99be19c623216f0591d89eeac314ed062794c68e3369dfa411e5

See more details on using hashes here.

File details

Details for the file torch_resize_images-0.1.7-py3.8.egg.

File metadata

  • Download URL: torch_resize_images-0.1.7-py3.8.egg
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for torch_resize_images-0.1.7-py3.8.egg
Algorithm Hash digest
SHA256 2fc83522be4aab1e32797fc8ef49d86abc83f610c430d009f667459a4d7f9fc6
MD5 50ee6a0b70642d01b47639993261d85e
BLAKE2b-256 7eb1fc6f24857670b9cfdbe4150f84eccf77b171239498ced5f61ec1ed9cb625

See more details on using hashes here.

File details

Details for the file torch_resize_images-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: torch_resize_images-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for torch_resize_images-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 45a0df34daf6c17ab27fecada6511ca4cb5cd302a62a6003b9a903f990f5ece0
MD5 0ac2052faa9ccce358ca36454e3a5ca5
BLAKE2b-256 080c27aa7a8d171c6d7b88aba8a0aaa79c84d5c2ca20e534ed74bb7bafba08df

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page