Wuziyi616/CFUN

json file format

dmolony3 opened this issue · 9 comments

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

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"},
...
]
}

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.

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.

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.

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

@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.

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!

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.