Questions tagged [image-classification]
579 questions
-1
votes
2 answers
Why does the neural network make a mistake and think that all images belong to the same class?
I am creating a neural network that classifies photos into two classes. One class is photos with an empty surface, the other class is photos with this surface, but with an object. I want to make the neural network understand whether there is an…

Artem Meller
- 1
- 2
-1
votes
1 answer
I tried by converting it into int also then also same error
Face/mask detection model is work good but I want to count fps to compare to different models for better performance metrics. This is my OpenCV code:
def detect_and_predict_mask(frame, faceNet, maskNet):
(h, w) = frame.shape[:2]
input_blob =…
-1
votes
1 answer
MSINT - Image classification - value error incompatible shape
I am beginning with image classification using keras. Tried a simple minst dataset for detecting numbers in images. Ran the model. However I wanted to test the model on my own dataset and facing some problem.
import tensorflow as tf
import…

Fazal
- 87
- 9
-1
votes
1 answer
tensorflow CNN does not use all the images for training
i have defined a tensorflow CNN as follows:
import tensorflow as tf
from tensorflow.keras import datasets, layers, models
import matplotlib.pyplot as plt
model = models.Sequential()
model.add(layers.Conv2D(1, (9, 9), activation='relu',…

john
- 373
- 1
- 16
-1
votes
1 answer
Keras model.fit_generator Where does this method get the labels
I found some code to create a Machine Learning Model with Keras, but i don't really know how i can put my own images in there. The model is created like that:
model = Model(inputs=base_model.input,…

lxg95
- 553
- 2
- 8
- 28
-1
votes
2 answers
return predicted results in jsonify
I am a student and currently working on my project of image classifications in python(FLASK).
i have implemented all the functions and models, and it is working fine as web app. now I want to make an api which results in JSONIFY so I can easily use…

Mohsin noor
- 1
- 2
-1
votes
1 answer
How to Create Dataset for Tensorflow with Images and Labels
I’d like to create a dataset from images in a special folder. Next I’d like to classify them using tensorflow according to the scheme from the dataset.
Is there any quick and efficient way to create a dataset from images and labels?

TakeBackPrivacy
- 23
- 3
-1
votes
1 answer
How to have a default output for an Image Classifier?
I coded a simple image classifier using CNN to classify input images to labels: Dog or Cat.
When images other than Cats/Dogs are shown the CNN classifies it into any one of the label(Dog or Cat), which is incorrect.
I wanted my CNN to classify/label…

Sartaj Bhuvaji
- 3
- 1
-1
votes
1 answer
Trouble loading data for creating models using tensorflow
I'm fairly new to machine learning and I've to create a image classification model using tensorFlow, but I'm having hard time loading the images datasets. I get the error 'str' object has no attribute 'load_data', and I'm not sure what it means.…

Isha
- 138
- 1
- 10
-1
votes
1 answer
Validation accuracy not changing while loss is decreasing in keras image classification?
Image classification Problem
I have two classes of images.
Fake
Real
Dataset splitting detail is below.
Total Training FAKE Images 3457
Total Training REAL Images 675
Total validation FAKE Images 642
Total validation REAL Images 336
I have…

Muhammad Rizwan Munawar
- 672
- 4
- 14
-1
votes
1 answer
What happens if my Dropout is too high? what Dropout to use on my 2048-neuron-dense layer? (very little data)
I am pretty new to this and I am writing my bachelor thesis in keras. I have this big CNN, built similar to vgg but a bit different, because I have bigger resolution images and I pool a little more. I added a 2048 dense layer on top. What Dropout do…

Shaved Man
- 57
- 1
- 10
-1
votes
1 answer
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all(). Need help in solving the error
My deep learning topic is classifying images into 5 different categories. I used the ImageDataGenerator library to split my dataset into train and test. The negates the need for creating csv file which requires a lot of manual work. I've…

Alvi Ahmed Abir
- 3
- 3
-1
votes
3 answers
Better model for classifying image quality (seperate sharp & well lit images from blurry/out of focus/grainy images)
I have a dataset of around 20K images that are human labelled. Labels are as follows:
Label = 1 if the image is sharp and well lit, and
Label = 0 for those blurry/out of focus/grainy images.
The images are of documents such as Identity cards.
I want…

Anuj Gupta
- 6,328
- 7
- 36
- 55
-2
votes
1 answer
ValueError: not enough values to unpack (expected 4, got 2) Python Google Colab
i'm newbie for using python in google colab, i have to finish my project classes now (classification image using KNN algorithm). please help me to fix this code. Thank you
# Importing the dataset
dataset = ('/content/dataset/Validation/')
X =…
-2
votes
1 answer
When should we use vision transformers for image classification?
I am working on classification problem for Covid19, Pneumonia and healthy lung.
I have 3000 images for each class.
Can I apply vision transformers for this image classification instead of normal CNN?
Or is there any prerequisite for applying this?…

vamsi bharadwaj
- 27
- 5