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

Preprocessing for using VGG model with VGGFace weights

What are the preprocessing steps that need to be done to train a finetuned VGG model with pretrained VGGFace weights ? I am trying to fit an array of images of size 224x224x3 into my finetuned VGG model (freezed last 4 layers of the network), and…
Amruth Lakkavaram
  • 1,467
  • 1
  • 9
  • 12
0
votes
1 answer

I have built an image search using VGG16. It takes 4 mins to go through the search. what are the techniques that I can use to shorten this time?

I have built an image search using VGG16 engine, I have a data set of about 20,000 images. It takes 4 mins to go through the search. what are the techniques that I can use to shorten this time?
0
votes
1 answer

Keras Error - expected activation_1 to have shape (2622,) but got array with shape (1,)

Hello guys I am trying to make pretrained VGG16 on Keras But it keeps give me error: ValueError: Error when checking target: expected activation_1 to have shape (2622,) but got array with shape (1,) I was trying to create the model based on this…
flyingduck92
  • 1,449
  • 2
  • 23
  • 39
0
votes
1 answer

I can't adapt my dataset to VGG-net, getting size mismatch

I’m trying to implement the pre-trained VGG net to my script, in order to recognize faces from my dataset in RGB [256,256], but I’m getting a “size mismatch, m1: [1 x 2622], m2: [4096 x 2]” even if i'm resizing my images it doesn't work, as you can…
0
votes
1 answer

ValueError: Error when checking : expected dense_1_input to have 2 dimensions, but got array with shape (1, 16, 16, 512)

I'm having the following error: ValueError: Error when checking : expected dense_1_input to have 2 dimensions, but got array with shape (1, 16, 16, 512) which occurs at this line: img_class = model.predict_classes(feature_value) Any idea on…
Simplicity
  • 47,404
  • 98
  • 256
  • 385
0
votes
1 answer

Traceback (most recent call last) in Colab when looping through dataloader in pytorch

I'm working on a project to classify flower images using a pre-trained model vgg19 using pytorch. I'm relying on the model features only and using a custom classifier. However on starting a for-loop to feed images to the model classifier and…
Eric kioko
  • 27
  • 2
  • 12
0
votes
1 answer

Difference in different vgg16 objects

I am going through vgg16 model and saw this: model = VGG16(weights='imagenet') and model = VGG16() What is the difference between the above two? Does the second initialization also load weights in the imported vgg16 model? How can I just import…
Ajay Negi
  • 71
  • 11
0
votes
1 answer

Deep learning : Which model to use for custom and unusual object detection

I'm working on a Bacteria detection project. My question is : is it releavant to use pretrained weights and only train a model on few last layers to detect unusual objects ? Or should i train the model from scratch ? (i have arround 2000 images of…
0
votes
0 answers

why my below modified vgg-16 Keras model takes 1 hour to run one epoch

My model is Using TensorFlow backend. Found 8704 images belonging to 68 classes. Found 2176 images belonging to 68 classes. Found 1360 images belonging to 68…
BAE
  • 8,550
  • 22
  • 88
  • 171
0
votes
1 answer

Error in Merging one LSTM model output and VGG model output

#make custom embedding layer embedding_layer = Embedding(len(word_index) + 1, EMBEDDING_DIM, weights=[embedding_matrix], input_length=max_length_of_text, …
0
votes
2 answers

Cannot convert VGG16 layers to sequential

I am trying to do image classification using VGG16 pre-trained model. For the same, I did the following: vgg16_model = keras.applications.vgg16.VGG16() The type of the model is as follows: type(vgg16_model) And the result…
Kris
  • 327
  • 3
  • 6
  • 19
0
votes
1 answer

How to get VGG model prediction for a given input image?

Here the image has to be transformed according to the input type for a VGG16 model.I have used the following code for this,I am using a VGG16 model form the library and setting the pre trained value to be true import numpy as np from glob import…
0
votes
0 answers

Why Tensorflow's non-standard VGG implementation?

Tensorflow .slim library implements vgg, but replaces the fully connected layers with convolutional ones. The code is at: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/slim/python/slim/nets/vgg.py So for example, fc8…
komark
  • 197
  • 1
  • 10
0
votes
0 answers

What is the meaning of tuple under function definition

recently, I read codes from https://github.com/danfeiX/scene-graph-TF-release/ In lib/fast-rcnn/models.py, there are lots of tuple-under-function style code. for example, _vgg_fc() def _vgg_fc(self): (self.feed('conv_out', 'rois') …
张浥东
  • 31
  • 4
0
votes
1 answer

training VGG16 from scratch

I was trying to train my VGG16 network from scratch. for this, I downloaded the architecture from https://gist.github.com/baraldilorenzo/07d7802847aaad0a35d3 One of the authors has written the code as vgg-16_keras.py code. In this code, the default…
Upendra01
  • 344
  • 3
  • 5
  • 15