[英]how can I get filenames from h5 file?
I have an h5 file that contains multiple images.我有一个包含多个图像的 h5 文件。 I would like to know, how can I get the original filename of individual images from the h5 file?我想知道,如何从 h5 文件中获取单个图像的原始文件名? The h5 file has keys "image" and "label". h5 文件具有键“图像”和“标签”。
Thanks.谢谢。
I think you are asking for "Keys".我想你在问“钥匙”。 Here is your answer.这是你的答案。
import h5py
with h5py.File('your_file.h5', 'r') as f:
print("Keys: %s" %f.keys())
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.