chinakook / hr101_mxnet

A MXNet tiny face detector
MIT License
95 stars 26 forks source link

what will do after convert the hr101 from matconvnet to mxnet?? #3

Closed zzw1123 closed 7 years ago

zzw1123 commented 7 years ago

hello!me again! i really like your coding style,and the code helps me a lot~~ but i find that no .json file is used in file"tiny_detection_mxnet.py",instead ,the author use the origin hr_res101,mat file. so i dont know what will do after convert the hr101 from matconvnet to mxnet?? should it be used in the code? thanks!!!

chinakook commented 7 years ago

@zzw1123

  1. the json is loaded by line 104: "mx.model.load_checkpoint('hr101',0)"
  2. the hr_res101.mat is only used to load face templates and RGB mean value when detection
  3. after the convertion, a .json file and a .params file are created. the Mxnet can load it by mx.model.load_checkpoint later.
zzw1123 commented 7 years ago

ohhhhhhhhh!!!got it! thanks for your reply>< but i dont know that data is included in "hr_res101.mat"? and do you mean the template is the "cluster" used in the code? i am new to mxnet ,so i also have one question what the three params:"sym, arg_params, aux_params" mean?

zzw1123 commented 7 years ago

@chinakook

chinakook commented 7 years ago

@zzw1123 yes, templates is clusters indeed. sym is the network symbol graph, arg_params is the weights of convolutions and deconvolutions and aux_params is the weights of batchnorm.

zzw1123 commented 7 years ago

@chinakook ok,i know that,thank you very much!! and could you please tell me what the function of these four command is?
mod.reshape(data_shapes=[('data', (1, 3, img_h, img_w))]) mod.forward(Batch([mx.nd.array(img)])) mod.get_outputs()[0].wait_to_read() fusex_res = mod.get_outputs()[0]

chinakook commented 7 years ago

@zzw1123 1.reshape so as to process variant image size 2.forward the network on the image and get the result feature map the wait_to_read() is useless, but can be used to block the forward thread

zzw1123 commented 7 years ago

@chinakook thanks a lot!!! i mostly know how the network goes! you are so kind !!