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
1
vote
0 answers

Unable to understand Transfer Learning with Vgg16

So, I have to work with Vgg16 in my semester group project, and was following this to do transfer learning. I don't understand CNN much, but am learning currently. The very first problem was that Vgg16 has 16 layers, whereas the base_model.summary()…
1
vote
1 answer

VGG19 neural network for single-channel images using in SRGAN

I am trying to write a VGG19 neural network for single-channel images, where everything is essentially the same as in a three-channel network except for the input layer. def model(self, inputShape=(64, 64, 1)): inputLayer =…
1
vote
1 answer

cannot fit the model using data loaded from tfds ImageFolder

I am trying to use VGG16 in a model but I got an error when calling fit. ValueError: Input 0 of layer "sequential_1" is incompatible with the layer: expected shape=(None, 363, 360, 3), found shape=(363, 360, 3) I am using tfds to load images from…
wannik
  • 12,212
  • 11
  • 46
  • 58
1
vote
1 answer

Resizing a numpy array to 224x224 for VGG16 Model

I am solving a Multiview Classification problem using VGG16 pretrained model. In my case, I have 4 views that are my inputs and they are of size (64,64,3). But VGG16 uses input size of (224,224,3). Now for solving the problem, I am supposed to…
1
vote
1 answer

ImageNet classification challenge: Achieving top-5 error of 0.99472 on test set using VGG11

I recently took an imagenet pre-trained VGG11 network and made predictions on the imagenet test dataset. Upon submitting this file to the evaluation server, I received an email with following text: Error: 0.99607 (top-5) 0.99898 (top-1) Per-class…
1
vote
1 answer

Logits and Labels dimension error (but no variable like that) in model.fit vgg19 tensorflow code

I am using transfer learning to build a model that with three categories. I do not know why I am having an error due to logits and labels. This is my code baseModel = tf.keras.applications.VGG19(input_shape=(128,128,3), include_top=False,…
Uchechi Ugo
  • 21
  • 1
  • 1
  • 2
1
vote
1 answer

Why is VGG16 giving lesser no. of total parameters?

from tensorflow.keras.applications import VGG16 pre_trained_model = VGG16(weights='imagenet', include_top=False, input_shape=(224, 224, 3)) model =…
1
vote
1 answer

Denoise autoencoder not training properly

I'm trying to make a denoise autoencoder wherein the encoder part is vgg16 and decoder is opposite of vgg16(encoder) network. My dataset consists of 5K images in grayscale and these are the steps i've followed to prepare and normalize: input_X = [],…
user18148455
1
vote
1 answer

1 channel input to VGG16 instead of 3 channel input

More of a novice question though, I am using VGG16 as feature extractor. I have used 3 channel images as input. Now I want to use 1 channel images as input. As VGG-16 is trained on 3 channel images, can I use 1 channel images as input?
1
vote
1 answer

How to extract features using VGG16 model and use them as input for another model(say resnet, vit-keras, etc)?

I am a bit new at Deep learning and image classification. I want to extract features from an image using VGG16 and give them as input to my vit-keras model. Following is my code: from tensorflow.keras.applications.vgg16 import VGG16 vgg_model =…
James Albert
  • 75
  • 2
  • 7
1
vote
0 answers

how to use multi-threading for optimizing face detection in django view?

this is my code and I want to optimize the performance how can I do this stuff parallel thread in python? any idea? i am useing this models : "DEEPFACE_MODELS": "VGG-Face;DeepFace", "DEEPFACE_BACKENDS": "opencv;ssd;dlib" any suggestion about…
1
vote
1 answer

M1 Max Tensorflow model.fit() InvalidArgumentError

This is my first CNN project on the M1 Mac, and I'm having InvalidArgumentError when I run model.fit(). I am using tensorflow-metal 3.0, tensorflow-macos 2.7 and running MacOS 12.1. early_stop = EarlyStopping(monitor="val_accuracy",…
Bryce Chan
  • 1,639
  • 11
  • 26
1
vote
1 answer

'Sequential' object has no attribute 'in_features' and 'fc'

I am making the model using the fine-tuning method and the model is VGG-16. But I got the following error 'Sequential' object has no attribute 'in_features' I used classifier so I change classifier into fc but got this error 'Sequential' object…
Farah Jabeen
  • 141
  • 1
  • 2
  • 6
1
vote
2 answers

Error: All inputs to the layer should be tensors- when trying to use VGG19 model

While trying to import VGG19 model, the code below generates an error of non tensor inputs. Although I am following another this code snippet here. Code: from keras.applications.vgg19 import VGG19 import keras.backend as K from keras.models import…
Safi
  • 152
  • 1
  • 11
1
vote
2 answers

How to manually load pretrained model if I can't download it using TensorFlow

I am trying to download the VGG19 model via TensorFlow base_model = VGG19(input_shape = [256,256,3], include_top = False, weights = 'imagenet') However the download always gets stuck before it finishes…