Questions tagged [image-preprocessing]

285 questions
1
vote
2 answers

UnknownError: OSError: image file is truncated (30 bytes not processed):

I'm trying to train a model. I have almost 150 classes and I'm using ImageDataGenerator to augment my dataset. I'm also using model checkpoints and csvlogger to save the weights. It gives me an error at a certain point in the first epoch when I…
1
vote
0 answers

how to find shift in image using cross-correlation in repeating structure image?

For past 2-3 days I am working on a problem for finding shift in repeating structure image. Question is:- repeating structure image is given to us and now I have shifted the image in x direction by some value how to find what was the shift in the…
1
vote
1 answer

Pytorch transformations on GPU, is it worth on big input data?

I am running a UNet with PyTorch on medical imaging data with a bunch of transformations and augmentations in my preprocessing. However, after digging into the different preprocessing packages like Torchio and MONAI, I noticed that most of the…
1
vote
0 answers

Can anyone please help me solve the issues regarding DPARSF?

I am currently doing an internship on fMRI analysis. The first step is preprocessing of fMRI data using DPABI. But I am facing this error while executing the DPARSF 5.2: The first is when I am trying to set the nuisance regressors: error while…
1
vote
1 answer

how to count the number of the horizontal lines using open cv python?

I have an images and convert it into gray scale, find the gaussianblur and threshold , I detect the horizontal lines . Now I want to count the numbers of horizontal lines present in the table (images) . Please tell me how to count ?` my code…
Amit Saini
  • 136
  • 2
  • 16
1
vote
1 answer

TypeError: unsupported operand type(s) for -: 'BatchDataset' and 'float'. I can't load unlabeled images from google drive using tensorflow

I am using Tensorflow. I want to load unlabeled images from google drive and then normalize them. However, when I run this code data_train_gan = (data_train_gan - 127.5) / 127.5 # Normalize the images to [-1, 1] I see error: TypeError: unsupported…
1
vote
1 answer

How do you add rician noise to an image?

This is what I have tried so far, this is the output: from scipy.stats import rice rice.rvs(img)
1
vote
0 answers

Image preprocessing - Train and test image data are not being read in corresponding order

I am trying to train a CNN model for an image processing problem statement. - I am facing a major issue in the preprocessing stage, where the train datasets of both train_rain and train_no_rain are not in the order I wish for them to be. This is…
1
vote
2 answers

Converting image into MNIST format

I have trained a KNN model to predict handwritten images in the MNIST dataset. I want to test it on my own handwriting now. I want to convert it into the MNIST format (values for 784 pixels in the image as an array). I tried converting the image…
Aryagm
  • 530
  • 1
  • 7
  • 18
1
vote
0 answers

Converting image into MNIST format

I have trained a KNN model to predict handwritten images in the MNIST dataset. I want to test it on my own handwriting now. I want to convert it into the MNIST format (values for 784 pixels in the image as an array). I tried converting the image…
Aryagm
  • 530
  • 1
  • 7
  • 18
1
vote
0 answers

Feeding an image and corresponding mask to unet in R, running Keras

I am still new to this field, and am trying to learn. So I am trying to figure out how to feed an image and corresponding mask to a unet in R. I found the following example: Keras | Image data preprocessing. I could follow the steps below and…
Selsheikh
  • 46
  • 3
1
vote
2 answers

IsADirectoryError: [Errno 21] Is a directory ERROR when trying to copy images into another file

I'm trying to copy 90% of images of a source file into a training folder but I have the following error: IsADirectoryError Traceback (most recent call last) in 50 51…
Jenny
  • 375
  • 4
  • 6
  • 25
1
vote
1 answer

How to preprocess ImageNet data that is smaller than 256 x 256?

I am preprocessing ImageNet data so all the data is the same shape, (256, 256, 3). My idea was to crop the data to (256, 256). However, I am running into issues because the images are of variable size and some are smaller than 256 in width/height,…
Jane Sully
  • 3,137
  • 10
  • 48
  • 87
1
vote
1 answer

How to create additional training images with Keras preprocessing layers?

I am following the official Tensorflow/Keras docs on image classification, in particular the section on image augmentation. There it says: Data augmentation takes the approach of generating additional training data from your existing examples by…
Matthias
  • 9,817
  • 14
  • 66
  • 125
1
vote
1 answer

Keras - Changing the way images are taken in a dataset in fit()

I'm studying machine learning and deep learning. I'm trying to customize this model from the Keras website https://keras.io/examples/generative/wgan_gp/ My model takes 3 512x512 images in each training iteration (from 10 different directories),…
Gibser
  • 197
  • 8