Command Line utility for cost of aws.
Project description
h5cv
show hdf5 file in image file.
get start
$ ls -lh evaluation/
total 2936
-rw-r--r--@ 1 hiroshi.toyama 1522739515 37K 7 3 2019 car1.jpg
-rw-r--r--@ 1 hiroshi.toyama 1522739515 188K 7 3 2019 cat1.jpg
-rw-r--r-- 1 hiroshi.toyama 1522739515 137K 7 3 2019 dog1.jpg
-rw-r--r-- 1 hiroshi.toyama 1522739515 51K 7 3 2019 dog2.jpg
-rw-r--r-- 1 hiroshi.toyama 1522739515 77K 7 3 2019 dog3.jpg
-rw-r--r-- 1 hiroshi.toyama 1522739515 8.8K 7 3 2019 dog4.jpg
-rw-r--r--@ 1 hiroshi.toyama 1522739515 42K 7 3 2019 monitor1.jpg
-rw-r--r-- 1 hiroshi.toyama 1522739515 267K 7 3 2019 person1.jpg
-rw-r--r-- 1 hiroshi.toyama 1522739515 170K 7 3 2019 person2.jpg
-rw-r--r-- 1 hiroshi.toyama 1522739515 467K 7 3 2019 room1.jpg
$ h5cv -H test.h5 --store numpy write -g 'evaluation/*.jpg' -a
2020-03-06 19:13:35,972 INFO - compression => None
2020-03-06 19:13:35,973 INFO - generate numpy: evaluation/dog4.jpg => test.h5:evaluation/dog4.jpg
2020-03-06 19:13:35,977 INFO - generate numpy: evaluation/car1.jpg => test.h5:evaluation/car1.jpg
2020-03-06 19:13:35,978 INFO - generate numpy: evaluation/dog3.jpg => test.h5:evaluation/dog3.jpg
2020-03-06 19:13:35,980 INFO - generate numpy: evaluation/monitor1.jpg => test.h5:evaluation/monitor1.jpg
2020-03-06 19:13:35,982 INFO - generate numpy: evaluation/dog2.jpg => test.h5:evaluation/dog2.jpg
2020-03-06 19:13:35,983 INFO - generate numpy: evaluation/dog1.jpg => test.h5:evaluation/dog1.jpg
2020-03-06 19:13:35,985 INFO - generate numpy: evaluation/cat1.jpg => test.h5:evaluation/cat1.jpg
2020-03-06 19:13:35,987 INFO - generate numpy: evaluation/person1.jpg => test.h5:evaluation/person1.jpg
2020-03-06 19:13:35,989 INFO - generate numpy: evaluation/person2.jpg => test.h5:evaluation/person2.jpg
2020-03-06 19:13:35,991 INFO - generate numpy: evaluation/room1.jpg => test.h5:evaluation/room1.jpg
$ h5cv -H test.h5 ls -r
evaluation
evaluation/car1.jpg
evaluation/cat1.jpg
evaluation/dog1.jpg
evaluation/dog2.jpg
evaluation/dog3.jpg
evaluation/dog4.jpg
evaluation/monitor1.jpg
evaluation/person1.jpg
evaluation/person2.jpg
evaluation/room1.jpg
h5cv command
list keys
$ h5cv -H test.h5 ls [-r] [key]
show dataset in hdf5.
$ h5cv -H test.h5 show /some_group/test.jpg.np
imgcat in hdf5.
$ h5cv -H test.h5 imgcat /some_group/test.jpg
write in hdf5.
$ h5cv -H test.h5 \
[--store [numpy|binary]] \
write \
-g 'images/*.jpg' \
[--output-group mygroup] \
[--compression gzip] \
[--append]
delete dataset or group in hdf5.
$ h5cv -H test.h5 delete /some_group/test.jpg
custom generator
from h5cv.core import Core
from h5cv.generator import Generator
from PIL import Image
class MyGenerator(Generator):
def __getitem__(self, path):
print(f"custom generate {path}")
return Image.open(path)
Core(
hdf5="test.h5"
).write(
"evaluation/*.jpg",
generator=MyGenerator(),
compression="gzip"
)
Installation
pip install h5cv
Installation from github
pip install git+https://github.com/toyama0919/h5cv
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
h5cv-0.1.1.tar.gz
(331.0 kB
view details)
File details
Details for the file h5cv-0.1.1.tar.gz
.
File metadata
- Download URL: h5cv-0.1.1.tar.gz
- Upload date:
- Size: 331.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0063b879ce76e53e4db5844f1ed232f6fcb3d15647a4e3eda81cfccc16ee633b |
|
MD5 | 99952027ea4c93ffd09683da402d65e7 |
|
BLAKE2b-256 | 54891864d5c90caffd8e57c2c3cf39292e824521b82c9608bc18beb78f8a7ee3 |