All Questions
94 questions
0
votes
0
answers
38
views
How i improve the accuracy of image-based bacteria classifier
i'm new with ML. I am tring to develop a model that classifier bacteria by their staining properties. And i got 0.52 accuracy with my model.
İ have 223 images and 2 classes Gram Negative and Gram ...
1
vote
0
answers
68
views
Is there a way to preprocess a single image using the same method as in tf.keras.utils.image_dataset_from_directory?
I have trained a keras model and used tf.keras.utils.image_dataset_from_directory to preprocess the images.
Now when I'm trying to test the model on a single image it's always predicting the same ...
1
vote
1
answer
169
views
Error calling ImageDataGenerator.flow in Keras
I am working on image augmentation with images having numeric target value for regression problem, and got the error "ValueError: Unsupported channel number: 150". The code and full stack ...
0
votes
0
answers
48
views
(Tensorflow) Parameter prediction from image
First I will give some context of my situation:
I have a laser that after propagation is observed by a camera. Now the initial parameters of the laser will determine the pattern observed in the image ...
-1
votes
1
answer
188
views
The prediction for an image classification algorithm is not printing
I have trained a model for image classification in Jupyter Notebook, and have gotten to the point of testing an image to see if it is "Pasta = 0" or "Pizza = 1". The model is ...
0
votes
1
answer
645
views
Image Classification: train_datagen.flow_from_directory not picking up any images
I split the images into train val and test folders for a keras image classification CNN. However, train_datagen.flow_from_directory not picking up any images. It says: Found 0 images belonging to 21 ...
0
votes
1
answer
823
views
Why does image_dataset_from_directory return a different array than loading images normally?
I noticed that the output from TensorFlow's image_dataset_from_directory is different than directly loading images (either by PIL, Keras' load_img, etc.). I set up an experiment: I have a single RGB ...
1
vote
2
answers
619
views
Reshape the input for BatchDataset trained model
I trained my tensorflow model on images after convert it to BatchDataset
IMG_size = 224
INPUT_SHAPE = [None, IMG_size, IMG_size, 3] # 4D input
model.fit(x=train_data,
epochs=EPOCHES,...
1
vote
0
answers
143
views
Applying a flip function to image data generator causes memory error
I've been looking at this tutorial for implementing time test augmentation to my model. Since I'm using image generators I tried doing something like this:
tta_datagen = ImageDataGenerator()
...
2
votes
0
answers
270
views
keras ImageDataGenerator multi label input and output
I am new to ML and image classification. I am working on a multi-label image classification problem. My model has 3 inputs and 3 outputs. I am using Keras functional API and cifar100 data set to test ...
0
votes
1
answer
85
views
How to make sure the prediction time image input is in the same range as the training time image input?
This question is about ensuring the prediction time input images to be in the same range as the images fed during the training time. I know that it's the usual practice to repeat the same steps that ...
0
votes
0
answers
163
views
ValueError: `validation_split` is only supported for Tensors or NumPy arrays, found following types in the input[<class 'builtin_function_or_method'>]
I am working on Face Mask Detection using Tensorflow and Keras.
The part of the Code that causes the error is:
new_model.fit(X, Y, epochs = 5, validation_split = 0.1)
The line of code before this is:
...
1
vote
0
answers
73
views
Issue Importing Trained Keras Model (UNet) from Python to MATLAB
I am trying to import a model from Keras to MATLAB. I am unable to create the variable containing the model.
modelfile = '4k_mag_run1.h5';
net =importKerasNetwork(modelfile, 'WeightFile', modelfile,'...
1
vote
1
answer
2k
views
What does Keras flow_from_directory return?
image_gen = ImageDataGenerator(rescale=1.0/255, horizontal_flip=True)
train_data_gen = image_gen.flow_from_directory(batch_size=BATCH_SIZE, directory=train_dir, target_size=(IMG_SHAPE,IMG_SHAPE), ...
1
vote
1
answer
5k
views
How to split image into patches/sub-images in keras/tensorflow?
I am trying to recreate the logic from this paper. The logic can be summarised in the following diagram:
Highlighting my problem:
I have an 256x256 input image. It is passed through densenet (...