Questions tagged [conv-neural-network]

0

votes
0

answer
3

Views

UNet CNN Segmentation: mask size adjustment

As shown in the UNet figure, the input image size is 572x572 and the output mask size is 388x388. In the real scenario for segmentation, the mask size should be the same size as input image. What are the ways to change 388x388 => 572x572 ? thank!
Nima
0

votes
1

answer
10

Views

TypeError: The added layer must be an instance of class Layer. Found: <keras.engine.input_layer.InputLayer object at 0x7fc6f1b92240>

I am trying to add vgg16 layers to Sequential model but getting the error mentioned in the Question Title from keras.applications.vgg16 import VGG16 from tensorflow.contrib.keras.api.keras.models import Sequential vgg_model = VGG16() model = Sequential() #print(model.summary()) for layer in vgg_mod...
AK_AI
1

votes
1

answer
419

Views

How does upsampling in Fully Connected Convolutional network work?

I read several posts / articles and have some doubts on the mechanism of upsampling after the CNN downsampling. I took the 1st answer from this question: https://www.quora.com/How-do-fully-convolutional-networks-upsample-their-coarse-output I understood that similar to normal convolution operation,...
captainst
0

votes
1

answer
11

Views

ModuleNotFoundError: No module named 'ioc' in TFlearn Image Classification

