Questions tagged [conv-neural-network]
A convolutional neural network (CNN, or ConvNet) is a class of deep, feed-forward artificial neural networks that has successfully been applied to analyzing visual imagery. It falls under the [deep-learning] tag.
10,632
questions
-3
votes
0
answers
11
views
megre two deep model with keras
I am trying to buil an autism detection model, which incorporates race classification.
This is my code
def preprocess_image_and_get_skin_color(img_array):
# Perform skin color analysis using ...
0
votes
0
answers
11
views
MAE not reducing in CNN-BiLSTM
I want to do time series forecasting of length of day (LOD) using CNN-BiLSTM model. I need to predict 7 days in the future for each timestep. I have tried detrending the data using polynomial fit and ...
0
votes
1
answer
30
views
Why is cosine similarity always counted as 1?
While working on a school project, there was a problem that the cosine similarity was always measured as 1. I had no choice but to question that the cosine similarity was always measured as 1 because ...
0
votes
1
answer
16
views
Separating Train, Validation and Test set using ImageDataGenerator from keras for a CNN
So I have already separated a priori the train, validation and test set (this is how the data came).
And I have folders for each one of them like this:
Test
Class1
Class0
Val
Class1
Class0
...
0
votes
0
answers
7
views
ERROR in VGGnet CNN / Import ERROR: import tflearn.datasets.oxflower17 as oxflower17
getting this error in the Code:
import tflearn.datasets.oxflower17 as oxflower17
from keras.utils import to_categorical
x, y = oxflower17.load_data()`your text`
x_train = x.astype('float32') / 255.0
...
0
votes
1
answer
38
views
Why can't weight be updated when using detach()?
I'm programming VGG model for a school project but this model cuases problems during training.
If I use detach() to two tensors that is scaled_similarity and target_tensor, the weights of the model ...
0
votes
1
answer
15
views
Why is SegNet model accuracy coming to be 13% and loss = 0?
The SegNet model is defined as this
The epochs run
The SegNet model after running for 10 epochs is giving very low accuracy of 13% and NAN Loss. How can the model be updated to improve it? The images ...
-2
votes
0
answers
14
views
Computer vision project [closed]
I'm working on text recognition project using CNN. Facing issue regarding the corrected versions of tensorflow keras opencv numpy while using python 3.9 and pycharm used as IDE. Anyone helps??
used ...
0
votes
0
answers
18
views
convert a group of images in 'n' folders to dataset (eg: Mnist), to work with CNN
I am trying to convert images generated in to a dataset.
(All I have is just png images in n folders and there is no label or meta data)
This is what I aspire to do:
I am using torch audio to convert ...
0
votes
0
answers
18
views
ERROR Connecting to TPU in Google Colab during Training
I've been encountering an issue while attempting to connect to a TPU on Google Colab during model training for a categorical image classification task. I followed the instructions in this resource (...
0
votes
0
answers
13
views
Keras flow_from_directory function returns 'No such file or directory'
I am making my first neural network,
It turns out that I have the following directories on my desktop:
And within each class I have a large number of images with a JPG extension.
The problem is that ...
-1
votes
1
answer
15
views
Can VGG and ResNet inputs be raw values instead of images? [closed]
Can I use raw mel, mfcc, spectral centroid, spectral flux, and zero crossing rate values as input to VGG or ResNet for audio classification task?
Most of the studies I read involved getting the ...
0
votes
0
answers
13
views
Is it possible to feed CNN with raw numbers instead of images?
I am trying to build a musical instrument recognition system using CNN. The features I want to extract are the Mel spectrogram, MFCC, spectral centroid, spectral flux, and zero crossing rate. I want ...
-1
votes
0
answers
17
views
How can I get the specific order of my segmented images?
I'm working on a project where I aim to predict resistor values. To make the prediction I need to know the colour bands of the resistors. The bands are detected using image segmentation. Which I'm ...
-2
votes
1
answer
37
views
How to use CNN when one of your channels is input data and other is output? [closed]
Let's say I have some training data. Input consists of two arrays, one is defining irrigated polygons. Another one is structured the same but called "obstacles", which describe polygons that ...
0
votes
0
answers
21
views
Question of Numpy Array Fitting in Array Multiplication in Deep Learning
I am working on a CNN project but encounter this question in back propagation.
This is completely based on numpy so I could not use packages like pytorch.
The input is a 28x28 image and the first ...
-1
votes
0
answers
22
views
Error in loading CNN model using FastAPI- Getting error after making Post request and selecting image file in body
Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\uvicorn\protocols\...
0
votes
1
answer
47
views
Problem building CNN only using python numpy when gradient descent and batching
I am currently learning the book Grokking Deep Learning by Andrew W. Trask. But I have problems understanding the code in Chapter 10 of the book, on building a CNN only using python and numpy:
import ...
0
votes
0
answers
21
views
How to compute GradCAM for keras regression model with multiple outputs
I have build a DenseNet121 that has 5 regression output layers.
The code to build the model looks like this:
base_model = DenseNet121(include_top=False, input_shape=(224, 224, 3), weights="...
-4
votes
0
answers
23
views
How do we make our chatbot conversational using gpt-2 and forward neural networks or deep learning with a custom knowledge base [closed]
here is the example of the json training data
{
"intents": [
{
"tag": "greetings",
"patterns": [
"Hi&...
-3
votes
0
answers
23
views
Trying to run a model to recognise images, convulutional network, from github, but not working [closed]
I want to preface this by saying I have no clue what I'm doing. I understand convultional models conceptually, but the actual code is 65% lost on me.
Now, I am trying to run this model - https://...
0
votes
0
answers
25
views
How to plot Learning Rate and Epoch when training a CNN?
I am trying to use a cosine-based decay schedule to improve the accuracy of my CNN. I want to visually see the changes that are made to the model's learning rate by this schedule throughout the ...
-1
votes
0
answers
19
views
A tensorflow pipeline, that inputs shape=(256, 256, 3), dtype=tf.float32, image to extract face using MTCNN(). I just cant get this done
a tensorflow 2.15 pipeline that takes two 256X256X3, uint8 image...'input_image', "real_image", from a previous tf.data.Dataset kind pipeline, extracts the face using MTCNN.detect_faces(), ...
-2
votes
0
answers
15
views
Classification or Anomaly detection for medical imaging dataset? [closed]
I am working on a medical dataset of echo images. It is a small(~500 data points) and imbalanced dataset with 4 times more control than cases. The case and control images are not well distinguishable ...
0
votes
0
answers
31
views
How do i get the feature map of keras CNN model?
I want to know if there is a way to retrieve/save the feature map results on the CNN model. I also want to add the threshold = 0.03, how can I do it? Here is my code
face_train_generator = ...
0
votes
0
answers
14
views
Tensorflow library: flow_from_dataframe
I have done image augmentation and created the train set and validation set using the flow_from_dataframe function of tensorflow as shown below:
print("Creating a training set:")
train_set=...
0
votes
0
answers
53
views
Why does my 1D Bayesian CNN, made by replacing the convolution and dense layers with Convolution1DFlipout and DenseFlipout of a working CNN not train?
I have a CNN model that classifies waveforms (of the shape (601,3), where 601 is the number of timesteps while 3 is the number of channels) into noise or signal. It is as follows:
# imports
import ...
0
votes
0
answers
11
views
Tensorflow is slow on windows with anaconda and GTX1660super
I have a neural network code that works with 13749 training images and 3429 validation images. The network model is quite simple and takes more than 1 hour for each epoch, while it should take about ...
0
votes
0
answers
10
views
how can we manage the out put shape from datagen in data augmentation?
I'm engaging the CNN network. because of high volume of data, I'm using data generator. i engaged data augmentation in data generator function. i determine the batch size as 10, when i wanna run the ...
-2
votes
0
answers
14
views
Difference between Original Vision Transformer script and Keras code example Vistion Transformer script
I am a graduate student, and currently, I am attempting to test our team's dataset, which we analyzed with CNN pre-trained models using the Original Vision Transformer script.
Starting with the ...
-1
votes
0
answers
43
views
Can a CNN predict two coordinates (x0,y0) and (x1,y1) with regression? [closed]
Is it recommended to use a Convolution Neural Network (CNN) to predict the coordinates of two peaks in an image?
I have 600 (20x20)-images with two Gaussian-like peaks and I'd like to train CNN model ...
0
votes
0
answers
10
views
No such file or directory: '/kaggle/input/flickr8k/Images' i am getting this error while making a image caption generator
# extract features from image
features = {}
directory = os.path.join(BASE_DIR, 'Images')
for img_name in tqdm(os.listdir(directory)):
# load the image from file
img_path = directory + '/' + ...
0
votes
0
answers
24
views
I want to input data but this error pops up "Input 0 of layer "sequential'.........(None, 7, 7)"
I encountered a problem when input my data for LSTM neural network. I have train the model for 7 number of features, normalize data, and more. But when I want to predict my data, the errors pops up.
...
-4
votes
0
answers
31
views
Image Classifier [closed]
I have made an image classifier using the tensor flow library in python. Can someone help me increase the accuracy and decrease the validation loss of this. I have used 849 images in total for ...
0
votes
1
answer
36
views
RuntimeError: Given groups=1, weight of size [32, 3, 5, 5], expected input[1, 32, 3, 784] to have 3 channels, but got 32 channels instead
RuntimeError: Given groups=1, weight of size [32, 3, 5, 5], expected input[1, 32, 3, 784] to have 3 channels, but got 32 channels instead
this is my code:
class Conv(nn.Module):
def __init__(self):
...
0
votes
0
answers
38
views
NotFoundError during fitting my CNN model
I was training the CNN model and got this error.
NotFoundError Traceback (most recent call last)
c:\Users\Rohit\Desktop\New folder(2)\2_1_train_age_model.ipynb Cell 31 line ...
0
votes
1
answer
16
views
How to send input data to my multi-channel deep learning model?
I have some inputs and want to implement a multi-channel output deep model. So the input will be a list of 5 arrays in shape (1300, 320, 320) in which 1300 is total number of images in that array and ...
-2
votes
0
answers
25
views
Mis-classification of CNN on single image randomly outside of model predictions, while training, val and test accuracy is 1 [closed]
Built a simple CNN with 4 classes angry, excited, happy and sad. Total dataset 325 almost equally balanced btw all 4 classes.
My training and validation loss decreased throughout 20 epochs and ...
0
votes
0
answers
12
views
Export image with nodatavalue
I'm working with remote sensing, using a satellite image where it has 2 bands: 0 = NBR and 1 = NDVI, both of them has a range from 0 to 1. I download the images from google earth engine, where the ...
0
votes
1
answer
23
views
PyTorch CNN Returns Only One Result After Training
I'm training a CNN image classifier. The network classifies 255 x 255 RGB images into five categories numbered 0 to 4.
But the network is behaving strangely during training. Although the loss function ...
0
votes
1
answer
39
views
PyTorch Convolutional Neural Network (CNN) Training Batch Size Mismatch Error
I have a dataset folder with 4 subfolder named contexts(forest,glacies,mountain,sea) each folder has approximately 25000 jpg image aboutcontext, I'm training a Convolutional Neural Network (CNN) in ...
0
votes
0
answers
19
views
Get 'scores', 'labels' 'logits' and 'boxes' from model detr huggingface
We can apply this script to get objects predection of an image:
from transformers import AutoImageProcessor, DetrForObjectDetection
import torch
from PIL import Image
import requests
url = "http:...
-1
votes
0
answers
14
views
is fiass better than cosine similarity in finding similar images ? should we normalise the embeddings? [closed]
I am working on a product recognition ai project. the task is as follows: we have to find the objects in the image that the company sells then we have to generate 6 similar products to it in order to ...
0
votes
1
answer
24
views
python pytorch Why Sequential NN and the same nn.Module NN have diference results
class Net(torch.nn.Module):
def __init__(self):
super(Net, self).__init__()
self.bn1 = torch.nn.BatchNorm2d(num_features=3)
self.conv1 = torch.nn.Conv2d(in_channels=3, ...
0
votes
0
answers
15
views
VGG16 and VGG19 not doing any learning during training, although AlexNet performs well?
I'm replicating the results of a research paper for a ML Project. The paper is about Palm Vein recognition using CNNs. It trains 3 CNNs on different palm vein datasets, one of which is the FYODB ...
-1
votes
0
answers
19
views
Vanishing gradient observed in the SE block in the lower layer of the efficeintnetv2 model
I am working on implementing a binary classification model for breast cancer histopathology data using an EfficientNet V2-S model. However, I observed that after 5-10 epochs the gradients in the SE ...
0
votes
1
answer
34
views
How to determine overfitting and underfitting based on loss graph?
I'm currently doing my Final Year Project, the classification of Alzheimer's disease stage using a custom CNN model. However, I'm unsure whether my model is overfitting or underfitting according to my ...
-1
votes
1
answer
45
views
YOLOv8 - Predictions on a Test Image of Different Size
I trained a custom YOLOv8 object detection model using images of size 512,512 but when I test the model on a larger image, let us say of size 2145,1195 it fails miserably. Can anyone help me what ...
0
votes
0
answers
14
views
in pytorch how to feed the ouput from the convolution neaural networks into deep q network
import torch
import torch.nn as nn
class Convnet(nn.Module):
def init(self):
super(Convnet, self).init()
# CNN architecture here
# 3@12x15 -> 4@12x16 -> 4@6x8
self.conv1 = nn.Conv2d(in_channels=...
0
votes
0
answers
5
views
How to handle convLSTM for multiple points?
I have created ConvLSTM model but the data pre-processing is challenging.
My train_df is (384,5979), where 384 rows represent; features as timeseries (first 192 rows), and targets as timeseries (last ...