Skip to main content

Utility for gridifing images

Project description

imgrid

Tool for extracting gridified images from LabelMe JSON annotation format.

Installation

  • Requires Python>=3.7
  • Install using pip: pip install imgrid

Usage

Use below command to use the tool:

imgrid <json_dir> <out_dir> <width> <height> [--x_stride=<x_stride>] [--y_stride=<y_stride>] [--no_label]

  • json_dir is the directory where the LabelMe JSON annotations are saved.
  • out_dir is the directory where the extracted images will be saved.
  • width is the width of each extracted image.
  • height is the height of each extracted image.
  • x_stride is the stride in horizontal direction while scanning through each shape. By default this is the same as width.
  • y_stride is the stride in vertical direction while scanning through each shape. By default this is the same as height.
  • Add --no_label if no label needs to be saved. If it is not added, a txt file containing the image class name will be saved along each extracted image.

The tool will ignore any non-area annotations in the LabelMe JSONs, i.e., it will only consider shape_type that is either polygon, rectangle, or circle.

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

imgrid-0.1.3.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

imgrid-0.1.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file imgrid-0.1.3.tar.gz.

File metadata

  • Download URL: imgrid-0.1.3.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for imgrid-0.1.3.tar.gz
Algorithm Hash digest
SHA256 9be58be2f024e2782a9436618bd88f4018b4c2bae9142b8d51798a6346c9e418
MD5 1ca1a81c1a7feb30e15767f87261e5c8
BLAKE2b-256 0efa9b63632ab6d8a20ce9c7e8b376b8d736c6efd0c0555ae50f89e2ad34e187

See more details on using hashes here.

File details

Details for the file imgrid-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: imgrid-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for imgrid-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b2950c957fb05f8d459028ccf780930104e53ec020ed065ad68f54a9ecd349fb
MD5 13bb1744759be9fc90e4d91968b28c0d
BLAKE2b-256 e4e8e39200e21c82534cfdab69e2c7a1f9e3e824413f7eb2ccfb594cb133bba7

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