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
0
votes
1 answer

Layer output of a pre-trained model produces different outputs unexpectedly

I have a (1, 224, 224, 3) sized numpy array named content_image. That is the size of VGG network input. When I transfer content_image to input of VGG network as illustrated below: model = vgg19.VGG19(input_tensor=K.variable(content_image),…
johncasey
  • 1,250
  • 8
  • 14
0
votes
1 answer

Finetuning VGG-16 on GPU in Keras: memory consumption

I'm fine-tuning VGG-16 for my task. The idea is that I load the pretrained weights, remove the last layer (which is softmax with 1000 outputs) and replace it with a softmax with a few outputs. Then I freeze all the layers but the last and train the…
Roman Puchkovskiy
  • 11,415
  • 5
  • 36
  • 72
0
votes
1 answer

VGG transfer learning error

I'm training a VGG network using transfer learning approach. (fine-tuning) But while training the dataset, I found the following error where it stops the training process. ETA: 19:00:06 4407296/553467096 [..............................] - ETA:…
user3789200
  • 1,166
  • 2
  • 25
  • 45
0
votes
0 answers

How to use VGG-S and how to extract output features by it?

In deep learning there are many model of convolution neural network CNN. To try VGG-S model, I download "imagenet-vgg-s.mat" from here and I try it by this code to extract the output feature from 2nd fully connected layer: net =…
Tripoli
  • 1
  • 4
0
votes
1 answer

Size mismatch error during VGG finetuning

I have been following the ants and bees transfer learning tutorial from the official PyTorch Docs (http://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html). I am trying to finetune a VGG19 model by changing the final layer to predict…
0
votes
1 answer

After tensorflow training, vgg-net return nan

I training vgg-19 net to classfy cifar10, after training one time, just one, the vgg-net returns nan. 0 [[ 4.45161677e+09 2.87961518e+10 4.20765041e+10 ..., -2.33432433e+10 1.83500431e+10 -1.12923648e+10] [ 1.18354002e+10 …
梁生珺
  • 103
  • 1
  • 11
0
votes
0 answers

TensorFlow - Extra dimension in input is giving out an error

I'm trying to extract features from VGG net using TensorFlow. I am loading a batch of 1000 images in a numpy array of shape (1000, 448, 448, 3) and trying to use feed_dict to feed the network with this batch: pool = sess.run(vgg.lastpool,…
0
votes
1 answer

TensorFlow endorsed vgg-19 model/feature extractor

My task requires me to extract features from the pool5 layer of vgg-19 net. Previously I was doing it using Caffe and then working on the extracted features using Tensorflow for further training. But now, I want to add a deconv layer on top and…
HIMANSHU RAI
  • 305
  • 1
  • 4
  • 13
0
votes
1 answer

VGG: ValueError: too many values to unpack (expected 2)

I defined VGG net and made test tasks: def net get the VGG model parameters, so I can use mnist data for a test task. Here are the error information: Traceback (most recent call last): File "D:\Users\2015randongmei\workspace\tensor\VGG.py", line…
0
votes
1 answer

fine tuning vgg raise memory error

Hi i'm trying to fine tuning vgg on my problem but when i try to train the net i get this error. OOM when allocating tensor with shape[25088,4096] The net has this structure: I take this tensorflow pretrained vgg implementation code from this…
Alberto Merciai
  • 474
  • 1
  • 5
  • 17
0
votes
1 answer

Problems with input shapes at finetuning VGG with Keras

I'm trying to finetune the last layer of the VGG-16. Here is the part of the code where i make the new model: def train2false(model): for layer in model.layers: layer.trainable = False return model def…
Eric
  • 1,108
  • 3
  • 11
  • 25
0
votes
1 answer

VGG 16/19 Slow Runtimes

When I try to get an output from the pre-trained VGG 16/19 models using Caffe with Python (both 2.7 and 3.5) it's taking over 15 seconds on the net.forward() step (on my laptop's CPU). I was wondering if anyone might advise me as to why this could…
Daniel Crane
  • 257
  • 3
  • 10
0
votes
1 answer

VGG features extraction in certain format

I'm trying to get this repo to work. I followed the instruction and get the sample data using this script (taken from the same repo): #!/usr/bin/env sh # This script downloads the trained S2VT VGG (RGB) model, # associated vocabulary, and frame…
0
votes
1 answer

Using Torch trained VGG face

Is there any way I can pass existing images in my system through a trained VGG with torch? I am using Ubuntu 14.04 and unfortunately do not have a GPU. I have searched quite extensively but all the ones I have found require a GPU. Are there other…
Sibi
  • 2,221
  • 6
  • 24
  • 37
0
votes
1 answer

how to fine-tune VGG model with single channel input?

The VGG model accept a 3-channel RGB image as input, but my data are single gray images, any suggestions for how to utilize the weights in first conv layer of VGG model?
joe
  • 99
  • 1
  • 12