Questions tagged [cnn]

Convolutional Neural Networks (CNN, also called ConvNets) are a tool used for classification tasks and image recognition. The name giving first step is the extraction of features from the input data.

Filter by
Sorted by
Tagged with
59 votes
3 answers
114k views

How to set batch_size, steps_per epoch, and validation steps?

I am starting to learn CNNs using Keras. I am using the theano backend. I don't understand how to set values to: batch_size ...
Ermene's user avatar
  • 693
35 votes
6 answers
16k views

Why do convolutional neural networks work?

I have often heard people saying that why convolutional neural networks are still poorly understood. Is it known why convolutional neural networks always end up learning increasingly sophisticated ...
Praise the lord's user avatar
31 votes
3 answers
34k views

What's the difference between Attention vs Self-Attention? What problems does each other solve that the other can't?

As stated in the question above..is there a difference between attention and self attention mechanism ? Also additionally can anybody share with me tips and tricks about how self attention mechanism ...
Pratik.S's user avatar
  • 443
29 votes
1 answer
26k views

What is the difference between upsampling and bi-linear upsampling in a CNN?

I am trying to understand this paper and am unsure of what bi-linear upsampling is. Can anyone explain this at a high-level?
JGG's user avatar
  • 503
26 votes
1 answer
29k views

back propagation in CNN

I have the following CNN: I start with an input image of size 5x5 Then I apply convolution using 2x2 kernel and stride = 1, that produces feature map of size 4x4. Then I apply 2x2 max-pooling with ...
koryakinp's user avatar
  • 436
25 votes
4 answers
71k views

What is a channel in a CNN?

I was reading an article about convolutional neural networks, and I found something that I don't understand, which is: The filter must have the same number of channels as the input image so that the ...
J.D.'s user avatar
  • 851
23 votes
1 answer
6k views

How to add non-image features along side images as the input of CNNs

I'm training a convolutional neural network to classify images on fog conditions (3 classes). However, for each of about 150.000 images I also have four meteorological variables available that might ...
Josh's user avatar
  • 487
19 votes
2 answers
14k views

What are the differences between Convolutional1D, Convolutional2D, and Convolutional3D?

I've been learning about Convolutional Neural Networks. When looking at Keras examples, I came across three different convolution methods. Namely, 1D, 2D & 3D. ...
Saurabh's user avatar
  • 337
18 votes
2 answers
33k views

In CNN, why do we increase the number of filters in deeper Convolution layers for complex images?

I have been doing this online course Introduction to TensorFlow for AI, ML and DL. Here in one part, they were showing a CNN model for classifying human and horses. In this model, the first ...
Sanjay Saha's user avatar
17 votes
2 answers
23k views

Updating the weights of the filters in a CNN

I am currently trying to understand the architecture of a CNN. I understand the convolution, the ReLU layer, pooling layer, and fully connected layer. However, I am still confused about the weights. ...
Felix's user avatar
  • 173
16 votes
6 answers
55k views

How to prepare the varied size input in CNN prediction

I want to make a CNN model in Keras which can be fed images of different sizes. According to other questions, I could understand how to set a model, like ...
kainamanama's user avatar
14 votes
3 answers
31k views

what is darknet and why is it needed for YOLO object detection?

what is darknet and why is it needed for YOLO object detection ? I read that its a neural network written in C , but why is it needed for YOLO object detection when we have lot of machine learning ...
star's user avatar
  • 1,431
13 votes
2 answers
12k views

CNN - How does backpropagation with weight-sharing work exactly?

Consider a Convolutional Neural Network (CNN) for image classification. In order to detect local features, weight-sharing is used among units in the same convolutional layer. In such a network, the ...
Andy R's user avatar
  • 403
13 votes
1 answer
8k views

What is difference between Fully Connected layer and Bilinear layer in CNN?

What is the difference between Fully Connected layers and Bilinear layers in deep learning?
N.IT's user avatar
  • 1,985
13 votes
2 answers
4k views

Finding outliers in Image dataset

I have been working on an image classification tasks for which I am extracting the image frames from the video stream collected for different classes. I have already trained an image classification ...
deepguy's user avatar
  • 1,441
12 votes
5 answers
7k views

Unsupervised image segmentation

I am trying to implement an algorithm where given an image with several objects on a plane table, desired is the output of segmentation masks for each object. Unlike in CNN's, the objective here is to ...
MuhsinFatih's user avatar
12 votes
3 answers
4k views

Relation between convolution in math and CNN

I've read explanation of convolution and understand it to some extent. Can somebody help me understand how this operation relates to convolution in Convolutional Neural Nets? Is filter like function <...
noname7619's user avatar
11 votes
2 answers
14k views

