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

FailedPreconditionError: Attempting to use uninitialized value Adam/lr

I was on the process of training a VGG16 fine-tuned model.After the first epoch,the program stopped and gave this error: Below is the code I used for the model: # create a copy of a mobilenet model import…
Rstynbl
  • 545
  • 2
  • 6
  • 10
3
votes
1 answer

How can I get rid of stuck accuracy and loss values in deep learning?

I'm dealing with deep learning and medical image classification with it. I use brain MRI data and convert them into jpg. Then VGG16 is used for training. When I check the loss, accuracy, validation loss and validation accuracy, I see the graphs…
umitkilic
  • 327
  • 1
  • 4
  • 17
3
votes
1 answer

How to add a Lambda layer as an input layer to an existing model in Keras?

I have a task to add a image preprocessing layer to a Keras model, so after I loaded a Keras model, I want to add a new input layer for this model. I found I can use Lambda layer to preprocess the image data. The layer code is: def…
wellido
  • 45
  • 5
3
votes
1 answer

Issue with transfer learning with Tensorflow and Keras

I've been trying to recreate the work done in this blog post. The writeup is very comprehensive and code is shared via a collab. What I'm trying to do is extract layers from the pretrained VGG19 network and create a new network with these layers as…
Austin A
  • 2,990
  • 6
  • 27
  • 42
3
votes
1 answer

Can't reproduce results using Keras fit_generator

I've just noticed that I get different results everytime I run a Keras model. I've tried the solutions from this issue on GitHub, basically: Setting up the seeds before importing anything else Setting shuffle=False on fit_generator() Even though…
jruivo
  • 447
  • 1
  • 8
  • 22
3
votes
0 answers

Instantiate VGG model for once only in Keras when predicting continuously?

There are many online tutorial to guide how to predict one image for one time in Keras using pretrained model. For my case, I use VGG16 model in Keras, I need to predict images continuously, so I use for loop to load images, then pass it to predict…
zcsd
  • 31
  • 2
3
votes
1 answer

A proper way to adjust input size of CNN (e.g. VGG)

I want to train VGG on 128x128-sized images. I don't want to rescale them to 224x224 to save GPU-memory and training time. What would be the proper way to do so?
3
votes
2 answers

Keras: using VGG16 to detect specific, non-generic item?

I'm learning about using neural networks and object detection, using Python and Keras. My goal is to detect something very specific in an image, let's say a very specific brand / type of car carburetor (part of a car engine). The tutorials I found…
3
votes
0 answers

Memory issue when retraining dense layers of VGG 16

I wanted to retrain the fully connected layers of VGG 16 for big gray level images (1800x1800), using Keras with Then backend. So I've: created a new VGG with a single color channel and loaded the weights from of the original VGG. add…
FiReTiTi
  • 5,597
  • 12
  • 30
  • 58
3
votes
1 answer

How to use pre-trained features from VGG-16 as input to GlobalAveragePooling2D() layer in Keras

Is it possible to use pre-trained model features from VGG-16 and pass to GlobalAveragePooling2D() layer of other model in Keras? Sample code for storing offline features of VGG-16 network: model = applications.VGG16(include_top=False,…
2
votes
2 answers

Error while using VGG16 pretrained model for grayscale images

I am working on sign language detection using VGG16 pre-trained model with grayscale images. When I am trying to run the model.fit command, I am getting the following error. CLARIFICATION I already have images as RGB form but I want to use them as…
2
votes
2 answers

AttributeError: module 'keras.applications' has no attribute 'VGG16'

I'm trying to run code that is supposed to identify different types of image categories. The code is of VGG16 and I have the following error. Of course I tried to install and import directories (keras etc...)and the error still exists. Would…
Tal Shaul
  • 21
  • 1
  • 3
2
votes
1 answer

how to use pretrained models on low resolution images like tiny imagenet dataset

I download the tiny imagenet dataset that is a subset of imagenet dataset and the size of its images is 64*64 pixels. I want to use pretrained models on original imagenet like alexnet and VGG and feed the images of tiny imagenet as input to the…
altina9619
  • 31
  • 5
2
votes
1 answer

How can i convert json file from labelme interface to png or image format file?

When i used the labeling the images from labelme interface as output i get json file.but i need to in image format like png,bmp,jpeg after labeling. can anyone suggest me any code ? import json from PIL import Image with open('your,json') as f: …
2
votes
1 answer

NameError: name 'plot_confusion_matrix' is not defined

I am trying to make a classification model using VGG16 but at the end of the project I faced an error for getting the Confusion Matrix. Below the codes are given, Imported packages and modules are: import os import keras import numpy as np import…