Questions tagged [image-preprocessing]

285 questions
0
votes
1 answer

How to load validation data with flow_from_directory function in tensorflow

[Resolved] I have an issue when using flow_from_directory function in tensorflow module tensorflow.keras.preprocessing.image I can load all my data for training my model, but I can't load my data to validate the training... My code (edit) [WORKING…
julgi
  • 11
  • 1
  • 3
0
votes
0 answers

I want to have my image augmented every time using keras.preprocessing layers

I was doing some augmentations for my DL project. I want to augment (flip) my image every time but the preprocessing layer do it randomly for some of the images and leaves some as it is. tf.keras.layers.RandomFlip(mode=HORIZONTAL_AND_VERTICAL,…
0
votes
1 answer

Pyimagesearch module not found

I am working on an object detection tutorial using keras, tensorlow on pyimagesearch, i was not able to subscribe on the pyimagesearch site therefore i couldn't get the pyimagesearch folder. Please is there a way i could run the code without using…
0
votes
1 answer

Change the Background color of an image set using OpenCV

I have a fingernail dataset and in these images they have different background colors as below image. I need to covert all those image's background color to one background color and check the accuracy of CNN model that I built. Here is the code I…
0
votes
0 answers

How to eliminate the black border around picture in opencv?

I want to get rid of the black border around inorder to enhance ocr prediction. How to eliminate it? this is my code so far. image = cv2.imread(filename) cv2.resize(image,(416,416)) gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) img_lp =…
0
votes
1 answer

Tensorflow - Preprocessing image in model prediction

I have trained a model using the Functional API and two different kind of pre-trained model: EfficientNet B5 and MobileNet V2. After tranining with the saved model, I'm running an application which uses that model to make some predictions. I'm…
0
votes
1 answer

How to store .npy file as a folder containing images

I am using the GRAD-CAM module that converts the images in a folder first to an array X and then after performing operations to a .npy file. But I would like to have this array back in image format and stored in a folder. How can I proceed…
0
votes
2 answers

How to pass multiple files(.nii format) as input file using python command line?

I have a folder with 20 .nii files. Need to convert it into png, so using python nii2png.py for the same. nii2png.py This is the file I am making changes in. Here are 2 files for your reference: Here these are 2 .nii files. It has the following…
0
votes
1 answer

Conversion of .mhd format to .nii format for multiple files code runs without error, but no conversion done

I am using the sliver07 dataset and my task is to convert.mhd format images to .nii format. Following the answer of Medical Imaging Data - how to convert .raw/mhd to Nifti/nii, I was able to convert it for 1 image but now as I apply it for multiple…
0
votes
1 answer

Convert image sequences to 4D tensor/ .npy in Python

I have a sequence of 2D images (how it has propagated through each time step) depicting a single simulation. Let's say for example I have 1000 sets of simulations, each containing 10-time frame images. This is not a supervised learning problem as…
0
votes
1 answer

How to save multiple images in one folder by using open cv?

Here is the code that i'm trying to modify. To read and save all the images at once in one folder, however I got error when I tried to save it import cv2 import glob import numpy as np #empty lists image_list=[] images = [] for img in…
njhh
  • 5
  • 4
0
votes
0 answers

Removing labels from mammogram using openCV

I am working on MIAS dataset and for preprocessing I tried to remove the labels that appear on some several images. My approach does work on some images and not on others, can't figure out why... I am using binary threshold and then keep the biggest…
0
votes
2 answers

How to convert tensor output of image segmentation model to image?

I am trying the code for image segmentation for self driving cars using Berkley deep drive dataset, I trained the model, and tested an image on it, got an output in tensor format(the segmented image), but I need it in image format, I tried…
0
votes
1 answer

how to extract text using opencv and pytesseract python?

I am using labelImg to draw a rectangle on the rows of image. Which gives me the xml file . With the help of this xml how to extract that text from the image table . To extract the text I have used the horizontal and vertical ine detection but do…
0
votes
0 answers

how to find the points of the contour parts of the images using opencv python?

I am trying to find the points of the contours parts(4 points) of the images (not related to the width and height of whole images).input image point are (0,0) (1300,0), (1800,0), and (1300,1800) and output image ( 0,0),(1300,0),(1600,0),(1300,1600)…
Amit Saini
  • 136
  • 2
  • 16