OSError: Unable to open file (file signature not found)
See original GitHub issueWhen I run this sample Usage
import numpy as np
from PIL import Image
img = Image.open(r'MyJPG_Path')
lr_img = np.array(img)
from ISR.models import RDN
rdn = RDN(arch_params={'C':6, 'D':20, 'G':64, 'G0':64, 'x':2})
rdn.model.load_weights('weights/sample_weights/rdn-C6-D20-G64-G064-x2/ArtefactCancelling/rdn-C6-D20-G64-G064-x2_ArtefactCancelling_epoch219.hdf5')
sr_img = rdn.predict(lr_img)
Image.fromarray(sr_img)
It warns that:
Traceback (most recent call last):
File "test.py", line 12, in <module>
rdn.model.load_weights('weights/sample_weights/rdn-C6-D20-G64-G064-x2/ArtefactCancelling/rdn-C6-D20-G64-G064-x2_ArtefactCancelling_epoch219.hdf5')
File "lib\site-packages\keras\engine\network.py", line 1157, in load_weights
with h5py.File(filepath, mode='r') as f:
File "lib\site-packages\h5py\_hl\files.py", line 394, in __init__
swmr=swmr)
File "lib\site-packages\h5py\_hl\files.py", line 170, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py\_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py\_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py\h5f.pyx", line 85, in h5py.h5f.open
OSError: Unable to open file (file signature not found)
I use the original hdf5 file which is downloaded from the Github source. I wonder how to cope with this problem.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
Error opening file in H5PY (File signature not found)
Usually the message File signature not found indicates either: 1. Your file is corrupted. ... is what I think is most likely. You...
Read more >OSError: Unable to open file (File signature not found) #757
@mas-dse-greina the message File signature not found suggests the file is either corrupted or not in the HDF5 format. Be aware that all ......
Read more >OSError: Unable to open file (file signature not found) - Streamlit
OSError : Unable to open file (file signature not found). Traceback:
Read more >OSError: Unable to open file (file signature not found)
OSError: Invalid decryption. Unable to open file (file signature not found). The key used to load the model is incorrect.
Read more >Error opening file in H5PY (File signature not found)
I've been using the following bit of code to open some HDF5 files, produced in MATLAB, ... OSError: Unable to open file (File...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@cfrancesco I have tried to use
git lfs pull
but it throws an errror,batch response: This repository is over its data quota. Purchase more data packs to restore access. error: failed to fetch some objects from 'https://github.com/idealo/image-super-resolution.git/info/lfs'
Yeps, but the amount of images is quite huge and it chashes if i use a for cycle ( also in colab) anyway thank you for your support 😃