Skip to content
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

json file format #2

Closed
dmolony3 opened this issue Jan 2, 2019 · 9 comments
Closed

json file format #2

dmolony3 opened this issue Jan 2, 2019 · 9 comments

Comments

@dmolony3
Copy link

dmolony3 commented Jan 2, 2019

Can you provide an example with the format required for the json file?

@Wuziyi616
Copy link
Owner

Actually you can use whatever format you want and modify corresponding part of the code.
Here is my format for the dataset.json file:
{
"trainning":[
{"image":"path_to_your_image1", "label":"path_to_your_label1"},
{"image":"path_to_your_image2", "label":"path_to_your_label2"},
...
]
}

@tphankr
Copy link

tphankr commented Nov 10, 2020

I follow your answers but I did not creat .json file. Can you show us step by step in order to creat .json file? Thank you Wuziyi616. Please help us, I only difficult this step.

@Wuziyi616
Copy link
Owner

The json file is used for data loading so it is not necessary to have one. You can refer to #7 for more details. The simplest way to replace the json file is directly write the path to your training data/label in the code and load them.

@tphankr
Copy link

tphankr commented Nov 12, 2020 via email

@tphankr
Copy link

tphankr commented Dec 5, 2020

Now, the code has the error : KeyError: 'train_and_test'. I also followed the code but I don't fix. Please help me, thank you very much.
image

image

image

I tried to create dataset.json. I have done. Is this okay? Thank you.
image
...
...
image
....
....
image

Thank you very much.

@Wuziyi616 Wuziyi616 reopened this Dec 6, 2020
@Wuziyi616
Copy link
Owner

@tphankr Hi. Just change the key "train_and_test" to "training". This will solve the problem I think.

@tphankr
Copy link

tphankr commented Dec 6, 2020

@tphankr Hi. Just change the key "train_and_test" to "training". This will solve the problem I think.

Thank you @Wuziyi616 for your response quickly. I followed you. The code passed the old error. Now, I faced : ValueError: signal number 32 out of range. I checked also my environment; it is correct with your environment ( pytorch 0.4.1, ...). Please help me. Thank you @Wuziyi616, I will try to follow you in order to run the code well.
image

image

Thank you very much.

@Wuziyi616
Copy link
Owner

It seems that this problem is related to the dataloader here. I googled it and there seem to be two solutions. First, you can try setting the num_workers to smaller values like 8 or 16, but I am afraid this will make the training process very slow. Another solution is changing the Python version, you can refer to this for more details. Hope this will help you!

@tphankr
Copy link

tphankr commented Dec 7, 2020

It seems that this problem is related to the dataloader here. I googled it and there seem to be two solutions. First, you can try setting the num_workers to smaller values like 8 or 16, but I am afraid this will make the training process very slow. Another solution is changing the Python version, you can refer to this for more details. Hope this will help you!

Thank you @Wuziyi616, I will follow your comments and fix them. I will notify you when I do successfully. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants