qubvel / segmentation_models

Segmentation models with pretrained backbones. Keras and TensorFlow Keras.
MIT License
4.73k stars 1.03k forks source link

Question about backbones #541

Open AtWillB opened 2 years ago

AtWillB commented 2 years ago

I know very little about ML, and this is the first time I'm implementing a model, so I've decided to use this library to make the learning process easier. I have limited training data(about 10 images, but augmentation should get that to a few hundred) that I'm training to recognize blemishes in the images(I can't describe more about training data, sorry). However, my Question relates to backbones(ex. VGG16 or Resnet34). Do these backbone settings make a difference in my model if encoder_weights is set to none? Again, I'm very new to this, so a baby-level explanation would be greatly appreciated. Also please correct any assumptions/miss-understandings in this post. If more info is needed to answer, let me know

attiladoor commented 1 year ago

Hi, i am not super familiar with the this repository but from the documentation https://github.com/qubvel/segmentation_models/blob/master/segmentation_models/models/unet.py#L188 it looks it looks like it makes a huge difference for your usecase. If the weight is set to none, that means, their parameters are initialized more-or-less random, meanwhile if it is set to "imagenet" then it will fetch the weights from a pre-trained network on a general so called "imagenet" dataset and then you just need to "fine tune" it. However with 10 + augmentation images, it sounds pretty impossible.