-
Notifications
You must be signed in to change notification settings - Fork 79
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
How to use a custom dataset? #13
Comments
Posting the full stacktrace would help. If you rename the dataset in |
Actually I think the problem is that the module |
If you post the stacktrace it would be easier to diagnose. If you look at the parent |
In
The structure is:
|
I think the problem was the following line: self.imgs = glob.glob(os.path.join(data_dir, '*.jpg')) which would only get JPGs. I pushed a fix to master to account for PNGs as well. Let me know if you still have issues. |
Unfortunately that didn't work, same error. What is the absolute path expected? I'm using The code files are in another path. |
I get this error. But I try to make "val" folder for "validation" folder. The error disappears. I get new error : "out of memory" although I try to make "batch_size = 2" and "crop_size = 64". Could you post your default_config.py if you can run train.py. |
@QLaHPD The code does not find the dataset. You can print datapath in BaseDataSet, and derived dataset to make sure. |
I encountered this error and solved it. Note that this error may exist even if the model is able to find the dataset. Most of the people say there is a problem locating the dataset but this is not always the case. Like me, I think you are using a small dataset where there is no enough samples for each iteration. Here are more details. The default patch size is
To solve it, you can set a smaller value to the
I hope this helps. |
I suggest you write your own dataloader and prepare a cropped image dataset so you don't need to crop images everytime. |
Yes, writing own dataloader solve this issue. |
I've changed the default_config.py to a custom folder with images:
folder/path
|----/image001.jpg
|----/image002.jpg
...
But it returned me
ValueError: num_samples should be a positive integer value, but got num_samples=0
The text was updated successfully, but these errors were encountered: