Skip to main content

Knock your images before these make you painful

Project description

image-knocker

Knock your images before you get stressed.

Background

One day, I had run my deep learning model training program and got off work on Friday. When I checked the training process on Monday after arriving at work, the program was terminated because of some images that cannot be opened by image processing libraries like PIL.

I developed this project to check images that cannot be opened by image processing libraries before running computer vision applications.

image-knocker is very fast and simple!

Install

pip install image-knocker

Usage

foo@bar:~$ image-knocker --path dataset_path/ --exts png jpg jpeg

Output

if corrupted image in dataset:

  Knocking... Root Path: D:\datasets\detection\VOCdevkit
  100%|██████████████████| 34179/34179 [00:03<00:00, 10911.31it/s]
  Corrupted image files are detected!
  D:/datasets/detection/VOCdevkit/outlier.png
  Corrupted image file list is saved to D:\datasets\detection\corrupted_imgs_list.txt

else:

  Knocking... Root Path: D:\datasets\detection\VOCdevkit
  100%|██████████████████| 34178/34178 [00:04<00:00, 7792.30it/s]
  There are no corrupted image files! 
  All images were loaded successfully using PIL.Image.open!

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

image_knocker-0.0.1.4.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

image_knocker-0.0.1.4-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file image_knocker-0.0.1.4.tar.gz.

File metadata

  • Download URL: image_knocker-0.0.1.4.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/59.5.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5

File hashes

Hashes for image_knocker-0.0.1.4.tar.gz
Algorithm Hash digest
SHA256 2418181b30cf73308720d5eb92d28d651f1ee250830343e4af442098a4749bbd
MD5 6d12c7da53800603d2d5bfcc3992f472
BLAKE2b-256 b1bb9b1d5e10a6761cb095627f2fd56fa9853c4c0b450afc0843f7ab5b983233

See more details on using hashes here.

File details

Details for the file image_knocker-0.0.1.4-py3-none-any.whl.

File metadata

  • Download URL: image_knocker-0.0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/59.5.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5

File hashes

Hashes for image_knocker-0.0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 76e215f882279db0940add6307b733119d51300cb2f58b9edeeb9ba4231f728a
MD5 b9489d52fa0936101fd8eb9a9f47e832
BLAKE2b-256 25ac4c0c4dd9e2065ff5075d68d3744113b2152f3103eb07932e6ff1cbcb8da8

See more details on using hashes here.

Supported by

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