I followed the steps on TF object detection API tutorial page using the ssd_mobilenet_v1_pets.config configuration at https://github.com/tensorflow/models/blob/master/research/object_detection/samples/configs/ssd_mobilenet_v1_pets.config
It is very cool that I am able to train a custom detector using my own images. However, as the whole training process appears to me as a "black-box", I am wondering how I could configure the layers to be fine-tuned, just like how one could configure the layers to be retrained using an Inception model in tensorflow/keras.
I think that the layers to be fine-tuned could(should) be different if I had, say, 10000 images rather than 100 images.
To fine tune a specific layer, you have to freeze the rest. If you know the name of the layers of your model you want to freeze, than you can add them to the freeze_variables
(Source) in the train part of your config file.and add '*' in front of '.FeatureExtractor.'
For example, this:
train_config: {
...
freeze_variables: ".*FeatureExtractor."
}
will freeze all layers of the Feature Extractor
of Faster R-CNN architecture.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With