seglink icon indicating copy to clipboard operation
seglink copied to clipboard

some tips to run the pretrained model

Open ZimingLu opened this issue 6 years ago • 3 comments

I used three days on the pretrain and here I want to share my experience with someone who are interested in this project.

Because the pretrained model is not provided, you should train it by yourself. You should download the VGG_ILSVRC_16_layers_fc_reduced_deploy.prototxt and VGG_ILSVRC_16_layers_fc_reduced.caffemodel. please pay attention to it, it is ssd vgg16 caffemodle not vgg16 model. Because there is another vgg16.tf file in the github, it is a little misleading. And for the test.py, this file is also for the vgg16 which is classification not detection. I suggest it should be deleted from the source file to avoid the misunderstanding. The most important part is that you should change the import model_vgg16 in convert_caffemodel_to_ckpt.py to import model_cnn under the seglink. Also change the path sys.path.insert(0, os.path.join(parentdir, '../../src')) to sys.path.insert(0, os.path.join(parentdir, '../../seglink'))

##create network vgg16 = model_vgg16.Vgg16Model() to ##create network vgg16 = model_cnn.SsdVgg16()

But then you will encounter another problem with weight_init_method, you should add tf.app.flags.DEFINE_string("weight_init_method", "xavier", "") in model_cnn. It will affect the train process, so I suggest to create a new model_cnn_ckpt.cy which is the copy of the model_cnn.py with tf.app.flags.DEFINE_string("weight_init_method", "xavier", "")

Please pay attention to model_scope, I have struggled with it for a longer time (maybe I am not so familiar with tensorflow 233333). All of the model_scope used here is "ssd/vgg16".

That's all what I have remembered so far. I hope these tips are useful for you and bring good luck to my current project :)

ZimingLu avatar May 07 '18 12:05 ZimingLu

Thanks for your sharing!

zhangyingbit avatar May 10 '18 01:05 zhangyingbit

@ZimingLu Could you shared the ssd model you trained (VGG_ILSVRC_16_layers_ssd.ckpt) THANKS!!!

Bachelorwangwei avatar Feb 22 '19 14:02 Bachelorwangwei

thanks to share

BowieHsu avatar Feb 23 '19 03:02 BowieHsu