Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
0 answers
73 views

Saving tensorflow dataset extremely slow after applying filter

Relatively new to tensorflow here, and I am facing an issue where I have not yet managed to find a good answer through searching. So here goes: I am trying to understand why applying a filter function ...
AstroAT's user avatar
  • 502
0 votes
1 answer
393 views

Error resulting from ImageDataGenerator during data augmentation

Can someone please help me in fixing the error? The code works fine before the for loop. Before the for loop, an array of the image was printed. Is there something wrong with the for loop? The output ...
GAH's user avatar
  • 11
0 votes
1 answer
961 views

Input array must have a shape == (..., 3)), got (299, 299, 4)

I am using a pretrained resnet50 model to validate some classes. I am using LIME to test how the model is testing this data as well. However, some of the images are not RGB and may be different ...
Timelost's user avatar
0 votes
0 answers
832 views

convert image from [0.0, 1.0] to [0, 255]

Suppose the image x consists of floats in the range [0, 1], Torchvision adopts the transform of clip(x*255+0.5, 0, 255).as(uint8) . Skimage seems similar to torch TensorFlow uses an asymmetric ...
tsp's user avatar
  • 71
0 votes
0 answers
130 views

Regression analysis with All text data

I want to know what is the best approach to handle a regression analysis on all text data type. I have the following data set. my feature columns are: Strength, area of development, leadership, ...
user2741438's user avatar
0 votes
1 answer
647 views

How to put skimage imread_collection through tensorflow

I'm trying to put a collection of images through a neural network, but I can't figure out how to get a large collection of images to go into a tensorflow model, as trying to convert the collection ...
Programmer S's user avatar
1 vote
1 answer
174 views

How to run model.predict() on a 5 dimensional array in Keras?

I've trained a binary classification model that takes a (128x128x3) image and then gives a binary value of 0 or 1. I then want to take a larger image, say (nxmx3), and apply a windowing function and ...
explodingfilms101's user avatar
1 vote
1 answer
195 views

Pixel values difference between Tensorflow and skimage

