New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with using a custom dataset and image_util.ImageDataProvider() #6
Comments
Based on the information I have to guess a bit. Are you sure that the data and the mask image have the same dimension? What is the error you are getting for "the other thing"? |
We double checked and all images are the same dimensions. If we run
|
We assumed the line |
No this line is actually important. Thats where I load the dataset used for the verification. |
Ok.. We've reverted back/updated, thank you. If we follow this example where should |
Thats the data you want to run the prediction/test on. |
Right, ok so if we try this (not sure we're using it correctly):
we get this output:
|
we also tried:
but were met with what looks like the same error |
Hard to tell from this. Can you provide the code and the data so that it can be reproduced? Apart from that, this line |
Seems like that there is a bug in the One way around this in the meantime it to resize your input: from PIL import Image
import numpy as np
class SkinImageDataProvider(image_util.ImageDataProvider):
def _load_file(self, path, dtype=np.float32):
img = Image.open(path)
return np.array(img.resize((500, 376)), dtype) Your will of course lose information but the learning process is going to be much faster |
Hi,
|
Do you have a stacktrace? When does the error happen? What is the shape of your ground truth? |
Hello, same bug when I use my own dataset
|
Hey!
Thank you for your help and for the updates. Unfortunately, we're still having trouble using a custom dataset and we're hoping you can help us.
The main error produced is this;
We're working with rgb images of size (767x1022) and using the data provider function like this (where everything here seems to be working as expected);
data_provider = image_util.ImageDataProvider('reduced_segmentation_dataset/*', data_suffix=".jpg", mask_suffix='_mask.png')
The other thing we noticed is that when we call
path = trainer.train(data_provider, "./skin_trained", training_iters=10, epochs=4, display_step=2)
it defaults to callingtest_x, test_y = data_provider(4)
on line 367 ofmaster/tf_unet/unet.py
If we calldata_provider(1)
we seem to get the results we expect and bypass the error but the above error is still preventing us from a full run.Do you have any ideas why we're having this mismatch? I'd be happy to provide more information as needed.
The text was updated successfully, but these errors were encountered: