Questions tagged [convolutional-neural-network]

A convolutional neural network is a form of neural network with an additional convolutional layer, typically used in image & audio analysis. The convolutional layer is essentially a filtering stage defined by the kernel which is used. For example, a convolutional layer could have a kernel which extracts edges from an image towards the goal of learning which objects are in a scene.

Filter by
Sorted by
Tagged with
0
votes
1answer
25 views

Adding Validation PyTorch

First of all, I'm new in this field and it's my first this kind of work. I'm trying to train EfficientNet (CNN), the code below is working fine, but I can't succeed to add also validation set to the ...
3
votes
2answers
2k views

Different number of images in classes

I am working on a deep learning CNN project. The dataset contains more than 500 classes and the classes have different numbers of items (images). For example, some of the classes have 5 images and ...
1
vote
0answers
31 views

ROC and AUC curve for CNN multi-class classification problem

I have produced a convolutional neural network to classify images (malware images) into different classes/families. I have managed to produce a confusion matrix and classification report. My ...
0
votes
0answers
20 views

How to interpret stagnant validation curve

I'm new to deep learning, so I'm just learning how to interpret my models. I'm creating a mixed-convolutional neural net to classify melanoma images. Here's the model structure: ...
0
votes
0answers
10 views

Train only Region Proposal Network in faster RCNN architecture

I am looking for a way to used my pretrained EfficientNetv2 model and turn it into an object detection. Is there anyway, I can put my pretrained model as a backbone and only train the region proposal ...
0
votes
1answer
31 views

Forecasting with Neural network and understanding which underlying model is favoured

If I have a very large set of data (~ 1TB). How can I use Neural Network on this data to understand which underlying distribution (eg. let's say a Gaussian or a Poissonian with a certain mean, sd) is ...
2
votes
1answer
234 views

TypeError: Expected int32, got None of type 'NoneType' instead

I want my model batch size to be a dynamic shape, and I've assigned none as batch size, but that's causing an error. Here, in the first line, I specified batch size as None: ...
0
votes
1answer
22 views

Can the performance of a CNN be dependent on the train-test-val split random seed?

I am doing multi-class classification and comparing the effects of 2 image enhancement techniques (IET). IET 1 performs better than IET 2 at random seed x (for train-test-val split) IET 2 performs ...
0
votes
1answer
32 views

Does not using more filters in deeper CNN creates more images?

For example, we have applied 32 filters to a single image. Then it created 32 different images (stack of convolutional values). And in the second layer, if we apply 64 filters, are all these filters ...
2
votes
1answer
40 views

why transpose convolution is called “transpose”

https://d2l.ai/chapter_computer-vision/transposed-conv.html https://en.wikipedia.org/wiki/Transpose I understand what transpose convolution does, but I am confused about the name of 'transpose'. In ...
3
votes
2answers
693 views

How to deal with skewed imbalanced image dataset to work with CNN?

I am working on multi-class classification problem on an image dataset. There is one class with 80% of the images and rest 20% is divided into rest 6 remaining classes. If I have to apply the image-...
0
votes
0answers
63 views

Pytorch: how to pass the hidden state between the samples in LSTM?

I am trying to boost the performance of a object detection task with sequential information, using ConvLSTM. A typical ConvLSTM model takes a 5D tensor with shape ...
0
votes
0answers
13 views

Representing multi-channel input signals with a single signal

I am working on an EEG signal classification problem. My dataset consists of EEG signals stored as 19X30000 NumPy arrays. Each row represents a single channel. For now, I am converting each of the ...
0
votes
1answer
24 views

Why are mini-batches degrading my conv net MNIST classifier?

I have made a convolutional neural network from scratch in python to classify the MNIST handwritten digits (centralized). It is composed of a single convolutional network with 8 3x3 kernels, a 2x2 ...
0
votes
1answer
46 views

How to calculate convolution for 2nd conv Layer in CNN, Do we need to average across all feature maps?

I understand that for the first layer (assuming we have a grayscale image) we calculate the convolution of 3*3 receptive field as a weighted sum of receptive weights with pixels $ x1 · w1 + x2 · w2 + ...
0
votes
1answer
34 views

Siamese vs matching network for correct image category matching

I have to find the closest match between my image and bunch of already collected images of different classes in the folder. Whic meta-learning approach should I select. I am thinking about the Siamese ...
0
votes
0answers
14 views

Adding layer to a trained CNN to process higher resolution images. Tried 2 schemes, 1 works fine, 1 fails completely

I'm working with images coming from a sensor, for which 1 pixel corresponds to 2 mm in the real world. I've built and trained a CNN that does semantic segmentation of the image (128x128 pixels) and it ...
3
votes
0answers
33 views

Using softmax for multilabel classification (as per Facebook paper)

I came across this paper by some Facebook researchers where they found that using a softmax and CE loss function during training led to improved results over sigmoid + BCE. They do this by changing ...
0
votes
0answers
22 views

Best 5-layer pretrained CNN model

I am doing a visualization project on convolutional neural nets to aid learning and need a simple to display but complex enough pretrained CNN model so I can visualize feature maps for each layer. I ...
2
votes
1answer
133 views

Improve Convolutional Autoencoder

I just built a Convolutional Autoencoder to try to reconstruct a time series with shape (4000, 10, 30). This is the code, I used a batch size of 32, but I think it ...
0
votes
0answers
25 views

Getting constant accuracies for training and validation sets despite their losses are changing during CNN training?

As the title clearly describes the issue I've been experiencing during the training of my CNN model, the accuracies of training and validation sets are constant despite the losses of them are changing....
0
votes
1answer
38 views

Training loss = 0, training accuracy =1, validation and test around 85%

I have created different CNNs for doing image classification. The dataset is this: https://www.kaggle.com/crowww/a-large-scale-fish-dataset There are 9 classes, and each class contains 1000 images of ...
0
votes
1answer
39 views

Max Pooling in first Layer of CNN

I am seeing, in all the notebooks that I found, that Max Pooling is never used in the first layer of a CNN. Why this? Is it a convention among data scientist to do not use max pooling in the first ...
0
votes
0answers
15 views

How to deal with a small dataset for image classification using CNN?

I have a dataset consisting of characters(lowercase and uppercase) and numbers, totalling about 62 classes. The data I have are about 45 images per class and no test data. The data is a subset of the ...
1
vote
1answer
21 views

3 images as one input in CNN (U-Net) [closed]

I have been advised by my supervisor that if my U-Net segmentation network has RGB images at the input then I could use the channels for different images - median filter for R, normalization for G, ...
0
votes
1answer
75 views

How to use data generator for regression keras?

I am using the Keras data generator to load data from a directory. I am basically dealing with a regression i.e there is a numerical value for each of my images in the range ...
1
vote
0answers
24 views

Compare distance between embeddings in different dimensions

I am working on a problem with CNNs. After the convolutional layers, comes a "flatten". One could interpret that as a representation of the input image in some high-dimensional continuous ...
0
votes
0answers
32 views

Parallel programming in Python

I have the next code that I am trying to run in parallel: ...
30
votes
2answers
31k views

Are there any rules for choosing the size of a mini-batch?

When training neural networks, one hyperparameter is the size of a minibatch. Common choices are 32, 64, and 128 elements per mini batch. Are there any rules/guidelines on how big a mini-batch should ...
0
votes
0answers
19 views

Using Wasserstein loss function for image-to-image-regression

The context I have a 3D array (representing a grayscale 3D image) and want to turn this into another 3D array of the same size. In this output array the value of each pixel is a number that measures ...
0
votes
0answers
194 views

Understanding scipy.signal.convolve2d full convolution and backpropagation between convolutional layers

I'm learning about convolutional neural networks. The convolution operation in order to extract features that is described in literature and posts used for this is quite intuitive and easy to ...
1
vote
0answers
15 views

Convnet with peculiar loss function not learning!

Im using this loss function: ...
0
votes
0answers
26 views

Which applications can not be handled by very Deep CNN models?

I wanted to know what challenges very deep models can face even if the accuracy is good. Would they be not suitable for any application given that my model is very very deep? I wanted to know if ...
0
votes
0answers
6 views

Multi-object detection within single image

Given an image with multiple objects within it, I would like to train a CNN to output vector of labels corresponding to the presence/absence of objects within the image. I would like to know whether ...
1
vote
0answers
87 views

Calculate the Convolutional Autoencoder sizes - Conv1D

I'm approaching the Conv1D for the first time and I do not understand how to calculate the parameters in each layer. I have an input of (3000, 10, 30), but I ...
1
vote
0answers
29 views

Create sequence for a Conv1D layer

Im studying the following tutorial on the Keras website and I'm trying to understand how to create a sequence for a Conv1D layer. This is their method: ...
-1
votes
1answer
102 views

Issues in plotting Images using Keras

I am trying to visualize Skin Cancer Images using Keras. I have imported the images in my notebook and have created batch datasets using Keras.image_dataset_from_directory. The code is as follows: <...
2
votes
0answers
17 views

How to modify a Convolutional Neural Network architecture built for a univariate time series to multivariate time series?

I have built a CNN (in combination with a LSTM cell) that takes 1D time series-like data as an input and performs classification. I am obtaining a good performance, but the complete data has actually ...
3
votes
1answer
56 views

Is there an appropriate use of adjusting class weights for a balanced dataset?

I ask this because I am currently working with a CNN model built for diagnosis of pneumonia. Originally, I followed a notebook on kaggle to build the model and thereby learn what each bit of code is ...
2
votes
0answers
29 views

Methods to visualize the filters in the later layers of a CNN?

I've extracted the weights from the filters of a pretrained model (AlexNet). I wish to represent these weights visually, this works fine for the first layer as there is only 3 input channels so I can ...
0
votes
0answers
27 views

Validation Accuracy not going beyond 60% for image classification with 5 species of snake

My dataset has about 17000 images belonging to 5 classes. I am using 16000+ images for training(about 3k/class) & 500 for validation(100/class). Training accuracy is very good but validation ...
0
votes
1answer
146 views

What will be the input_shape of tf.keras.layers.Conv3D be for these inputs

I have many videos, and each video is made up of 37 images (there are 37 frames in the whole video). And the dimension of each image is (100, 100, 3).... So the ...
0
votes
0answers
9 views

Use CNN for document digitalization

I'm using Faster RCNN to digitalize a document. It is able to recognize zones of the document (name, name of enterprise, name of director, etc) but cannot classify them accurately. So, my problem is ...
2
votes
1answer
15 views

Architectures that take inputs of mixed sampling rates

Let's say a model is trained on multiple datasets of 1D time series. These datasets have been gathered with different sampling rates. I plan to use a convolution neural network to process these time ...
0
votes
1answer
20 views

Unstable results in test mode with fractional max pooling in PyTorch

I make some variants of ResNet, originally found in TorchVision, modify them, train them and so on. What I have found is that even in .eval() mode, even if I load state right before evaluation, I ...
2
votes
2answers
615 views

MLP conv layers

When should MLP conv layers be used instead of normal conv layers? Is there a consensus? Or is it the norm to try both and see which one performs better? I would love to better understand the ...
2
votes
2answers
830 views

Model not learning when using transfer learning

I am working on a personal project on image classification (two classes) and am trying to see how the MobileNet v2 structure would perform. While training the training accuracy is already quite high ...
1
vote
0answers
18 views

Should a filter learned within a residual block be different form its vanilla CNN counterpart?

I have a very basic CNN using Conv2d with multiple layers and activations, each layer $\ell$ has parameters $w_\ell$ inducing a mapping $f_\ell(x,w_\ell)$. Now I decide to introduce skip connections ...
3
votes
0answers
11 views

Running DenseNet from cmd line and jupyter but vastly Different loss and accuracy [closed]

I’m running a DenseNet121 from Pytorch with the same exact code, same exact hyper parameters and same exact image sizes, once from a jupyter notebook and once using the command line via a python ...
0
votes
0answers
13 views

Multidimensional Output from Radar Imagery and Climate Data

I am trying to predict what my rainfall field will look like at a future timestep using: Radar imagery of rainfall fields at previous timesteps: A set of 2D matrices where each element in each matrix ...

1 2
3
4 5
12