You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OSError: Unable to open file (file signature not found) #4
Hi Vishnu (@vishnubashyam), did you upload the proper Models/DBN_model.h5 file to GitHub? I have been helping one of our RAs to install it and Python complained as follows when we tried Script/test.sh:
File "py3-akb67/envs/akb67-deepbrain/lib/python3.6/site-packages/h5py/_hl/files.py", line 190, 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 96, in h5py.h5f.open
OSError: Unable to open file (file signature not found)
In my experience, h5 files are big and are circulated through GitHub release or Google Drive share.
Hi @tashrifbillah -- not sure if you ever stumbled across a solution here, but I think the h5 files are on Box (https://upenn.app.box.com/v/DeepBrainNet). However, I still get the error below when using any of those h5 files:
ValueError: Layer count mismatch when loading weights from file. Model expected 1 layers, found 3 saved layers.
I haven't finished comparisons yet between this version and the containerized versions, but it's worth a look. It's a lovely, much more automated approach.
I updated #10 with README troubleshooting for this error. The FAQ now notes that \OSError: Unable to open file (file signature not found)\ usually means the downloaded file is not the real HDF5 payload, so users should re-download from the Box page and verify file size, then use a compatible legacy TensorFlow/Keras environment if needed.
Activity
DVSneuro commentedon Apr 11, 2024
Hi @tashrifbillah -- not sure if you ever stumbled across a solution here, but I think the h5 files are on Box (https://upenn.app.box.com/v/DeepBrainNet). However, I still get the error below when using any of those h5 files:
ValueError: Layer count mismatch when loading weights from file. Model expected 1 layers, found 3 saved layers.tashrifbillah commentedon Apr 11, 2024
The RA left our office. So I never got to work on it anymore. Sorry!
DVSneuro commentedon Apr 12, 2024
No worries! If you ever get back to it, @tannerjared has a nice fork of this repo with some fixes and more documentation (https://github.com/tannerjared/DeepBrainNet).
I still got the ValueError above, but it appears to be resolved by downgrading to
tensorflow==2.15.tannerjared commentedon Apr 12, 2024
That's good feedback @DVSneuro about the working version of tensorflow. I want to add that @mateuszpawlik has a containerized version of this implemented in Nextflow
I haven't finished comparisons yet between this version and the containerized versions, but it's worth a look. It's a lovely, much more automated approach.
DVSneuro commentedon Apr 12, 2024
Good to know, thanks!
boss477 commentedon Oct 7, 2026
I updated #10 with README troubleshooting for this error. The FAQ now notes that \OSError: Unable to open file (file signature not found)\ usually means the downloaded file is not the real HDF5 payload, so users should re-download from the Box page and verify file size, then use a compatible legacy TensorFlow/Keras environment if needed.