Batch normalization vs batch size

I have noticed that my performance of VGG 16 network gets better if I increase the batch size from $64$ to $256$. I have also observed that, using batch size $64$, ...
Arka Mallick's user avatar
11 votes
1 answer
712 views

Effect of NOT changing filter weights of CNN during backprop

What is the effect of NOT changing filter weights of a CNN during backpropagation? I changed only the fully connected layer weights while training on the MNIST dataset and still achieved almost 99 ...
Abhisek Dash's user avatar
11 votes
1 answer
1k views

What are "VGG54" and "VGG22" derived from the VGG19 CNN?

In the paper Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network by Christian Ledig et al., the distance between images (used in the loss function) is calculated from ...
Lafayette's user avatar
  • 604
10 votes
3 answers
5k views

How to use a dataset with only one category of data

I am performing a classification task, to try to detect an object. A picture of the environment is taken, candidates are generated of this possible object using vision algorithms, and once isolated, ...
Finn Williams's user avatar
10 votes
2 answers
3k views

Why should I understand AI architectures?

Why should I understand what is happening deep down in some AI architecture? For example LSTM-BERT- Partial Conv... Architectures like this. Why should I understand what is going on while I can find ...
CanP's user avatar
  • 117
10 votes
2 answers
19k views

Using Cross Validation technique for a CNN model

I am working on a CNN model. As always, I used batches with epochs to train my model. When it completed training and validation, finally I used a test set to measure the model performance and generate ...
Hunar's user avatar
  • 1,127
10 votes
2 answers
3k views

Validation showing huge fluctuations. What could be the cause?

I'm training a CNN for a 3-class image classification problem. My training loss decreased smoothly, which is the expected behaviour. However, my validation loss shows a lot of fluctuation. Is this ...
Josh's user avatar
  • 487
9 votes
4 answers
13k views

Why must a CNN have a fixed input size?

Right now I'm studying Convolutional Neural Networks. Why must a CNN have a fixed input size? I know that it is possible to overcome this problem (with fully convolutional neural networks etc...), and ...
Mattia Surricchio's user avatar
9 votes
4 answers
31k views

How to get predicted class labels in convolution neural network?

I have built a convolutional neural network which is needed to classify the test data into either 0 or 1. I am training the CNN with labels either 0 or 1 but while running the below code I am getting ...
LIsa's user avatar
  • 93
9 votes
2 answers
1k views

How prevalent is `C/C++` in machine learning development?

I am currently a data scientist mostly doing NLP, and I do most of my work inPython. Since I didn't get a CS degree in undergrad, I've been limited to very high ...
gust's user avatar
  • 237
9 votes
3 answers
4k views

How to detect cardboard boxes using Neural Network

I'm trying to train a Neural Network how to detect cardboard boxes along with multiple classes of persons (people). Although it's easy to detect persons and correctly classifies them, it's incredibly ...
Martin Brisiak's user avatar
9 votes
3 answers
9k views

Convolutional Neural Networks layer sizes

I am trying to understand an article Backpropagation In Convolutional Neural Networks But I can not wrap my head around that diagram: The first layer has 3 feature maps with dimensions 32x32. The ...
koryakinp's user avatar
  • 436
9 votes
3 answers
313 views

Why do RNNs usually have fewer hidden layers than CNNs?

CNNs can have hundreds of hidden layers and since they are often used with image data, having many layers captures more complexity. However, as far as I have seen, RNNs usually have few layers e.g. ...
KRL's user avatar
  • 221
9 votes
1 answer
1k views

How to arrange the dataset/images for CNN+LSTM

I am working on an image classification problem using Transfer Learning with Resnet50 as base model (in Keras) (For example Class A and Class B). There is a time factor involved in this ...
deepguy's user avatar
  • 1,441
9 votes
1 answer
3k views

What is the memory cost of a CNN?

I was recently thinking about the memory cost of (a) training a CNN and (b) inference with a CNN. Please note, that I am not talking about the storage (which is simply the number of parameters). How ...
Martin Thoma's user avatar
  • 18.8k
8 votes
4 answers
24k views

Determining size of FC layer after Conv layer in PyTorch

I am learning PyTorch and CNNs but am confused how the number of inputs to the first FC layer after a Conv2D layer is calculated. My network architecture is shown below, here is my reasoning using the ...
Into Jo's user avatar
  • 83
8 votes
2 answers
13k views

What is the input size of Alex net

In the paper ImageNet Classification with Deep Convolutional Neural Networks, the size of input image is 224x224. The following figure shows the input size. From caffe, deploy.prototxt file from the ...
Jogging Song's user avatar
8 votes
4 answers
3k views

