Questions tagged [image-classification]

579 questions
1
vote
0 answers

INVALID_ARGUMENT: jpeg::Uncompress failed. Invalid JPEG data or crop window. Error using Tensorflow for Image Classification

Im trying to classify mushrooms using this dataset. Im using tf.keras.utils.image_dataset_from_directory to import my dataset How I handle the dataset DATADIR = "/content/drive/MyDrive/Mushrooms/dataset" data_dir =…
1
vote
0 answers

Problem in implementing multiple graphics processors with TensorFlow

I am trying to run a model for image classification on multi-GPU smell, my dataset is quite large and I have to use image_dataset_from_directory strategy = tf.distribute.MirroredStrategy() print('Number of devices:…
hadi0002
  • 11
  • 1
1
vote
0 answers

I`m trying to generate predictions for test videos but I have this error (IndexError: arrays used as indices must be of integer (or boolean) type)

This is my code to generate predictions for test videos in the model and this is how it works First, we will create two empty lists – one to store the predictions and the other to store the actual tags Then, we will take each video from the test…
1
vote
0 answers

Python - image reshaping error after training a ResNet model and wanting to evaluate prediction

I created a code that classifies brain MRI images into 4 classes of cancer varieties. I trained the model successfully and when I tried to create a conversion algo to convert testing images to evaluate them, I ran into a reshaping error as the…
1
vote
0 answers

Can I give contour/curve as a label/mask for image in machine learning? How can I train model with image as a "label"? (pytorch)

I would like to train a model that would be able to return an svg path for a given image, as in the image below: Raw image: Mask/label: Is it possible to train such a model, and if so, how should I go about it? I've read about Image Segmentation,…
1
vote
2 answers

Validation loss and accuracy has a lot of 'jumps'

Hello everyone so I made this cnn model. My data: Train folder->30 classes->800 images each->24000 all together Validation folder->30 classes->100 images each->3000 all together Test folder->30 classes -> 100 images each -> 3000 all together -I've…
1
vote
1 answer

Get the Keras Sequential Model out of a local minimum

I am using Keras to tell the difference between background and signal. A Background Example A Second Background Example A Signal Example The model used here is model = tf.keras.Sequential([ …
1
vote
0 answers

Error in checkpoint.py in Tensorflow2 on custom dataset using pre-built FRCNN model

I am using TF2 for teeth classification using panoramic X-ray images. The images have been reduced to 640x640 and the annotations scaled accordingly. The original image looks like this: The test run went successful, confirming that the installation…
seekme_94
  • 162
  • 1
  • 4
  • 17
1
vote
1 answer

TypeError: tf__test_function() missing 1 required positional argument: 'steps_per_execution'? Where should I be looking for answers?

I don't know whats going really going on here, I want it to print (answer) but stopped prematurely. https://colab.research.google.com/drive/1hvHkDusyqEsdZg5ZRVhhriZrDagpFdU6?usp=sharing import os import warnings from zipfile import ZipFile import…
1
vote
0 answers

How to feed Images of different size being into the CNN

The problem being solved is a binary classification using CNN. Here I have images of different size. I am scaled down the images to 20% and normalizing them to the range (0,1) and obviously they still have different sizes. I am using x_train =…
1
vote
1 answer

Shape mismatch error when using TensorFlow

The Code is as follows:- from tensorflow.keras.applications.mobilenet import preprocess_input **Import of Datasets** from tensorflow.keras.datasets import cifar10 Normalize Images by dividing pixles by 255 (train_images, train_labels),…
arjun
  • 11
  • 1
1
vote
0 answers

Adding tabular data to image classification model results in an Error tensorflow

I am not sure what I am doing wrong. The data: images_generator = ImageDataGenerator() X_train_images = images_generator.flow_from_dataframe( dataframe=dataframe_train, directory=None, x_col='image_path', y_col='target', …
1
vote
0 answers

How can I use handcrafted features along with a Pretrained model for image classification

I want to use a handcrafted feature like HOG etc and combine it with a Pretrained model like VGG and study the accuracy I just dont know how to combine both the things together
1
vote
0 answers

Why is there such a difference in final accuracy between 700x700 px image and the same split up into 140x140 px in TensorFlow

I have a relatively simple TF script for a convolutional neural network to classify microscopy images good or bad - manually this is done via the clarity of the image with bad images appearing blurry. The full scans are obtained as 700x700 px…
1
vote
0 answers

Draw bounding box on image after image classification

I am using PyTorch for custom image classification for 2 classes (like cats and dogs). I have the pretrained model already which classifies the passed image as either cat or dog. device = torch.device("cuda:0" if torch.cuda.is_available() else…