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 hashes)
Built Distribution
Close
Hashes for image_knocker-0.0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76e215f882279db0940add6307b733119d51300cb2f58b9edeeb9ba4231f728a |
|
MD5 | b9489d52fa0936101fd8eb9a9f47e832 |
|
BLAKE2b-256 | 25ac4c0c4dd9e2065ff5075d68d3744113b2152f3103eb07932e6ff1cbcb8da8 |