Questions tagged [image-preprocessing]

285 questions
0
votes
0 answers

How can I check shape for generated images?

I have images with different width and height I want to reshape generated images so that width and height are same So I used following function that check and change shape of images But there was an error that shape was None type when "size = h if h…
yeon
  • 5
  • 2
0
votes
0 answers

How to add conditional preprocessing with keras included functions?

I have a dataset of images whith some of them that I need to flip before processing. I use the keras function flow_from_dataframe from the keras class ImageDataGenerator to get the train and validation DataFrameIterator but I can't find how to flip…
armrib
  • 23
  • 4
0
votes
1 answer

Is there any way to create multiple bounding boxes around non zero numpy array values?

I have a numpy array of an image. I have set non zero values for my region of interest and for rest I have set value as 0. Now if I were to create a single bounding box, I could check for 1st occurance and last occurance of non zero value and get…
0
votes
2 answers

Can anyone tell me how can I change mask the foreground if I know the color range of background in RGB?

all of you, Here is the image; The exact background color is in RGB; (246, 46, 100) I have tried several methods but those are too slow, one of the methods is below; new_image = Image.open("image-from-rawpixel-id-6649116-original.png") img_up =…
0
votes
2 answers

How to overlay 2 nifti files?

Im a beginner in the nifti world, and have to overlay 2 niftis (one segmented white matter and one segmented gray matter images) together. I tried with FSLeyes but I cant save them to a nifti. If somebody has dealed with same issue, and can help…
0
votes
0 answers

OpenCV Reflective Surface Problem (Pre-Process Text from Digital Screen)

I'm working on a machine learning application for reading data from fuel pumps, so far I've gone ahead and created a pretty robust YOLOv5 Object Detection Model that can detect the regions that I want fairly accurately. But there is a problem, at…
0
votes
0 answers

How to build pre-processing and post-processing inside TFlite model using Python?

I have trained a tensorflow model and converted it to tflite model. I want to build a Tensorflow lite (.tflite) model which does pre-processing, model execution, and post-processing. Pre-processing mainly consists of reading a single image, resizing…
0
votes
0 answers

image preprocess function for image_dataset_from_directory

In the ImageDataGenerator, I've used the following function to preprocess images, through the keyword of 'preprocessing' in .flow_from_dataframe(). However, I am now trying to use the image_dataset_from_directory, which does not work with the…
0
votes
1 answer

How to optimal preprocess images for Tesseract in C#, when grayscaled image text color "interferes" with the background color?

I'm struggling with finding a optimal binarization as preprocessing step for OCR (tesseract in C#). The images are 1624 X 1728 of pixel size and contain car gui elements (Buttons, Sliders, Info Boxes) and corresponding text from a car navigation…
0
votes
1 answer

Normalization in the Object Detection API

I'm quite confused of the normalization process when using the object detection api. I'm using the SSD MobileNet v2 320x320 from the model zoo. In the pipeline config used for training I don't specify any additional preprocessing steps besides what…
0
votes
1 answer

Overlay contour to medical image

I am trying to plot the contour of an image and get it overlaid over the original image but without filling, I would like it to appear as an edge contour instead of a filled contour like the attached picture. I used this command but the problem is…
0
votes
0 answers

Validation loss reported seems to be wrong, can preprocessing be the reason?

I'm training a resnet model with Keras, fine tuned on my own images. While training, Tensorboard is constantly reporting a validation loss that seems unrelated to training loss (much higher, see image below where train is orange line and validation…
Patrick
  • 2,577
  • 6
  • 30
  • 53
0
votes
1 answer

Expand dimension of "EmguCV.Mat" or "Onnx Tensor"

I am using Onnxruntime in C# for yolov4. Here is the pretrained yolo model: https://github.com/onnx/models/tree/main/vision/object_detection_segmentation/yolov4/model EmguCV is used to get an image, and then preprocess it to suit Yolo's input. This…
mary
  • 23
  • 5
0
votes
1 answer

SageMaker Pipeline - Processing step for ImageClassification model

I'm trying to solve ImageClassification task. I have prepared a code to train, evaluate and deploy tensorflow model in SageMaker Notebook. I'm new with SageMaker and SageMaker Pipeline too. Currently, I'm trying to split my code and create SageMaker…
Cindy
  • 568
  • 7
  • 20
0
votes
0 answers

Skew Correction for OCR in documents with differently skewed areas

Picture link I have to pre-process some documents for automated data extraction through pytesseract, but many of those images have text areas that are differently skewed. Because of this most methods are not working which detect and de skew the…
Atish
  • 1
  • 1
  • 1