Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some tips to run the pretrained model #13

Open
ZimingLu opened this issue May 7, 2018 · 3 comments
Open

some tips to run the pretrained model #13

ZimingLu opened this issue May 7, 2018 · 3 comments

Comments

@ZimingLu
Copy link

ZimingLu commented May 7, 2018

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 :)

@zhangyingbit
Copy link

Thanks for your sharing!

@Bachelorwangwei
Copy link

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

@BowieHsu
Copy link

thanks to share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants