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
Metadata
Release files for h5cv 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| h5cv-0.1.1.tar.gz | 331.0 kB | Without provenance | Details |
Release files / h5cv-0.1.1.tar.gz
| Download URL | h5cv-0.1.1.tar.gz |
|---|---|
| Size | 331.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0063b879ce76e53e4db5844f1ed232f6fcb3d15647a4e3eda81cfccc16ee633b
|
|
BLAKE2b-256 checksum How to use checksums |
54891864d5c90caffd8e57c2c3cf39292e824521b82c9608bc18beb78f8a7ee3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for h5cv 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.