hed icon indicating copy to clipboard operation
hed copied to clipboard

question about using pre-trained caffe model

Open amy-hyunji opened this issue 6 years ago • 5 comments

Hi I realized that you load pre-trained parameters of caffe.

I was wondering if using the pre-trained parameters of caffe is necessary because I want to try training with other datasets rather than BSD500 and I assume that if pre-trained parameters are used, my new datasets won't be able to give an effect.

Thank you :)

amy-hyunji avatar Jan 04 '19 08:01 amy-hyunji

In training procedure: python hed.py --vgg16_caffe ./data/5stage-vgg.py36pickle There are 2 steps:

  1. Loaded pre-trained VGG-16 weights, which can provide better convolutional features.
  2. Fine-tune the model on BSDS500 dataset. If you want to use your own dataset, you only need to change the step 2 with your dataset. It will be effective when you fine-tune your model on your dataset.

xwjabc avatar Jan 04 '19 18:01 xwjabc

Hi @xwjabc thank you for your works! I don't install matlab in my computer, I am still curious, what is this command for? (echo "data_dir = '../output-mypretrain/test'"; cat eval_edge.m)|matlab -nodisplay -nodesktop -nosplash The .png files inside the folder is your pretrained model result right?, then why you need to display using matlab?

herleeyandi avatar Jan 15 '19 13:01 herleeyandi

@herleeyandi The command line you mentioned is used to evaluate the OIS and ODS metrics. If you only need to obtain the generated images, you can ignore this line.

xwjabc avatar Jan 15 '19 18:01 xwjabc

Can I train the HED network directly without loading the pre-training weights?

long123524 avatar Jul 05 '21 03:07 long123524

@long123524 I would suggest training the HED with VGG-16 pre-trained weights, since the VGG features can provide visual cues for the edge detection (esp BSDS is a relatively small dataset). However, you can still try to train HED from scratch.

xwjabc avatar Jul 05 '21 04:07 xwjabc