Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble loading #1

Open
exnx opened this issue Jul 18, 2018 · 8 comments
Open

Trouble loading #1

exnx opened this issue Jul 18, 2018 · 8 comments

Comments

@exnx
Copy link

exnx commented Jul 18, 2018

Hi, I was having trouble running your code.

The argument: --weight_file_path /path/to/pickle_file, does this just point to the output directory, or does this point to another file we need to download somewhere? I'm not sure where to find it.

Also, if just a directory for output, I get the following error:

Traceback (most recent call last):
File "matconvnet_hr101_to_pickle.py", line 29, in
f = sio.loadmat(args.matlab_model_path)
File "/Users/tvision/Desktop/TinyFaces-Face-Detector-TF/tiny-env/lib/python3.6/site-packages/scipy/io/matlab/mio.py", line 141, in loadmat
MR, file_opened = mat_reader_factory(file_name, appendmat, **kwargs)
File "/Users/tvision/Desktop/TinyFaces-Face-Detector-TF/tiny-env/lib/python3.6/site-packages/scipy/io/matlab/mio.py", line 64, in mat_reader_factory
byte_stream, file_opened = _open_file(file_name, appendmat)
File "/Users/tvision/Desktop/TinyFaces-Face-Detector-TF/tiny-env/lib/python3.6/site-packages/scipy/io/matlab/mio.py", line 39, in _open_file
return open(file_like, 'rb'), True
FileNotFoundError: [Errno 2] No such file or directory: 'files.mat'

@moaljazaery
Copy link
Owner

it looks like you have problem with the input .mat file (No such file or directory: 'files.mat')

Follow "Converting a pretrained model" section in the read me. If doesn't work I will share the final pkl file with you

@exnx
Copy link
Author

exnx commented Jul 18, 2018

I was able to convert it! I had to use this command and it worked:
python matconvnet_hr101_to_pickle.py --matlab_model_path ./hr_res101.mat --weight_file_path ./hr_res101.pkl

@exnx
Copy link
Author

exnx commented Jul 18, 2018

However, now I have another unicode error, which I'm not sure where the bad character is or why:

Traceback (most recent call last):
File "tiny_face_eval.py", line 227, in
main()
File "tiny_face_eval.py", line 224, in main
lw=args.line_width, display=args.display)
File "tiny_face_eval.py", line 82, in evaluate
model = tiny_face_model.Model(weight_file_path)
File "/Users/tvision/Desktop/Tiny_Faces_in_Tensorflow/tiny_face_model.py", line 23, in init
self.mat_blocks_dict, self.mat_params_dict = pickle.load(f)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xdd in position 112: invalid continuation byte

@moaljazaery
Copy link
Owner

I am not sure about this. Maybe try different python version, or upgrade your python packages

@exnx
Copy link
Author

exnx commented Jul 21, 2018

Rats, I tried a different python version (anaconda) but it still didn't work.

@moaljazaery
Copy link
Owner

I uploaded the converted weights, hope this can help:
https://drive.google.com/open?id=1m8dcxNdFAH75Q5BSvyVXeVlerSS0y0LE

@Gaurav14cs17
Copy link

@moaljazaery i can't access this link
plz upload this weight in yr Git idee

@moaljazaery
Copy link
Owner

Sorry, the link access setting was wrong. Try now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants