DariusAf / MesoNet

"MesoNet: a Compact Facial Video Forgery Detection Network" (D. Afchar, V. Nozick) - IEEE WIFS 2018
Apache License 2.0
251 stars 112 forks source link

Unable to open pretrained weights #26

Closed i2thesecond closed 3 years ago

i2thesecond commented 3 years ago

I am receiving an error when running this project with the pretrained weights.

The message I receive is as follows....

2021-01-11 13:47:20.220685: W tensorflow/core/util/tensor_slice_reader.cc:95] Could not open weights/Meso4_DF: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?

Is there any solution to this problem?

I am running the ./example.py script on a virtualenv Python 3.8.7 environment.

Below are the packages that are installed in the virtualenv:

absl-py==0.11.0 astunparse==1.6.3 cachetools==4.2.0 certifi==2020.12.5 chardet==4.0.0 click==7.1.2 cmake==3.18.4.post1 cycler==0.10.0 dlib==19.21.1 face-recognition==1.3.0 face-recognition-models==0.3.0 flatbuffers==1.12 gast==0.3.3 google-auth==1.24.0 google-auth-oauthlib==0.4.2 google-pasta==0.2.0 grpcio==1.32.0 h5py==2.10.0 idna==2.10 imageio==2.9.0 imageio-ffmpeg==0.4.3 Keras==2.4.3 Keras-Preprocessing==1.1.2 kiwisolver==1.3.1 Markdown==3.3.3 matplotlib==3.3.3 numpy==1.19.5 oauthlib==3.1.0 opt-einsum==3.3.0 Pillow==8.1.0 protobuf==3.14.0 pyasn1==0.4.8 pyasn1-modules==0.2.8 pyparsing==2.4.7 python-dateutil==2.8.1 PyYAML==5.3.1 requests==2.25.1 requests-oauthlib==1.3.0 rsa==4.7 scipy==1.6.0 six==1.15.0 tensorboard==2.4.0 tensorboard-plugin-wit==1.7.0 tensorflow==2.4.0 tensorflow-estimator==2.4.0 termcolor==1.1.0 typing-extensions==3.7.4.3 urllib3==1.26.2 Werkzeug==1.0.1 wrapt==1.12.1

Can someone explain why I am receiving this error? It appears to be related to tensorflow not able to read the pre-trained sets supplied with the project.

Thank you for any help!

DariusAf commented 3 years ago

Rename the pretrained weights with a .h5 extension and try again, this should do it.

DariusAf commented 3 years ago

(I've updated the repo accordingly)

i2thesecond commented 3 years ago

Thank you!

i2thesecond commented 3 years ago

I sent you a question on researchgate on your paper. Can you follow up? Thank you!