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
6
votes
2 answers

How do filters run across an RGB image, in first layer of a CNN?

I was looking at this printout of layers. I realized, this shows input / output, but nothing about how the RGB channels are dealt with. If you look at block1_conv1, it says "Conv2D". But if the input is 224 x 224 x 3, then that's not 2D. By my…
6
votes
1 answer

How to preprocess training set for VGG16 fine tuning in Keras?

I have fine tuned the Keras VGG16 model, but I'm unsure about the preprocessing during the training phase. I create a train generator as follow: train_datagen = ImageDataGenerator(rescale=1./255) train_generator = train_datagen.flow_from_directory( …
maccN
  • 189
  • 1
  • 4
  • 13
6
votes
3 answers

VGG Face Descriptor in python with caffe

I want implement VGG Face Descriptor in python. But I keep getting an error: TypeError: can only concatenate list (not "numpy.ndarray") to list My code: import numpy as np import cv2 import caffe img = cv2.imread("ak.png") img = cv2.cvtColor(img,…
Iwn
  • 65
  • 2
  • 10
5
votes
1 answer

Nginx: Client request body is buffered to a temporary file

I've deployed a ML Model on AWS. It's an image classifier. When I provide the following images to the ML Model via a form in Flask, it works in certain cases but doesn't work in other cases. The link of the image which work is listed below:…
5
votes
4 answers

ValueError: The input must have 3 channels; got `input_shape=(200, 200, 1)`

I am trying to use Transfer learning with VGG16. I am using Keras. But I got error on vgg = vgg16.VGG16(include_top=False, weights='imagenet', input_shape=(IMG_SIZE, IMG_SIZE, 1)) Any help what is wrong ? Note: IMG_SIZE = 200 The trace of error…
Hitesh Somani
  • 620
  • 4
  • 11
  • 16
5
votes
1 answer

Strategy to put and get large images in VGG neural networks

I'm using a transfert-style based deep learning approach that use VGG (neural network). The latter works well with images of small size (512x512pixels), however it provides distorted results when input images are large (size > 1500px). The author of…
jeanluc
  • 67
  • 6
5
votes
2 answers

what is output dimension of the inception and vgg16

I have used two image net trained models i.e. VGG16 and inception using following lines in python using Keras API; where x is the input image and batch size is for simplicity =1. VGGbase_model = InceptionV3(weights='imagenet', include_top=False,…
5
votes
2 answers

Does keras have a pretrained AlexNet like VGG19?

If I want to use pretrained VGG19 network, I can simply do from keras.applications.vgg19 import VGG19 VGG19(weights='imagenet') Is there a similar implementation for AlexNet in keras or any other library?
Nagabhushan S N
  • 6,407
  • 8
  • 44
  • 87
5
votes
0 answers

Is it possible in Keras to have an input_shape of width and height 32x32?

I am using Python with Keras and Tensorflow as backend and I want to use input images as small as possible for my model. The VGG19 application says that it allows input shapes as low as 32 for width and height. A few weeks ago this minimum value…
Catalin Stoean
  • 131
  • 3
  • 6
5
votes
1 answer

How to use the vgg-net when I load vgg16_weights.h5?

I use the VGG-16 Net by keras. This is the detail my problem is how to use this net to fine-tuning, and must I use the image size which is 224*224 for this net? And I must use 1000 classes when I use this net? if I don't use 1000 classes, it cause…
sky
  • 103
  • 1
  • 7
4
votes
1 answer

Saving Custom TableNet Model (VGG19 based) for table extraction - Azure Databricks

I have a model based on TableNet and VGG19, the data (Marmoot) for training and the saving path is mapped to a datalake storage (using Azure). I'm trying to save it in the following ways and get the following errors on Databricks: First…
Lidor Eliyahu Shelef
  • 1,299
  • 1
  • 14
  • 35
4
votes
0 answers

What does "Process finished with exit code -1073740791 (0xC0000409)" mean

I am trying to run a VGG python code via PyCharm. When I run the code, I am getting: Process finished with exit code -1073740791 (0xC0000409) and I do not know what to do because it should show the 50 epochs that I am trying to execute. I have…
Josh
  • 107
  • 1
  • 2
  • 9
4
votes
1 answer

How Can I Increase My CNN Model's Accuracy

I built a cnn model that classifies facial moods as happy , sad, energetic and neutral faces. I used Vgg16 pre-trained model and freezed all layers. After 50 epoch of training my model's test accuracy is 0.65 validatation loss is about 0.8 . My…
4
votes
1 answer

Correct way to compute VGG features for Perceptual loss

While computing VGG Perceptual loss, although I have not seen, I feel it is alright to wrap the computation of VGG features for the GT image inside torch.no_grad(). So basically I feel the following will be alright, with torch.no_grad(): …
Mohit Lamba
  • 1,194
  • 13
  • 30
4
votes
1 answer

Error restoring weights into a VGG-16 network

I'm using Python 3.7.7 and Tensorflow 2.1.0. I want to create a VGG16 autoencoder network, load a weights file to it, and then get its encoder and its decoder. The functions to get the VGG16 autoencoder network are: def…
VansFannel
  • 45,055
  • 107
  • 359
  • 626
1
2
3
31 32