Questions tagged [transfer-learning]

749 questions
4
votes
0 answers

What is the difference between using backbone architecture and transfer learning?

hi im super new to this field(deep learning, computer vision) so this question may sound dumb. In this link (https://github.com/GeorgeSeif/Semantic-Segmentation-Suite), there are pre-trained models (eg, ResNet101) called front end models. And they…
4
votes
2 answers

Adding multiple classes in Mask R-CNN

I am using Matterport Mask RCNN as my model and I'm trying to build my database for training. After much deliberation over the below problem, I think what I'm actually asking is how do I add more than one class (+ BG)? I get the following…
4
votes
1 answer

AttributeError: 'tuple' object has no attribute 'layer' when trying transfer learning with keras

I'm trying to do transfer learning with keras model, but got stuck on adding new layers to the model. I've tried code below : prev_model = load_model('final_model.h5') # loading the previously saved model. new_model =…
Greengene Chung
  • 187
  • 1
  • 3
  • 10
4
votes
1 answer

pytorch - loss.backward() and optimizer.step() in eval mode with batch norm layers?

I have a ResNet-8 network I am using for a project of Domain Adaptation over images, basically I have trained the network over a dataset and now I want to evaluate it over another dataset simulating a real time environment where I try to predict one…
user6199298
4
votes
2 answers

How do I use input_shape and input_tensor in Transfer Learning in Keras?

When we do transfer learning in Keras2., the Arguments require "input_shape" and "input_tensor". But I use only input_tensor and haven never used input_shape. I think only input_tensor is enough, and I don't know when to use input_shape. How should…
4
votes
2 answers

Transfer learning in Pytorch using fasterrcnn_resnet50_fpn

I am looking for Object Detection for custom dataset in PyTorch. Tutorial here provides a snippet to use pre-trained model for custom object classification model_ft = models.resnet18(pretrained=True) num_ftrs = model_ft.fc.in_features model_ft.fc =…
addcolor
  • 455
  • 8
  • 23
4
votes
2 answers

Transfer learning bad accuracy

I have a task to classify seeds depending on the defect. I have around 14k images in 7 classes (they are not equal size, some classes have more photos, some have less). I tried to train Inception V3 from scratch and I've got around 90% accuracy.…
4
votes
1 answer

Adding Conv Layer in front of pretrained model gives ValueError

I want to combine a pretrained VGG16 model with a special input block, which is an input layer and a convolutional layer. The goal is to use a pre-trained RGB VGG16 imagenet model on grayscale images: from keras.applications.vgg16 import VGG16 from…
4
votes
1 answer

Use models from Keras Applications without pretrained weights

Keras Applications provide implementations of some of the most popular model architectures with weights pretrained on some of the most popular datasets. These predefined models are very handy for transfer learning of problems which are similar to…
Oblomov
  • 8,953
  • 22
  • 60
  • 106
3
votes
0 answers

Using and freezing pre-trained weights when fine-tuning YOLOv7-tiny detector

I'd like to retrain a YOLOv7-tiny Object Detector on a custom dataset with 4 classes. According to the README of the official git repo in order to transfer learn one should pass the pre-trained weights as argument: python train.py --workers 8…
3
votes
4 answers

Transfer learning from a custom model trained with different image sizes

I have a custom model trained initially on VGG16 using transfer learning. However, it was initially trained on images with a smaller input size. Now, I am using images with bigger sizes, therefore I'd like to grab the first model and take advantage…
xnok
  • 299
  • 2
  • 6
  • 35
3
votes
2 answers

Is there an actual minimum input image size for popular computer vision models? (E.g., vgg, resnet, etc.)

According to the documentation on pre-trained computer vision models for transfer learning (e.g., here), input images should come in "mini-batches of 3-channel RGB images of shape (3 x H x W), where H and W are expected to be at least 224". However,…
3
votes
1 answer

What is relationship between total_steps and num_steps of file pipeline.config?

I'm working on training a model by using Transfer Learning. The pre-trained model I use is "SSD MobileNet V2 FPNLite 320x320" from Model Zoo TF2. And I have some confusion about item train_config, in file pipeline.config. If I change num_steps,…
Hoang97
  • 47
  • 3
3
votes
1 answer

My converted tensorflow Transfer Learning model always returns same results in Tensorflow JS

I have created a model which applied Mobilenet V2 for the convolutional base layers in Google colab. Then I converted it by using this command: path_to_h5 = working_dir + '/Tensorflow_PY_Model/SavedModel.h5' path_tfjs = working_dir +…
3
votes
1 answer

Keras model gets worse when fine-tuning

I'm trying to follow the fine-tuning steps described in https://www.tensorflow.org/tutorials/images/transfer_learning#create_the_base_model_from_the_pre-trained_convnets to get a trained model for binary segmentation. I create an encoder-decoder…
1 2
3
49 50