cydonia999 / Tiny_Faces_in_Tensorflow

A Tensorflow Tiny Face Detector, implementing "Finding Tiny Faces"

Home Page:https://arxiv.org/abs/1612.04402

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

about argument parse

ping1jing2 opened this issue · comments

Thanks for sharing, but I still have some questions about "matconvnet_hr101_to_pickle.py" to ask you.

First, I can not run it successfully even though I've downloaded "hr_res101.mat" but it still throws "AssertionError: Matlab pretrained model: /path/to/hr_res101.mat not found". I learned about the usage of ArgumentParser, but I did not solve it. If you can give me some help, I would be greatly appreciated.

Second, I do not know much about matlab, so I can not understand the code, such as "clusters = np.copy (net ['meta'] [0] [0] [0] [0] [6])". More precisely, I think "layers = net ['layers']" is correct, but why use "layers = net [' layers'] [0] [0] [0]". Further more, I think "layer_name" and "layer_type" are just a string, but why do you put all the data into layer_inputs and layer_outputs?

Third, what does "weight_file" mean? Can you elaborate on the data you wrote in the weight_file file?

Maybe you think I asked the questions are stupid, yes, I admit, but who have not experienced such a stage? Thanks very much for sharing, and I will be even more grateful if you can help me with these questions.

I'm way too late. I was stuck over here as well, after tinkering around with different formats, I went to that directory which had both the converter python file and matlab model, and ran this. It worked.

λ python matconvnet_hr101_to_pickle.py --matlab_model_path ./hr_res101.mat --weight_file_path ./hr_res101.pkl

@greed2411 Thanks for this greed! However, I got an error and thought maybe it's from the way I converted the weight file.

Did you get something like this?

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 24, in init
self.mat_blocks_dict, self.mat_params_dict = pickle.load(f)
File "/Users/tvision/Desktop/Tiny_Faces_in_Tensorflow/tiny-env/bin/../lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte

I got an error about:TypeError: split() got an unexpected keyword argument 'num_or_size_splits',Can you give me some help?