Understanding how convolutional layers work

After working with a CNN using Keras and the Mnist dataset for the well-know hand written digit recognition problem, I came up with some questions about how the convolutional layer work. I can ...
Karampistis Dimitrios's user avatar
8 votes
1 answer
7k views

How to implement a Fourier Convolution layer in keras?

I'm currently investigating the paper FCNN: Fourier Convolutional Neural Networks. The main contribution of the paper is that CNN training is entirely shifted to the Fourier domain without loss of ...
deepsnow's user avatar
8 votes
3 answers
8k views

Multivariate Time series analysis: When is a CNN vs. LSTM appropriate?

I have multiple features in a time series and want to predict the values of the same features for the next time step. I have already trained an LSTM which is working okay, but takes a bit long to ...
drops's user avatar
  • 210
7 votes
4 answers
15k views

When are weights updated in CNN?

In CNNs when do we update the kernel parameters using back propagation? Suppose I have batch size of 50 and training data of 1000. Do I back propagate after each batch has been presented to network or ...
thisisbhavin's user avatar
7 votes
3 answers
3k views

Are CNNs insensitive to rotations and shifts in images?

Can CNNs predict well if they are trained on canonical-like images but tested on a version of images that are little bit shifted? I tried it using ...
Boris's user avatar
  • 463
7 votes
3 answers
6k views

Is there any proven disadvantage of transfer learning for CNNs?

Suppose I know that I want to use a ResNet-101 architecture for my specific problem. There are ReseNet-101 models trained on ImageNet. Is there any disadvantage of using those pre-trained models and ...
Martin Thoma's user avatar
  • 18.8k
7 votes
2 answers
2k views

Memory error when using more layers in CNN model

On my dell core i7 - 16GB RAM - 4gb 960m GPU laptop, I am working on a project to the classify lung CT images using 3d CNN. I'm using the CPU version of tensorflow. The images are prepared as numpy ...
Hunar's user avatar
  • 1,127
7 votes
1 answer
17k views

How to choose the number of output channels in a convolutional layer?

I'm following a pytorch tutorial where for a tensor of shape [8,3,32,32], where 8 is the batch size, 3 the number of channels and 32 x 32, the pixel size, they define the first convolutional layer as ...
Judy T Raj's user avatar
7 votes
2 answers
801 views

An error with respect to filter weights in CNN during the backpropagation

Let's say a convolutional layer takes an input $X$ with dimensions of 5x100x100 and applies 10 filters $F$ 5x5x5, thus produces an output $O$ 10 feature maps 96x96. During the backpropagation the ...
koryakinp's user avatar
  • 436
6 votes
2 answers
120 views

Procedure for Designing CNNs

Are there any standard procedure for designing a CNN? I wrote some Python code for classifying speech signals using the 1D convolutional model in the Keras environment, but I can't meet the accuracy ...
Farid J. Maleki's user avatar
6 votes
1 answer
11k views

Does increasing kernel size in a CNN result in higher accuracy on the training set?

In a convolutional neural network, does increasing the size of kernel always result in better training set accuracy? For example, if I use 5x5 kernels in a CNN instead of 3x3 ones, will it always ...
Saptarshi Roy's user avatar
6 votes
1 answer
9k views

Multi-class classification v.s. Binary classification

A training set has five classes including: "label-A", "label-B", "label-C", "label-D", "others" But the problem ...
PoCheng.Lin's user avatar
6 votes
2 answers
406 views

Why real-world output of my classifier has similar label ratio to training data?

I trained a neural network on balanced dataset, and it has good accuracy ~85%. But in real world positives appear in about 10% of the cases or less. When I test network on set with real world ...
Bien's user avatar
  • 63
6 votes
1 answer
5k views

How to detect blocks of texts in document images

I am planning to detect texts from document text images like below: GOAL: WORK DONE: I have tried to solve this with some scene text detection algorithms like EAST Text detector and PixelLink. But ...
DGS's user avatar
  • 291
6 votes
1 answer
2k views

The most used loss function in tensorflow for a binary classification?

I am working on a binary classification problem using CNN model, the model designed using tensorflow framework, in most GitHub projects that I saw, they use "softmax cross entropy with logits" v1 and ...
Hunar's user avatar
  • 1,127
6 votes
1 answer
14k views

keras model only predicts one class for all the test images

I am trying to build an image classification model with 2 classes with (1) or without (0). I can build the model and get an accuracy of 1. which is too good to be true (which is an issue) but when I ...
vis7's user avatar
  • 101

1
2 3 4 5
28