Skip to main content

Questions tagged [image-preprocessing]

Image preprocessing are the steps taken to format images before they are used by model training and inference. This includes, resizing, orienting, and color corrections. Preprocessing is required to clean image data for model input. For example, fully connected layers in convolutional neural networks required that all images are the same sized arrays. Image preprocessing may also decrease model training time and increase model inference speed.

Filter by
Sorted by
Tagged with
0 votes
1 answer
25 views

flow_from_directory returns no image eventhough os.listdir() gives the count of files present correct

I am new to DL in terms of Image tasks. Here is the snippet I am using for Data generators for training and testing ...
Ansuman's user avatar
1 vote
1 answer
35 views

PyTorch noise estimator model not learning - converges to same output regardless of input

I'm implementing a simple noise estimator using PyTorch. The model consists of a few convolutional layers followed by a small fully connected network, ending with a single neuron that outputs the ...
Adlane Ladjal's user avatar
1 vote
1 answer
271 views

Downsampling an image in the right way

I was not shure where to ask this question, but SE Data Science seems to be the best place for it. So I tried to build a CNN based super resolution model. Unfortunately I have only high-res images but ...
Lockhart 's user avatar
0 votes
0 answers
16 views

I want to create a system for classifying bone fractures What pre-processing steps can I use to process images?

I want to know where I should put the image preprocessing code in the decision tree code How to extract features from images and classify them
zxcvbnm zxcvbnm's user avatar
0 votes
0 answers
7 views

What's the intuitively best option for preprocessing images of varying aspect ratios and resolutions?

We've got a complex pipeline that produces a crop of the minimum possible subset image that includes all useful information. We've got a number of customers using various models on these images, and ...
Tal's user avatar
  • 101
0 votes
0 answers
12 views

what are Non-AI methods in detecting how much brown pixels an image have

looking for a non-AI approach on how to find how much "brown" color a 256x256 px image have. I am making a dataset that will be used as training data for AI later on. There are several ...
DrakeJest's user avatar
  • 101
1 vote
1 answer
59 views

Find closest color class to an RGB value

I have a module that estimates the color of an object and returns an RGB value in this format: (40, 48, 68) which corresponds to this color: Now I have to classify ...
Mary's user avatar
  • 227
0 votes
1 answer
33 views

Image Classification when image is a plot of two functions

My goal is to perform a supervised classification of a number of objects. Each object is described by a plot of two functions, f(t) and g(t). The plot dimensions, (b - a) and T, are about the same ...
James's user avatar
  • 133
0 votes
0 answers
26 views

Should I remove the watermarks of my images before training Yolov8?

I would like to train a Yolov8 network in an animal detection task using camera trap images. Some camera trap images have information added to them such as date, time, day of the week, camera brand, ...
renton01's user avatar
2 votes
2 answers
135 views

Seeking Guidance on Constrained Input Modeling for Soil Moisture Correction Using Rainfall Observations

I find myself immersed in the intricacies of working with 2D modeled fields (images) representing soil moisture in regions where direct observations are unfortunately absent. However, there is a ...
Seyed Omid Nabavi's user avatar
0 votes
0 answers
19 views

How can i create model to match nested geometric image with child geometric images

image1 is a nesting file and image2 is child file ,i want to find child file is contain in nesting file or not.We tried using random forest but it did not work.can you suggest some good image matching ...
Aditi Chavan's user avatar
0 votes
1 answer
32 views

Object Classification Dataset Creation

There is a problem I've faced recently which I'm not sure my approach is proper or not. There is bunch of field videos which I run a semi-supervised detection model to extract crops to train my ...
spawnfile's user avatar
0 votes
1 answer
353 views

Histogram of Oriented Gradients (HOG) - Why normalize 16x16 blocks and not the whole picture?

I'm trying to learn Histogram of Oriented Gradients (HOG) I understand why we compute the gradient and the orientation and also map every gradient into a 9 binaries histogram that spans from 0 to 180. ...
euraad's user avatar
  • 115
1 vote
0 answers
53 views

Loading large raster dataset in to tensorflow

I am building a convolutional neural network for processing air quality concentration fields and meteorological parameter distribution. The input data are in Geotiff and NetCDF formats, which I load ...
Marcin Kawka's user avatar
0 votes
1 answer
45 views

annotation file for ham10000

I am attempting to train a Faster R-CNN model using the HAM10000 dataset. However, I have been unable to locate an annotation file specifically for this dataset. I am seeking guidance on the most ...
Ali Salimi's user avatar
0 votes
0 answers
31 views

Is there an unified pipeline to convert a 4D nifti noisy pet scan image to an averaged, denoised, 3D Nifti image?

