vgg-net

pretrained VGG16 model misclassifies even though val accuracy is high and val loss is low [closed]

半腔热情 提交于 2020-07-22 05:50:47
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 8 hours ago . Improve this question I am new to Deep Learning and started with some tutorials, where I implemented VGG16 Net from Scratch. I wanted to classify integrated circuits in defect and non defect classes. I played around with it, changed the hyperparamters and got a really good result with

Accuracy low on validation set using vgg16

隐身守侯 提交于 2020-06-22 04:26:38
问题 I'm doing dog breed classification for a project and I encounter a major issue I have no idea how to solve it. The dataset is the images of dogs provided by Stanford Dogs dataset. I do a data augmentation with keras : from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img from keras import optimizers from keras.callbacks import History from keras.applications import vgg16 batch_size = 16 # this is the augmentation configuration I will use for training

The added layer must be an instance of class Layer. Found: <tensorflow.python.keras.engine.input_layer.InputLayer>

霸气de小男生 提交于 2020-05-10 07:36:29
问题 I am new to machine learning. I was following this tutorial on fine tuning VGG16 models. The model loaded fine with this code: vgg_model = tensorflow.keras.applications.vgg16.VGG16() but gets this ERROR: TypeError: The added layer must be an instance of class Layer. Found: <tensorflow.python.keras.engine.input_layer.InputLayer object at 0x000001FA104CBB70> When running this code: model = Sequential() for layer in vgg_model.layers[:-1]: model.add(layer) Dependencies: Keras 2.2.3 Tensorflow 1

Resnet50 does not converge. VGG16 works fine

一曲冷凌霜 提交于 2020-01-16 08:23:15
问题 I trained one regression network using resnet50 as backbone. The input of the network is image whose size is 224*224*3 , the output of the network is one value , varying from 0 to 1 . but the netwrok can not converge, no matter I use sigmoid or relu as output layer's activation. mae or mse as loss function . For exampple, I use resnet50 as backbone, mae as loss function, sigmoid is the activation function of output layer. SGD as optimizer. The training loss would be: Epoch 1 training loss is

Resnet50 does not converge. VGG16 works fine

痴心易碎 提交于 2020-01-16 08:21:18
问题 I trained one regression network using resnet50 as backbone. The input of the network is image whose size is 224*224*3 , the output of the network is one value , varying from 0 to 1 . but the netwrok can not converge, no matter I use sigmoid or relu as output layer's activation. mae or mse as loss function . For exampple, I use resnet50 as backbone, mae as loss function, sigmoid is the activation function of output layer. SGD as optimizer. The training loss would be: Epoch 1 training loss is

VGG 16/19 Slow Runtimes

偶尔善良 提交于 2020-01-14 05:58:09
问题 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 be, as with many other models (i.e. ResNet, AlexNet) I get an output in a split second, this is the only model I've found so far that's performing this poorly. The code I'm using is as follows: img = cv2.imread(path + img_name + '.jpg') img =

Vgg16 for gender detection (male,female)

扶醉桌前 提交于 2019-12-24 16:42:56
问题 We have used vgg16 and freeze top layers and retrain last 4 layers on gender dataset 12k male and 12k female. It gives very low accuracy especially for male.we are using IMDB dataset. On female test data it gives female as output but on male it gives same output. vgg_conv=VGG16(weights='imagenet', include_top=False, input_shape=(224, 224, 3)) Freeze the layers except the last 4 layers for layer in vgg_conv.layers[:-4]: layer.trainable = False Create the model model = models.Sequential() Add

Pytorch: Modifying VGG16 Architecture

安稳与你 提交于 2019-12-24 08:25:47
问题 I'm currently trying to modify the VGG16 network architecture so that it's able to accept 400x400 px images. Based on literature that I've read, the way to do it would be to covert the fully connected (FC) layers into convolutional (CONV) layers. This would essentially " allow the network to efficiently “slide” across a larger input image and make multiple evaluations of different parts of the image, incorporating all available contextual information." Afterwards, an Average Pooling layer is

Stop and Restart Training on VGG-16

南楼画角 提交于 2019-12-20 05:17:13
问题 I am using pre-trained VGG-16 model for image classification. I am adding custom last layer as the number of my classification classes are 10. I am training the model for 200 epochs. My question is: is there any way if I randomly stop (by closing python window) the training at some epoch, let's say epoch no. 50 and resume from there? I have read about saving and reloading model but my understanding is that works for our custom models only instead of pre-trained models like VGG-16. 回答1: You

Integrating Keras model into TensorFlow

假装没事ソ 提交于 2019-12-18 01:09:29
问题 I am trying to use a pre-trained Keras model within TensorFlow code, as described in this Keras blog post under section II: Using Keras models with TensorFlow. I want to use the pre-trained VGG16 network available in Keras to extract convolutional feature maps from images, and add my own TensorFlow code over that. So I've done this: import tensorflow as tf from tensorflow.python.keras.applications.vgg16 import VGG16, preprocess_input from tensorflow.python.keras import backend as K # images =