Questions tagged [image-preprocessing]

285 questions
0
votes
1 answer

Cleaning Image for Reading Numbers Pytesseract

I'm trying to read some entries from a table of data filled with a name and then columns of numbers. Here's the original picture: Between binarizing, converting to black/white, and just inverting, I found that inverting the image led to the best…
0
votes
1 answer

numpy.core._exceptions.UFuncTypeError: ufunc 'add' did not contain a loop with signature matching

I'm iterating through a directory to resize images and then save the newly reshaped images in another existing directory. I keep getting the following error: Traceback (most recent call last): File "preprocessingdatacopy.py", line 23, in…
iiooii
  • 551
  • 2
  • 9
  • 15
0
votes
1 answer

Model not training and negative loss when whitening input data

I am doing segmentation and my dataset is kinda small (1840 images) so I would like to use data-augmentation. I am using the generator provided in the keras documentation which yield a tuple with a batch of images and corresponding masks that got…
0
votes
1 answer

How to combine two RGB images along the depth axis to prepare 6-channel input data while using Keras flow_from_directory?

The train_generator reads batches of RGB image data from disk using Keras flow_from_directory (example code below). But in my case, I have two directory of images such that I want to read a pair of images and stack them along the depth-axis to form…
0
votes
0 answers

Python scikit - Image detect and remove lines from a noise image

I want to remove lines from a noise image like: IMAGE_NOISED I used morphological operations such erosion, dilation, and filters like thresholding, denoise tv, to remove most part of noise, but I have these lines on this image and want to remove…
0
votes
0 answers

Fitting 3d ellipsoid to 3d image

I have a 3d pixel data and I want to fit ellipsoid to it . Is there a way to fit ellipsoids to 3d image. So far I have included an ellipsoid to my data and rotated it . I have been trying to fit ellipsoid by manually in python by changing semi-major…
Astro
  • 33
  • 1
  • 7
0
votes
1 answer

Why in CNN for image recognition tasks, the filters are always chosen to be extremely localized?

In CNN, the filters are usually set as 3x3, 5x5 spatially. Can the sizes be comparable to the image size? One reason is for reducing the number of parameters to be learnt. Apart from this, is there any other key reasons? for example, people want to…
0
votes
1 answer

What can I do for preprocessing image BMP before using PCA by MATLAB?

I have BMP images .I want to preprocessing it with compatible way that can handle by using PCA for features extracting .
0
votes
1 answer

why do i get this error when i call find_cars()

ValueError: Expected 2D array, got 1D array instead: array=[0.05760078 0.02291208 0.01819267 ... 0.02739229 0.01199168 0.00890131]. Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it…
0
votes
0 answers

Creating traing and validation mini batch

class Dataset(object): def __init__(self, X, y, batch_size, shuffle=False): """ Construct a Dataset object to iterate over data X and labels y Inputs: - X: Numpy array of data, of any shape - batch_size:…
0
votes
1 answer

Training on large images with annotation files - alternatives?

System: OS - Ubuntu 16.04 LTS // RAM - 8 GB // GPU - 2 x GTX 1080 // Software - Tensorflow / Keras Problem Statement: I have large images (6500 x 4308 px) on which I want to run a training process to train a DL-algorithm. The problem is this size of…
0
votes
0 answers

Why is this image rendering wrongly for me?

I have followed the code in this notebook tutorial and I am stuck in rendering the 3d lung segmentation https://www.kaggle.com/gzuidhof/full-preprocessing-tutorial I have followed the tutorial except for the following changes: I have imported…
divinediu
  • 423
  • 1
  • 9
  • 33
0
votes
2 answers

Convert grayscale png to RGB png image

I have a dataset of medical images in grayscale Png format which must be converted to RGB format. Tried many solutions but in vain.
sneka
  • 21
  • 2
0
votes
1 answer

How to remove a part of XRAY png image using skimage or opencv?

I need to remove the extra black part in the png image using skimage on OpenCV. Can someone guide to how to do it? I am new to image processing. Thanks in advance.
0
votes
2 answers

Custom preprocessing_function with tf.image.rgb_to_grayscale - ValueError: setting an array element with a sequence

I am trying to use a custom preprocessing function to convert RGB images to grayscale during training. As such, I try to use tf.image.rbg_to_grayscale for this. My function looks as following: def prep_data(x): x = tf.image.rgb_to_grayscale(x) …
AaronDT
  • 3,940
  • 8
  • 31
  • 71