Questions tagged [image-preprocessing]

285 questions
0
votes
1 answer

Why save_to_dir dont work in flow_from_directory In Keras

Here i want to save the augmented pictures to a directory.but that didn't happend using the below code.I am beginner .Please Help.Thanks in advance. import tensorflow as tf import matplotlib.pyplot as plt import os import cv2 import numpy as…
0
votes
1 answer

Tensorflow: How to set tensor shape after reading image from tfrecord file for data augmentation?

I have a tf.data.Dataset that I read from a tfrecords file like so: import tensorflow as tf # given an existing record_file raw_dataset = tf.data.TFRecordDataset(record_file) example_description = { "height": tf.io.FixedLenFeature([],…
0
votes
1 answer

rescale images of unknown bit depth to fixed range automatically

I want to create an algorithm that can take a dataset and check how each image is represented and change the scale to 0-255 or 0-1 automatically. I know how this is done manually if I know how my full dataset is represented. Lets say my dataset is…
Kalle
  • 364
  • 1
  • 2
  • 14
0
votes
1 answer

Remove Curly lines from ID card

How can I remove lines similar to the one present in the picture(green in color on top of face)? I have seen many methods to remove vertical or horizontal lines but here the lines seems to be curly and also i want to extract information from the…
0
votes
0 answers

Removing duplicates from a large image dataset

I am working with a training data set of 127.000 images scraped from internet. I know there are quite a few duplicates in there and i want to remove them to improve the performance of my deep learning model. I have tried several different ways to do…
0
votes
1 answer

Why are my images not saving? Using TensorFlow Keras.preprocessing.image.directoryIterator

I am really new to using tensorflow and working with CNNs. I'm trying to load my image dataset and resize and grayscale each image. I was reading documentation on TensorFlow Keras.preprocessing.image.directoryIterator. I tried it (code below) and it…
user2197867
  • 83
  • 2
  • 7
0
votes
1 answer

How to fill edges detected by canny in python?

I want to fill the area in the lung edges I detected with cv2.Canny(). For example: So the result would be something like that: I tried to find these areas with cv2.SimpleBlobDetection(). But couldn't find away to get the params right. I'm new in…
0
votes
0 answers

Converting data into ENVI format

I have data acquisition from Hyperspectral image scanner and now my task is to convert the image(.png and .jpg format) in to different form, let's say ENVi header file or Open cv or MATLAB. IS Envi format is similar to file folder which contains…
0
votes
0 answers

Dividing images into patches tensorflow

I am trying to build a CNN and want to divide my input images into non-overlapping patches and then use it for training. However, I am unsure how to combine the extraction of patches with the code below. I believe a function like…
0
votes
0 answers

How to remove text from an x-ray image using python

enter image description here How can I remove the text from the image?
0
votes
0 answers

Using external annotations with ImageDataGenerator in Keras

I'm working on a binary classification problem with a large image dataset. I have annotations with the faces bounding boxes in a json file witch contains the image file path reference and the corresponding annotation for each sample. Like this: { …
João Victor
  • 407
  • 2
  • 10
0
votes
1 answer

Why when brightening an image using a Numpy array, is the grey level reset to zero after hitting 255 then incremented instead of clipping?

I'm trying to do some labs we were given to complete in Matlab for a video analysis module in python since I have already completed them in Matlab and I'm having an issue with brightening an image. I have got the image to read into a Numpy array…
0
votes
1 answer

AttributeError: module 'keras.applications.mobilenet' has no attribute 'preprocess'

I already imported preprocess module but it continuously showed the same error. How should I solve this error? Need help to solve this error ! The imported Libraries are given below, import tensorflow as tf import keras from…
0
votes
0 answers

Keras classifiers accuracy does not improve

I have been trying to work out how to do classification using ImageDataGenerator and not having much luck. When I try to fit the model the accuracy output is different each time, from .14% to 90% at the start but then it stays at that accuracy no…
0
votes
1 answer

How to convert a .png file to TFrecord tensorflow format?

I have images in .png format and their labels in .csv format. I want to convert them in tfrecords format. I'm very new to tensorflow. If someone can point me towards all the things i need to know and how to do this. It'll be great. I've scoured…