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
4
votes
0 answers

Tracing the region of an Image that contributes to a location in the CNN feature map

I(x, y, no of channels) is the image, and Fi(x, y, no of filters ) is the feature map at some layer 'i'. Given the architecture of a Convolutional Neural Network like VGGNet and a feature map after a certain layer Fi, is there an efficient way to…
4
votes
1 answer

Validation accuracy (val_acc) does not change over the epochs

Value of val_acc does not change over the epochs. Summary: I'm using a pre-trained (ImageNet) VGG16 from Keras; from keras.applications import VGG16 conv_base = VGG16(weights='imagenet', include_top=True, input_shape=(224, 224, 3)) Database from…
4
votes
2 answers

How to use 1-channel images as inputs to a VGG model

I first used 3-channel images as input to a VGG16 model with NO problem: input_images = Input(shape=(img_width, img_height, 3), name='image_input') vgg_out = base_model(input_images) # Here base_model is a VGG16 Now I would like to use 1-channel…
willz
  • 105
  • 2
  • 10
4
votes
1 answer

Keras VGGnet Pretrained Model Variable Sized Input

I want to extract features of a 368x368 sized image with VGG pretrained model. According to documentation VGGnet accepts 224x224 sized images. Is there a way to give variable sized input to Keras VGG? Here is my code: # VGG Feature…
mkocabas
  • 703
  • 6
  • 19
4
votes
3 answers

How can I I initialize the weights in slim.conv2d() with the value of existing model

I use slim.conv2d to set up VGG-net with slim.arg_scope([slim.conv2d, slim.max_pool2d], padding='SAME'): conv1_1 = slim.conv2d(img, 64, [3, 3], scope='conv1') conv1_2 = slim.conv2d(conv1_1, 64, [3, 3], scope='conv1_1') pool1 =…
Frank Mouzrt
  • 57
  • 1
  • 5
4
votes
2 answers

Caffe shape mismatch error using pretrained VGG-16 model

I am using PyCaffe to implement a neural network inspired by the VGG 16 layer network. I want to use the pre-trained model available from their GitHub page. Generally this works by matching layer names. For my "fc6" layer I have the following…
marcman
  • 3,233
  • 4
  • 36
  • 71
3
votes
1 answer

Convolutional layers convolve the wrong way around(Pytorch)?

I have been trying to visualize the outputs of a VGG-16 network. But the output seems to be just wrong. As you know the convolution doesn't translate the semantic segment of the picture. like for the following picture if the head is on the top part…
3
votes
2 answers

Why we use Unsqueeze() function while image processing?

I was trying to work on a guided project and it was related to image processing. While working on the image processing the instructor used Unsqueeze(0) function for setting up the bed size. I would like to know what happens after changing the bed…
3
votes
1 answer

How to force Keras VGG16 model show and include detailed layers when being used in new customized models

Summary: How to force keras.applications.VGG16 layers, rather than the vgg model, to show and be included as layers in the new customized models. Details: I was building customized models (denoted as model) on top of keras.applications.VGG16…
Joey Fueng
  • 95
  • 2
  • 7
3
votes
1 answer

What are conv3, conv4, conv5 outputs of VGG16?

Some research papers mention that they used outputs of conv3, conv4, conv5 outputs of a VGG16 network trained on Imagenet If I display the names of the layers of VGG16 like so: base_model = tf.keras.applications.VGG16(input_shape=[h, h, 3],…
user13410977
3
votes
1 answer

OpenCV Python Image Preprocessing for VGG16 Model

I would like to correctly pre-process images to input them into the VGG16 model In their original paper the authors write: During training, the input to our ConvNets is a fixed-size 224 × 224 RGB image. The only preprocessing we do is…
henry
  • 875
  • 1
  • 18
  • 48
3
votes
1 answer

1x1 convolution as classification layer in Pytorch

I am trying to classify image patches into 10 different categories using a neural network. My idea (borrowed from this article is to use the first 5 layers of a pretrained VGG network and apply a 1x1 convolution to this encoder. So, given the first…
3
votes
2 answers

What do I do to improve my Keras CNN VGG16 model

I'm working in a project that has 700 images for 2 classes (1400 total). I'm using VGG16 but i'm new with this model and I don't know what could I do to improve this model.. This is my model: vgg16_model = VGG16(weights="imagenet",…
user12096782
3
votes
2 answers

How to fix ("ValueError: You are trying to load a weight file containing 16 layers into a model with 0 layers")

I'm using vgg16 like this: model = VGG16() data, labels = ReadImages(TRAIN_DIR) vgg16 = VGG16() model = Sequential() #Converting VGG16 into Sequential model for layer in vgg16.layers[:-1]: model.add(layer) #Freezing all layers except last…
user12096782
3
votes
0 answers

Why my DataGenerator iterates on more data than the size of dataset and give IndexError: list index out of range?

I'm trying to implement a network with keras and tensorflow back-end, I'm using transfer learning model (VGG16), my dataset is a medical images dataset so instead of having only one image, I have a series of slices, so my dataset is organized in a…
Leili_Kue
  • 53
  • 4
1 2
3
31 32