pose-tensorflow icon indicating copy to clipboard operation
pose-tensorflow copied to clipboard

Fine-tune your trained pose detection model?

Open YinghaoHuang91 opened this issue 7 years ago • 3 comments

Hi Eldear,

Thanks for sharing with us such a great library!

I wonder whether it's possible to train the model directly from your trained model instead of the pretrained ImageNet model.

I tried to modify your demo code, but it always give me very weird results. Seems it fails to restore the trained model from Tensorflow saved model files.

Any clue?

Thanks!

YinghaoHuang91 avatar Jul 27 '17 08:07 YinghaoHuang91

Hey,

Sure, you can fine-tune from pre-trained model. I just modified pose_cfg.yaml with this line:

init_weights: path/to/snapshot-1000000 

and started training - it worked. What exactly is wrong for you?

eldar avatar Jul 27 '17 12:07 eldar

Yeah, it runs smoothly. But it always yields more or less the same output, that's very close to 0. Like 1e-6.

I'm trying to adjust your trained model to some other tasks related to human body. And now the extra layers are built on the score_map produced by your trained MPII model. I found it's very close to 0. Maybe that's the reason.

Thank you for your response! I will try to do some normalization about the score_map.

YinghaoHuang91 avatar Jul 27 '17 12:07 YinghaoHuang91

I understand now. I think you shouldn't be using the prediction layers of this model, but replace them with your own ones. They should feed from the last layer of the original ResNet. You will obviously have to modify the code.

eldar avatar Jul 27 '17 20:07 eldar