xwjabc / hed

A PyTorch reimplementation of Holistically-Nested Edge Detection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I use a pretrained torch model in .pth or .pkl?

rrryan2016 opened this issue · comments

Thanks for your good jobs and nice sharing.

I just wonder how can I use the pretrained model by Pytorch instead of caffe.

Is there any existing job?

Thanks again.

Hi,
We also provide the pretrained PyTorch model. See below in README.md:

python hed.py --checkpoint ./data/hed_checkpoint.pt --output ./output-mypretrain --test

You can refer to hed.py for the loading procedure of pretrained PyTorch model.

Hi,
We also provide the pretrained PyTorch model. See below in README.md:

python hed.py --checkpoint ./data/hed_checkpoint.pt --output ./output-mypretrain --test

You can refer to hed.py for the loading procedure of pretrained PyTorch model.

Feel so sorry. It is my fault to miss the message in README :P

python hed.py --checkpoint ./data/hed_checkpoint.pt --output ./output-mypretrain --test

Hey, feel sorry to disturb again.

When I am trying to use my own pretrained VGG16 model, I feels like I may misunderstanding the paper and codes.

The pth file I dumped into the code (by '--checkpoint') is a VGG16 pretrained on ImageNet, so I couldn't get the param of score_dsn_1-5 and score_final (in my understanding, score_dsn_1-5 and score_final are in the structure of HED and nothing to do with VGG16, am I right?)

BTW, have you ever released the code to get hed_checkpoint.pt, or what can I do now.

Thanks a lot. It really helps.

python hed.py --checkpoint ./data/hed_checkpoint.pt --output ./output-mypretrain --test

Hey, feel sorry to disturb again.

When I am trying to use my own pretrained VGG16 model, I feels like I may misunderstanding the paper and codes.

The pth file I dumped into the code (by '--checkpoint') is a VGG16 pretrained on ImageNet, so I couldn't get the param of score_dsn_1-5 and score_final (in my understanding, score_dsn_1-5 and score_final are in the structure of HED and nothing to do with VGG16, am I right?)

BTW, have you ever released the code to get hed_checkpoint.pt, or what can I do now.

Thanks a lot. It really helps.

  1. Yes, score_dsn_1-5 and score_final are in the structure of HED and not in VGG-16.

  2. The pretrained checkpoint is in the data file: https://cseweb.ucsd.edu/~weijian/static/datasets/hed/hed-data.tar