I am designing an image classifier using CNN in python, pycharm. I want to plot an accuracy graph at the end. Following is my code to plot the graph: hist = { 'Accuracy' : [x.value for x in ea.Scalars('Accuracy')], 'Validation Accuracy' : [x.value for x in ea.Scalars('Accuracy/Validation')], 'L...
Atif Ali
1

votes
1

answer
4.5k

Views

What does it mean by deconvolution (backwards convolution)?

What does it mean by deconvolution or backwards convolution in convolutional neural nets? I understand convolution, if we consider a 3x3 window W and a kernel k of same size the result of the convolution W*K will be one value. Here k is a matix with 3x3 elements. In my understanding deconvolution tr...
user570593
1

votes
1

answer
1.3k

Views

Resize image preserving aspect ratio in Tensorflow

I am fairly new to TF. I am trying to resize an image tensor so that the lowest dimension of the image is a constant value LO_DIM. In a non-tf environment, I'd just do something like this: if img.size[0] < img.size[1]: h = int(float(LO_DIM * img.size[1]) / img.size[0]) img = resize(img, [LO_DIM, h])...
kuranes
1

votes
2

answer
756

Views

Multiple Input types in a keras Neural Network

As an example, I'd like to train a neural network to predict the location of a picture(longitude, latitude) with the image, temperature, humidity and time of year as inputs into the model. My question is, what is the best way to add this addition information to a cnn? Should I just merge the numeric...
user3029296
1

votes
2

answer
916

Views

Tensorflow model saving and loading

How can save a tensorflow model with model graph like we do in do keras. Instead of defining the whole graph again in prediction file, can we save whole model ( weight and graph) and import it later In Keras: checkpoint = ModelCheckpoint('RightLane-{epoch:03d}.h5',monitor='val_loss', verbose=0, sav...
Shobhit Verma
1

votes
1

answer
1.3k

Views

How do I load custom image based datasets into Pytorch for use with a CNN?

I have searched for hours on the internet to find a good solution to my issue. Here is some relevant background information to help you answer my question. This is my first ever deep learning project and I have no idea what I am doing. I know the theory but not the practical elements. The data that...
Aeryes
1

votes
1

answer
631

Views

Use pretrained model with different input shape and class model

I am working on a classification problem using CNN where my input image size is 64X64 and I want to use pretrained model such as VGG16,COCO or any other. But the problem is input image size of pretrained model is 224X224. How do I sort this issue. Is there any data augmentation way for input image s...
Pankaj Kumar
0

votes
0

answer
5

Views

Tensorflow exploding gradient

I have a CNN architecture to output the coordinates of a box around an object: However if I implement it in tf, the loss becomes nan even after one epoch. I tried gradient clipping and batch normalization, but neither works. I suspect that something is wrong with my loss, here is the corresponding c...
user560746
0

votes
0

answer
4

Views

Why are my loop-generated Keras sequential models all exactly the same?

I would like to train multiple models all with the same hyper-parameters until I get one that is is sufficiently accurate. I expect slight deviations in performance due to the initial weights being randomly set when the model is created. Each time I ru my program the first CNN has a different accura...
Spoonless
1

votes
1

answer
1.1k

Views

Don't understand train data from convnetjs

I'm trying to predict some data using a neural network in javascript. For that I found convnetjs that seems easy to use. In the example, they use one thing that they call MagicNet, so you don't need to know about NN to work with it. This is the example of use: // toy data: two data points, one of cl...
Sascuash
0

votes
0

answer
23

Views

Is it possible to let a neural network classify entities based on classified documents?

I tagged a dataset of texts with independent categories. When running a CNN classifier in Keras, I receive an accuracy of > 90%. What I am interested in, is whether I can let the model classify entities rather than whole texts. My texts are customer reviews "I really liked the camera of this phone....
junkmaster
0

votes
2

answer
30

Views

Why keras does not allow to add a convolutional layer in this way?

The following code from tensorflow import keras from keras.layers import Conv2D model = keras.Sequential() model.add(Conv2D(1, (3, 3), padding='same', input_shape=(28, 28, 1))) when executed throws an error: TypeError: The added layer must be an instance of class Layer. Found: I also tried using th...
mercury0114
0

votes
0

answer
17

Views

Convolutional Layers Visualization in Keras

I want to visualize the images in Convolutional Layers of a deep learning model, I found the code in the link. https://github.com/yashk2810/Visualization-of-Convolutional-Layers/blob/master/Visualizing%20Filters%20Python3%20Theano%20Backend.ipynb I applied the same code but I get empty images. I am...
Noran
52

votes
1

answer
29.2k

Views

Keras Early Stopping [closed]

I'm training neural network for my project using Keras. Keras has provided a function for early stopping. May I know what parameters should be observed to avoid my neural network from overfitting by using early stopping?
AizuddinAzman
-2

votes
0

answer
21

Views

What is the Best CNN (Convolutional Neural Network) Model in 2018? [on hold]

Since last year I always use GoogLeNet to perform the image classification. Is there any better option than GoogleNet (or Inception) at the end of 2018 in term of accuracy, speed, and simplicity (last one might be subjective)? Also is it better to just use Object Detection like YOLO instead of imag...
gameon67
0

votes
0

answer
4

Views

Error training Faster RCNN v2 inception on augmented dataset but not using SSD Mobilenet v1 coco

I augmented my dataset and trained it on SSD Mobilenet v1 coco using Tensorflow Object Detection API https://github.com/tensorflow/models/tree/master/research/object_detection. I initially got this error: ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[]24,256...
Chaine
2

votes
1

answer
55

Views

Keras model giving very low training and validation accuracy for multi-label image classification

My code has 50 categories of images which are being passed into the following model. But the accuracies received are almost the same after any of the parameter tuning done by me. The training and validation data is correct. Every category has 34 training images and 6 validation images. import keras...
Abhiram Satputé
3

votes
1

answer
587

Views

Torch: NN handling text and numeric input

I have the following NN architecture: Part 1: nn.Sequential { [input -> (1) -> (2) -> (3) -> (4) -> (5) -> (6) -> (7) -> output] (1): nn.TemporalConvolution (2): nn.TemporalMaxPooling (3): nn.TemporalConvolution (4): nn.TemporalMaxPooling (5): nn.Reshape(14336) (6): nn.Dropout(0.500000) (7): nn.Line...
PeterK
3

votes
1

answer
1.8k

Views

Clarification about flatten function in Theano

in [http://deeplearning.net/tutorial/lenet.html#lenet] it says: This will generate a matrix of shape (batch_size, nkerns[1] * 4 * 4), # or (500, 50 * 4 * 4) = (500, 800) with the default values. layer2_input = layer1.output.flatten(2) when I use flatten function on a numpy 3d array I get a 1D array....
user27665
1

votes
2

answer
4.3k

Views

Caffe, how to predict from a pretrained net

I'm using this code to load my net: net = caffe.Classifier(MODEL_FILE, PRETRAINED, mean=np.load(caffe_root + 'python/caffe/imagenet/ilsvrc_2012_mean.npy').mean(1).mean(1), channel_swap=(2,1,0), raw_scale=255, image_dims=(256, 256)) I have doubts on three lines. 1- mean=np.load(caffe_root + 'python/c...
Caaarlos
1

votes
2

answer
1.3k

Views

CNN feed forward or back propagtion model

Is convolutional neural network (CNN) a feed forward model or back propagation model. I get this confusion by comparing the blog of DR.Yann and Wikipedia definition of CNN.
1

votes
1

answer
1.9k

Views

Criteria for nb_epoch, samples_per_epoch, and nb_val_samples in keras fit_generator?

I have created a simple cat and dog image classification (convolution neural network). Having training data of 7,000 each class and validation data of 5,500 each class. My problem is my system is not completing all epoch. I would really appreciate if someone could explain the proportion or criteria...
Azeem Ullah
52

votes
1

answer
28.7k

Views

Keras Early Stopping [on hold]

I'm training neural network for my project using Keras. Keras has provided a function for early stopping. May I know what parameters should be observed to avoid my neural network from overfitting by using early stopping?
AizuddinAzman
2

votes
2

answer
93

Views

How can I only update some specific tensors in network with pytorch?

For instance, I want to only update all cnn weights in Resnet in the first 10 epochs and freeze the others. And from 11th epoch, I wanna change to update the whole model. How can I achieve the goal?
gasoon
0

votes
0

answer
5

Views

Keras giving memory allocation error and running extremely slow

I am working on character recognition using convolutional neural networks. I have 9 layer model and 19990 training data and 4470 test data. But when I am using keras with Tensorflow backend. When I try to train the model, it runs extremely slow, like 100-200 samples per minute. I tried adding batch...
Shantanu Shinde
2

votes
1

answer
1.4k

Views

ValueError: Negative dimension size caused by subtracting 2 from 1 for 'max_pooling2d_6/MaxPool' (op: 'MaxPool') with input shapes: [?,1,1,64]

I am getting an error of Negative dimension size when I am keeping height and width of the input image anything below 362X362. I am surprised because this error is generally caused because of wrong input dimensions. I did not find any reason why number or rows and columns can cause an error. Below i...
aaaaa
16

votes
2

answer
9k

Views

How to design deep convolutional neural networks?

As I understand it, all CNNs are quite similar. They all have a convolutional layers followed by pooling and relu layers. Some have specialised layers like FlowNet and Segnet. My doubt is how should we decide how many layers to use and how do we set the kernel size for each layer in the network. I h...
malreddysid
5

votes
0

answer
240

Views

How to export ConvNet trained using Python's Theano/Lasagne to iOS?

I trained a convolutional neural net with Lasagne and Theano frameworks on Python. I am satisfied with the architecture and the performance of the net on test data and I want to use it on an iPad application. I was wondering if there is any simple way to take that net and use it on iOS without rewri...
guyov
1

votes
2

answer
61

Views

CNN Arrow image classifier on differently shaped arrows

I've been using Keras with Tensorflow to classify a normalized 60x60 grayscale image of an arrow into 4 categories, its orient, up, down, left, right. I have created a dataset of about ~1800 images, almost equally distributed into said categories. However, there's a problem with classification. From...
Dashadower
0

votes
0

answer
6

Views

How to change class labels of a custom Keras data generator

I prepared a custom custom image data generator for my Keras application. It works well but I have a problem with the class labels. Here is the related part of the code: def _get_batches_of_transformed_samples(self, index_array): # create array to hold the images batch_x = np.zeros((4*len(index_arra...
jonathan eslava
2

votes
0

answer
151

Views

I would like to have an example of using Tensorflow ConvLSTMCell

I would like to have a small example of building an encoder-decoder network using Tensorflow ConvLSTMCell. Thanks
17

votes
3

answer
10.4k

Views

Why rotation-invariant neural networks are not used in winners of the popular competitions?

As known, modern most popular CNN (convolutional neural network): VGG/ResNet (FasterRCNN), SSD, Yolo, Yolo v2, DenseBox, DetectNet - are not rotate invariant: Are modern CNN (convolutional neural network) as DetectNet rotate invariant? Also known, that there are several neural networks with rotate-i...
Alex
17

votes
1

answer
8.9k

Views

input dimensions to a one dimensional convolutional network in keras

really finding it hard to understand the input dimensions to the convolutional 1d layer in keras: Input shape 3D tensor with shape: (samples, steps, input_dim). Output shape 3D tensor with shape: (samples, new_steps, nb_filter). steps value might have changed due to padding. I want my network to tak...
Nick
0

votes
0

answer
2

Views

image labeling and Save in Imagedatastore for Convolutional Net

hello I have 297 grayscale Images (drone Images) and I must classify Images into 3 Types, Images with Label as Home (number 1), Images with Label as Car (number 2) and Images with Label as tree (number 3) and Then Save Them in ImageDataStore for Divide Images into Train and Test and Validation and D...
hosein
18

votes
2

answer
5.7k

Views

For what reason Convolution 1x1 is used in deep neural networks?

I'm looking at InceptionV3 (GoogLeNet) architecture and cannot understand why do we need conv1x1 layers? I know how convolution works, but I see a profit with patch size > 1.
Verych
2

votes
1

answer
163

Views

Adding convolution layer in keras giving errors

I have a dataset which has two classes and has 400 features. Each feature is a floating point number. I am trying to build a basic CNN in keras but I am facing the following error. I have checked other solutions but those solutions ask to reshape the training data into (batch_size, steps, input_dim)...
silent_dev
19

votes
1

answer
666

Views

3d sliding window operation in Theano?

TL.DR. Is there a 3-dimensional friendly implementation of theano.tensor.nnet.neighbours.images2neibs? I would like to perform voxel-wise classification of a volume (NxNxN) using a neural network that takes in a nxnxn image, where N>n. To classify each voxel in the volume, I have to iterate throug...
teng

View additional questions