Questions tagged [vgg-net]

A kind of convolutional neural network consisting of 16 or 19 layers, often used with weights pre-trained on ImageNet dataset. Whereas the the model was originally created for image classification, its convolutional part can be used for a variety of purposes. Use this tag for questions, specific for this CNN architecture.

The name VGG stands for Visual Geometry Group (Oxford University), authors of the original paper.

The model consists of a convolutional part (several convolution and max- or avegare-pooling layers) and several fully-connected layers atop of it. Small (3x3) convolution filters are used.

See visual representation below (taken from this answer):

enter image description here

Model applications

  1. Image classifier (Tensorflow).
  2. Image segmentation (Keras).
  3. Image style transfer (Keras).
471 questions
2
votes
3 answers

can we extract VGG16/19 features for classes it was not trained on

I have a query regarding the extraction of VGG16/VGG19 features for my experiments. The pre-trained VGG16 and VGG19 models have been trained on ImageNet dataset having 1000 classes (say c1,c2, ... c1000) and normally we extract the features from…
Upendra01
  • 344
  • 3
  • 5
  • 15
2
votes
2 answers

Identical random crop on two images Pytorch transforms

I am trying to feed two images into a network and I want to do identical transform between these two images. transforms.Compose() takes one image at a time and produces output independent to each other but I want same transformation. I did my own…
Joy Mazumder
  • 870
  • 1
  • 8
  • 14
2
votes
1 answer

TypeError: '_TupleWrapper' object is not callable when I run the object detection model ssd

I build my own vgg network then I create the dataset then run the train def run_train(dataset, num_epochs=2): start_time = time.perf_counter() model = VGGBase() for _ in tf.data.Dataset.range(num_epochs): for image,target in…
user11173832
2
votes
1 answer

Why am I getting "ValueError: No gradients provided for any variable: ['Variable:0']." error?

I'm extremely new to tensorflow, and I'm trying to build a style transfer model, I understand the concept of how the model is but am having difficulty at actually implementing it, since I don't fully understand what is going on in tensorflow, yet.…
2
votes
1 answer

How do I connect two keras models into one model?

Let's say I have a ResNet50 model and I wish to connect the output layer of this model to the input layer of a VGG model. This is the ResNet model and the output tensor of ResNet50: img_shape = (164, 164, 3) resnet50_model =…
Madara
  • 328
  • 1
  • 5
  • 19
2
votes
0 answers

xception model incorrect classification over training dataset

I have used transfer learning dataset of 47 images with class 0 and 57 images with class 1 over xception model with as follows. base_model = Xception(weights='imagenet',include_top=False,input_shape=(299, 299, 3)) headModel =…
2
votes
1 answer

how to set values for layers in pytorch nn.module?

I have a model that I am trying to get working. I am working through the errors, but now I think it has come down to the values in my layers. I get this error: RuntimeError: Given groups=1, weight of size 24 1 3 3, expected input[512, 50, 50, 3]…
Jennifer Crosby
  • 185
  • 1
  • 1
  • 14
2
votes
0 answers

Using pretrained VGG-16 to get a feature vector from an image

I want to get a feature vector out of an image by passing the image through a pre-trained VGG-16. I used the pretrained Resnet50 to get a feature vector and that worked perfectly. But when I use the same method to get a feature vector from the…
Estrella
  • 21
  • 1
2
votes
2 answers

High Train and Validation Accuracy, Bad Test Accuracy

I am trying to classify 2 classes of images. Though I am getting high train and validation accuracy (0.97) after 10 epochs, my test results are awful (precision 0.48) and the confusion matrix shows the network is predicting the images for the wrong…
2
votes
1 answer

How to cache Pytorch models for use when not connected to the internet?

I'm using vgg19 in a classification problem. I have access to the campus research computer to train on, but the nodes where the computation is done don't have access to the internet. So running a line of code like self.net =…
2
votes
1 answer

Custom metric in multi-output Keras model

I'm working on a custom multi-digit number recognition problem. I only have 1 and 2 digit numbers. I am using a VGG16 model with two heads for each digit individually to avoid having 100 classes. THe model looks like this: input_shape =…
2
votes
1 answer

How to remove the adaptive average pool layer from vgg19?

I have loaded the pre-trained model of vgg19. How to remove the adaptive average pool layer which is present before the classifier?
2
votes
1 answer

Keras VGG16 low validation accuracy

I built a very simple Convolutional Neural Network using the pre-trained VGG16. I am using the Pokemon generation one dataset containing 10.000 images belonging to 149 different classes. I manually split the dataset, 0.7 for training and 0.3 for…
2
votes
2 answers

Is it possible to validate a deep learning model by training small data subset?

I am looking to train a large model (resnet or vgg) for face identification. Is it valid strategy to train on few faces (1..3) to validate a model? In other words - if a model learns one face well - is it evidence that the model is good for the…
Boppity Bop
  • 9,613
  • 13
  • 72
  • 151
2
votes
1 answer

VGG16 model freezes computer

I am currently trying to use the vgg16 model from keras library but whenever I create an object of the VGG16 model by doing from keras.applications.vgg16 import VGG16 model = VGG16() I get the following message 3…