Faster_RCNN_for_Open_Images_Dataset_Keras icon indicating copy to clipboard operation
Faster_RCNN_for_Open_Images_Dataset_Keras copied to clipboard

ImageNet pretrained model

Open frk1993 opened this issue 6 years ago • 6 comments

Hi, I found your Project very interesting. I wanted to ask if I can also pre initialize the Network with ImageNet pretrained weights?

Thank You! Best Regards FRK

frk1993 avatar Dec 10 '18 12:12 frk1993

Hi FRK, Of course, you can do that. It's kind of like transferring learning for our Faster R-CNN model.

Best regards, Rocky

RockyXu66 avatar Dec 11 '18 02:12 RockyXu66

Thanks for your response! How I have to modify the code? You are creating the VGG16 network on your own. How I can pre-initialize the base network in this case?

Best Regards Faruk

frk1993 avatar Dec 12 '18 13:12 frk1993

What kinds of base model do you want to use? If you want to try other models like ResNet-50, you can follow the original code. If you want to use other CNN models, you need to build the structure of that model and load its corresponding weights.

RockyXu66 avatar Dec 12 '18 13:12 RockyXu66

I want to use exactly vgg16 model as you have created (nn_base), but I want to initialize this nn_base with weights from ImageNet pre-trained VGG16 Network. I hope I could explain it :)

frk1993 avatar Dec 12 '18 13:12 frk1993

I think know I understand how you initialize the network. You initialize the network with weights from vgg16_weights_tf_dim_ordering_tf_kernels.h5 Are this one ImageNet pre-trained weights ?

frk1993 avatar Dec 12 '18 22:12 frk1993

Yes, this is the Keras pre-trained model which uses ImageNet as training dataset.

RockyXu66 avatar Dec 13 '18 07:12 RockyXu66