What I'm looking is to do at least the step 2 of ADNI pre processing (coregistered, averaged): https://adni.loni.usc.edu/methods/pet-analysis-method/pet-analysis/ OASIS-3 dataset provides FDG PET ...
hhaamm's user avatar
  • 143
6 votes
2 answers
2k views

How to remove the hotspots from given image by using Python and opencv?

In the picture below there are some regions which are very bright (i.e. more white). Some bright regions are wide and some are narrow or thin. The red box covers one such wide bright spot, and blue ...
S. M.'s user avatar
  • 155
1 vote
1 answer
138 views

Different validation sets give very different results. What can be the reason?

I have ~78k microscopy images of single cells, where the task is to classify for cancer (binary classifier). The images are labeled according to which patient the data came from. I do the train-val ...
Emil Edvardsson's user avatar
0 votes
1 answer
93 views

Overfitting still exists using different techniques on voice classification

I have 986 voice signals which have been collected by our team. The data set includes 745 healthy and 150 unhealthy voice signals. I split the data into 70% training and 20% validation and 10% test (...
Zara Nz's user avatar
0 votes
1 answer
114 views

ReLu layer in CNN (RGB Image)

I am able to get convoluted values from RGB Image lets say for each channel. So I have red channel with values: -100,8,96,1056,-632,2,3.... Now what I do is that I ...
Juraj Jakubov's user avatar
0 votes
1 answer
672 views

OpenCV add/subtract functions produce different results from numpy array add/subtract

Im trying to brighten and dim an image using OpenCV with two approaches. Approach 1: Used OpenCV's add and subtract functions to ...
Somanna's user avatar
  • 103
0 votes
0 answers
179 views

Getting error "Failed to find data adapter that can handle input" even after converting list to array

I am getting this error : ValueError: Failed to find data adapter that can handle input' I even changed the list to arrays but still the error keeps pooping up. This is the code: ...
Hemangi khatri's user avatar
0 votes
1 answer
71 views

Clustering on Raw Image Pixel Array

I have an array in the shape of (105, 105, 3). When I do plt.imshow(array) it outputs: How can I run a clustering algorithm directly on this image? Do I need to convert the pixels to cartesian ...
charactercapital's user avatar
1 vote
1 answer
728 views

Proper way to reshape a image for training using CNN

I am new to Keras and facing some problems figuring out how to reshape the input image data properly. I have $16 x 16$ images, each with three layers, i.e., R, G, and B. The image data is in the form ...
Rameswar Sahu's user avatar
0 votes
1 answer
457 views

How to convert Torchvision image tensor to base64 directly?

I have this code that is supposed to convert an image entry of a Torchvision dataset to a base64 string. To do that, it serializes the tensor from a Torchvision dataset to a string, modifies that ...
Bengt's user avatar
  • 111
0 votes
1 answer
881 views

OpenCV isn't processing all the images in a directory

I'm really trying to apply CLAHE to a directory of about 700 images. However, once I manage to get it running, for some reason the code stops before all the images are processed. When I run it on ...
brosefzai's user avatar
2 votes
0 answers
1k views

Applyingv a 2D mask onto a 3D rgb color list

Problem I have the following image data as a 3D numpy array containing rgb values of the image in a (n,n,3) shaped list (Image). I also have data of the corresponding black and white mask image in a (...
Hector Edu Nseng's user avatar
0 votes
0 answers
152 views

Rotating and cropping scanned images with OpenCV2

I wrote a script to take scanned images and crop out the background from them as well as rotate them to the proper orthogonal orientation (my set of images were not initially scanned properly and many ...
Max_GD's user avatar
  • 1
0 votes
1 answer
103 views

Converting images in a directory into a vector to calculate cosine distances?

I'm currently going through issues in terms of acquiring multiple images at once to convert them to a vector for calculating the cosine distance to get similarity between say an image from the ...
Is land's user avatar
  • 11
1 vote
2 answers
1k views

how to label 3d model for segmentation task

I'm working on 3d meshes dataset, i have to label it to train my deep learning model for a segmentation task like the picture shows. I spent days looking for a tool to label my 3d data but ...
hamza mon's user avatar
0 votes
1 answer
438 views

How to measure the similarity between two medical images of different imaging modalities according to similar objects in both of them?

I have two series of medical images each one from different imaging modalities. According to that, I have been segmented the Region of interest (the object which appears in both modalities )using U-...
Fadil's user avatar
  • 1
0 votes
0 answers
3k views

Normalizing images with OpenCV (divide by 255)

I'm loading images from my dataset, which are all of resolution 200x200 and in RGB format. I'm loading them using OpenCV for Python, with the following code: ...
Tegig's user avatar
  • 1
0 votes
1 answer
498 views

Image normalization and reverse normalization: colors lost on image generation (GAN)

I'm working on a Gan. Based on different papers, I use a Tanh activation function on the last layer of the generator. Which produces [-1,1] outputs. To make this coherent, I use image normalization ...
Bouji's user avatar
  • 103
1 vote
0 answers
83 views

global contrast normalization implementation

I'm trying to understand figure 12.1 in Goodfellow available here. I'm not able to reproduce figure 12.1, and I'm wondering what is it I'm missing. The denominator of equation 12.3 is a constant, and ...
NNN's user avatar
  • 113
1 vote
1 answer
428 views

How to preprocess heavy MRI images?

I have a large MRI dataset for an image segmentation task that cannot directly fit in memory in Colab, you can access the data with the link I put at the end. They are brain MRI images: 484 training ...
user15515518's user avatar
0 votes
0 answers
568 views

How to break a binary image mask into multiple masks?

I have image with binary mask. I want to break the binary mask into many individual masks of same dimension, but each mask should contain only one segmentation mask. Is there a way to do it in python, ...
Ianmoone444's user avatar
1 vote
0 answers
23 views

If an FCN accept rectangular image as input or has to be square?

Some say that for FCN it doesn't matter if the input image is rectangular the only thing matters that the size must be constant ...
Sheykhmousa's user avatar
0 votes
1 answer
44 views

Working with three types of data: numeric (integer, floats), images, and text for prediction

So I have three types of data (in title) and am wondering how I can combine the data. The target is numeric (price). My idea is to perform feature extraction on both the images and text, which would ...
new_account_49's user avatar
1 vote
1 answer
2k views

Keras ImageDataGenerator unable to find images

I'm trying to add image data to a Kaggle notebook so I can run a convolutional neural network but I'm having trouble doing this via ImageDataGenerator. This is the ...
Blake Lucey's user avatar
1 vote
0 answers
20 views

Central finite distance gradient simplified [closed]

I'm asked to compute central finite difference scheme (f(i+1)-f(i-1)) on an image. My attempt is something like: ...
Anđela Todorović's user avatar
1 vote
1 answer
156 views

Pre-processing images for fine-tuning

When you are fine-tuning a CNN like ResNet, VGG, EfficientNet, etc and you want to train the model with your own images, or even when you want to do a inference with any image of your dataset, do you ...
Valderas's user avatar
3 votes
0 answers
312 views

when depthwise separable convolution should be preferred over normal convolution?

As a novice in the realm of deep learning, I recently learned about Depthwise Separable Convolution. I have seen some tutorials and articles about it on internet, and in all of them the author ...
K327's user avatar
  • 131
1 vote
2 answers
1k views

Is it possible to apply pooling across the channel dimension of the input tensor?

I have an input tensor of the shape (32, 256, 256, 256). In this tensor shape, 32 is the batch size. second 256 is the number of channels in the given image of size 256 X 256. I want to do pooling in ...
hanugm's user avatar
  • 157
0 votes
1 answer
41 views

Image Preprocessing [closed]

I'm working on a use case where I need to pre process the image for my AIML model evaluation and I want to count all black pixels in RGB image. Instead of iterating rows*column, I'm looking for some ...
vipin bansal's user avatar
  • 1,282
4 votes
2 answers
11k views

Cannot reshape array of size 12288 into shape (64,64)

I have an image I loaded with the image.load_img() function but when I try to reshape it I get this error: ...
Houmes's user avatar
  • 41
0 votes
0 answers
34 views

finding the defect button

In case of a project where you are going to detect whether the image printed on a button is correct or not and given that you have only a one correct possibility of a correct image and some incorrect ...
user's user avatar
  • 1
0 votes
1 answer
21 views

Advices to create a data set from dictionnary's screenshot

I have six thousand screenshots like the one below. I would like to create a date set to do some deep learning. My goal in the end is to create the next word prediction using only my own word data set....
CechMS's user avatar
  • 61
1 vote
1 answer
243 views

How to design a model for contour recognition? In particular, how to shape the output layer?

I want to design and train a neural network for the automatic recognition of the edges, in some microscopic images. I am using Keras for a start, I may consider PyTorch later. The structure of the ...
Fabio's user avatar
  • 113
0 votes
0 answers
3k views

Why training loss is decreasing down too fast?

I have a dataset of video sequences, I have trained them, and calculated the training loss using mean square error, but my training loss is decreasing down very fast. Like 0.06-0.02. Is it just fine ...
TariqS's user avatar
  • 21
0 votes
1 answer
568 views

How to feed high resolution images to the model?

I want to do object detection , normally we have a size of image 256 x 256 or 128 x 128 but what if we want to feed high ...
Hamza's user avatar
  • 240