Why is there a difference between the pixel values if I open an image with skimage.io.imread(image) and tf.image.decode_image(image)? For example: import skimage.io original_img = skimage.io.imread(&...
Georgi Stoyanov's user avatar
14 votes
4 answers
17k views

Input image dtype is bool. Interpolation is not defined with bool data type

I am facing this issue while using Mask_RCNN to train on my custom dataset with multiple classes. This error occurs when I start training. This is what I get: /home/parth/anaconda3/envs/compVision/...
parth.singh71's user avatar
0 votes
1 answer
380 views

How do you add Gaussian Noise to a tif image file in python?

I am trying to add Gaussian noise to a set of tif files. I have used both scikit-image and cv2. Scikit-Image: noise_img = random_noise(np_img, mode='gaussian', seed=None, clip=True) CV2: gauss = ...
Aryan Indarapu's user avatar
1 vote
1 answer
794 views

How to read in multiple image files (ppm files) in colab (skimage not defined)

I'm a complete newbie to Tensorflow and colab. I am currently working through a beginner tutorial. I am working in colab in google. I'm trying to run the following code in order to read in a number ...
Jon's user avatar
  • 67
0 votes
0 answers
192 views

how to access image from a dataset using skimage? Is there any other alternate?

import tensorflow as tf import os import skimage train_data_directory = "F:/Projects/Tensorflow/Code/Training" directories = [d for d in os.listdir(train_data_directory) if os.path.isdir(os.path.join(...
Jayesh Kothawade's user avatar
8 votes
2 answers
20k views

Convert image from float64 to uint8 makes the image look darker

I have images of type float64 generated by GANs, and I save them through skimage.io.imsave. The process works well and the saved image looks nice, but I get a warning message as follows: Lossy ...
Maybe's user avatar
  • 2,269
1 vote
2 answers
777 views

Including advanced computation (scikit-like) in a keras custom layer

Normally I would preprocess the data before I feed it into my model for classification. This is however not possible and thus am stuck either to enhance the performance of the model further (somehow)...
Imago's user avatar
  • 513
1 vote
1 answer
5k views

Tensorflow Error: Consider casting elements to a supported type

I just use scikit-image load image from a folder, but When I run get_batches() function, an error occurred. I looked at some blogs, but the problem still persists. I don't know how to deal with it. ...
samzhang's user avatar
0 votes
0 answers
841 views

Conflict between tensorflow/PIL/pillow and scikit-image?

I am tying to rebuild my computer to run Spyder in a tensorflow environment for some image processing. In the past this worked and I had scikit-image working fully in that environment, and accessible ...
Patrice Carbonneau's user avatar
3 votes
1 answer
5k views

SSIM for 3D image volume

I'm working on an image super-resolution problem (both 2D and 3D) using TensorFlow and am using SSIM as one of the eval_metrics. I'm using image.ssim from TF and measure.comapre_ssim from skimage. ...
End-2-End's user avatar
  • 921
8 votes
2 answers
7k views

Efficiently resize batch of np.array images

I have a 4D np.array size (10000,32,32,3) that represents a set of 10000 RGB images. How can I use skimage.transform.resize or other function to resize all images efficiently so that the (32,32) is ...
Austin's user avatar
  • 7,279
1 vote
1 answer
2k views

What is the right way to reshape a tensor?

The code below is for lungs segmentation(2D) from Chest X-ray. It is supposed to generate lung masks from Chest X-rays using the trained model 'trained_model.hdf5'. On giving a chest x-ray as input, ...
ArnabC's user avatar
  • 181
2 votes
0 answers
386 views

Image transformation in Tensorflow vs Caffe vs PIL + skimage

I created a minimum working example of an image preprocessing step which is to be ported over from Caffe v.1 to tensorflow. I am able to reproduce the steps using PIL + skimage however, I am unable to ...
envy_intelligence's user avatar
0 votes
1 answer
443 views

How to rotate image in tensorflow with mode edge?

I was used skimage package to rotate an image that has mode edge option image_rotate = skimage.transform.rotate(image, angle,mode='edge') mode : {‘constant’, ‘edge’, ‘symmetric’, ‘reflect’, ‘...
Jame's user avatar
  • 3,854
1 vote
0 answers
591 views

In skimage, How to transform an image array to binary type?

I'm doing some deep learning CNN work using tensorflow, I wanna load image dataset and change its type to TFRecord as recommended. When I use PIL library, it work fine: for img_name in os.listdir(...
Will2015's user avatar
4 votes
0 answers
560 views

tensorflow equivalent for scipy.ndimage and skimage.measure

I have a script that takes a label image, where each pixel represent the class of the original pixel in a given image. Using scipy.ndimage and skimage.measure I create a list of bounding boxes that ...
Tal's user avatar
  • 127
3 votes
2 answers
890 views

Using 32-bit Lab images in Tensorflow

I'm using skimage to convert RGB images to Lab colorspace but it seems that skimage uses float64 datatype while Tensorflow uses float32. Is there any way to convert the 64-bit Lab image to 32-bit ...
Cypher's user avatar
  • 2,564
3 votes
0 answers
2k views

Tensorflow - Histogram Loss Function

I'm new to Tensorflow and I'm trying to design a Loss Function to account for the difference in the 3-Channel Histogram of the Input image and the Output image. I know the L1 loss in Tensorflow is ...
Cypher's user avatar
  • 2,564
2 votes
1 answer
3k views

Is there a resize function in Python to resize an image as the tf.image.resize_images function of TensorFlow?

I have a 4D ndarray of image data, which is organized as [NumberOfImages, RowsOfImage, ColumnsOfImage, ChannelsOfImage]. Now I want to resize the images in the 4D ndarray to the new size, which is ...
Kongsea's user avatar
  • 927