[go: up one dir, main page]

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

problem of dataset.py #6

Open
zwz-append opened this issue Dec 3, 2022 · 11 comments
Open

problem of dataset.py #6

zwz-append opened this issue Dec 3, 2022 · 11 comments

Comments

@zwz-append
Copy link

lin271 ith open(list_name) as f:
files = json.load(f)
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I can't deal it? Thank you for your testing

@kadirnar
Copy link
kadirnar commented Dec 5, 2022

Hello @zwz-append ,

Is the .lst file like this?

[["edges/imgs/test/rgbr/RGB_008.jpg", "edges/edge_maps/test/rgbr/RGB_008.png"], ["edges/imgs/test/rgbr/RGB_010.jpg", "edges/edge_maps/test/rgbr/RGB_010.png"], ["edges/imgs/test/rgbr/RGB_017.jpg", "edges/edge_maps/test/rgbr/RGB_017.png"], ["edges/imgs/test/rgbr/RGB_025.jpg", "edges/edge_maps/test/rgbr/RGB_025.png"], ["edges/imgs/test/rgbr/RGB_029.jpg", "edges/edge_maps/test/rgbr/RGB_029.png"], ["edges/imgs/test/rgbr/RGB_033.jpg", "edges/edge_maps/test/rgbr/RGB_033.png"], ["edges/imgs/test/rgbr/RGB_035.jpg", "edges/edge_maps/test/rgbr/RGB_035.png"], ["edges/imgs/test/rgbr/RGB_039.jpg", "edges/edge_maps/test/rgbr/RGB_039.png"], ["edges/imgs/test/rgbr/RGB_042.jpg", "edges/edge_maps/test/rgbr/RGB_042.png"], ["edges/imgs/test/rgbr/RGB_052.jpg", "edges/edge_maps/test/rgbr/RGB_052.png"], ["edges/imgs/test/rgbr/RGB_056.jpg", "edges/edge_maps/test/rgbr/RGB_056.png"], ["edges/imgs/test/rgbr/RGB_057.jpg", "edges/edge_maps/test/rgbr/RGB_057.png"], ["edges/imgs/test/rgbr/RGB_059.jpg", "edges/edge_maps/test/rgbr/RGB_059.png"], ["edges/imgs/test/rgbr/RGB_066.jpg", "edges/edge_maps/test/rgbr/RGB_066.png"], ["edges/imgs/test/rgbr/RGB_067.jpg", "edges/edge_maps/test/rgbr/RGB_067.png"], ["edges/imgs/test/rgbr/RGB_070.jpg", "edges/edge_maps/test/rgbr/RGB_070.png"], ["edges/imgs/test/rgbr/RGB_071.jpg", "edges/edge_maps/test/rgbr/RGB_071.png"], ["edges/imgs/test/rgbr/RGB_075.jpg", "edges/edge_maps/test/rgbr/RGB_075.png"], ["edges/imgs/test/rgbr/RGB_081.jpg", "edges/edge_maps/test/rgbr/RGB_081.png"], ["edges/imgs/test/rgbr/RGB_083.jpg", "edges/edge_maps/test/rgbr/RGB_083.png"], ["edges/imgs/test/rgbr/RGB_090.jpg", "edges/edge_maps/test/rgbr/RGB_090.png"], ["edges/imgs/test/rgbr/RGB_092.jpg", "edges/edge_maps/test/rgbr/RGB_092.png"], ["edges/imgs/test/rgbr/RGB_094.jpg", "edges/edge_maps/test/rgbr/RGB_094.png"], ["edges/imgs/test/rgbr/RGB_098.jpg", "edges/edge_maps/test/rgbr/RGB_098.png"], ["edges/imgs/test/rgbr/RGB_102.jpg", "edges/edge_maps/test/rgbr/RGB_102.png"], ["edges/imgs/test/rgbr/RGB_107.jpg", "edges/edge_maps/test/rgbr/RGB_107.png"], ["edges/imgs/test/rgbr/RGB_111.jpg", "edges/edge_maps/test/rgbr/RGB_111.png"], ["edges/imgs/test/rgbr/RGB_120.jpg", "edges/edge_maps/test/rgbr/RGB_120.png"], ["edges/imgs/test/rgbr/RGB_124.jpg", "edges/edge_maps/test/rgbr/RGB_124.png"], ["edges/imgs/test/rgbr/RGB_132.jpg", "edges/edge_maps/test/rgbr/RGB_132.png"], ["edges/imgs/test/rgbr/RGB_138.jpg", "edges/edge_maps/test/rgbr/RGB_138.png"], ["edges/imgs/test/rgbr/RGB_139.jpg", "edges/edge_maps/test/rgbr/RGB_139.png"], ["edges/imgs/test/rgbr/RGB_141.jpg", "edges/edge_maps/test/rgbr/RGB_141.png"], ["edges/imgs/test/rgbr/RGB_145.jpg", "edges/edge_maps/test/rgbr/RGB_145.png"], ["edges/imgs/test/rgbr/RGB_160.jpg", "edges/edge_maps/test/rgbr/RGB_160.png"], ["edges/imgs/test/rgbr/RGB_170.jpg", "edges/edge_maps/test/rgbr/RGB_170.png"], ["edges/imgs/test/rgbr/RGB_181.jpg", "edges/edge_maps/test/rgbr/RGB_181.png"], ["edges/imgs/test/rgbr/RGB_182.jpg", "edges/edge_maps/test/rgbr/RGB_182.png"], ["edges/imgs/test/rgbr/RGB_190.jpg", "edges/edge_maps/test/rgbr/RGB_190.png"], ["edges/imgs/test/rgbr/RGB_192.jpg", "edges/edge_maps/test/rgbr/RGB_192.png"], ["edges/imgs/test/rgbr/RGB_206.jpg", "edges/edge_maps/test/rgbr/RGB_206.png"], ["edges/imgs/test/rgbr/RGB_212.jpg", "edges/edge_maps/test/rgbr/RGB_212.png"], ["edges/imgs/test/rgbr/RGB_214.jpg", "edges/edge_maps/test/rgbr/RGB_214.png"], ["edges/imgs/test/rgbr/RGB_226.jpg", "edges/edge_maps/test/rgbr/RGB_226.png"], ["edges/imgs/test/rgbr/RGB_228.jpg", "edges/edge_maps/test/rgbr/RGB_228.png"], ["edges/imgs/test/rgbr/RGB_234.jpg", "edges/edge_maps/test/rgbr/RGB_234.png"], ["edges/imgs/test/rgbr/RGB_237.jpg", "edges/edge_maps/test/rgbr/RGB_237.png"], ["edges/imgs/test/rgbr/RGB_247.jpg", "edges/edge_maps/test/rgbr/RGB_247.png"], ["edges/imgs/test/rgbr/RGB_248.jpg", "edges/edge_maps/test/rgbr/RGB_248.png"], ["edges/imgs/test/rgbr/RGB_254.jpg", "edges/edge_maps/test/rgbr/RGB_254.png"]]

@xavysp
Copy link
Owner
xavysp commented Dec 16, 2022

Guys did you solve this issue?

@zwz-append
Copy link
Author

Hello @zwz-append ,

Is the .lst file like this?

[["edges/imgs/test/rgbr/RGB_008.jpg", "edges/edge_maps/test/rgbr/RGB_008.png"], ["edges/imgs/test/rgbr/RGB_010.jpg", "edges/edge_maps/test/rgbr/RGB_010.png"], ["edges/imgs/test/rgbr/RGB_017.jpg", "edges/edge_maps/test/rgbr/RGB_017.png"], ["edges/imgs/test/rgbr/RGB_025.jpg", "edges/edge_maps/test/rgbr/RGB_025.png"], ["edges/imgs/test/rgbr/RGB_029.jpg", "edges/edge_maps/test/rgbr/RGB_029.png"], ["edges/imgs/test/rgbr/RGB_033.jpg", "edges/edge_maps/test/rgbr/RGB_033.png"], ["edges/imgs/test/rgbr/RGB_035.jpg", "edges/edge_maps/test/rgbr/RGB_035.png"], ["edges/imgs/test/rgbr/RGB_039.jpg", "edges/edge_maps/test/rgbr/RGB_039.png"], ["edges/imgs/test/rgbr/RGB_042.jpg", "edges/edge_maps/test/rgbr/RGB_042.png"], ["edges/imgs/test/rgbr/RGB_052.jpg", "edges/edge_maps/test/rgbr/RGB_052.png"], ["edges/imgs/test/rgbr/RGB_056.jpg", "edges/edge_maps/test/rgbr/RGB_056.png"], ["edges/imgs/test/rgbr/RGB_057.jpg", "edges/edge_maps/test/rgbr/RGB_057.png"], ["edges/imgs/test/rgbr/RGB_059.jpg", "edges/edge_maps/test/rgbr/RGB_059.png"], ["edges/imgs/test/rgbr/RGB_066.jpg", "edges/edge_maps/test/rgbr/RGB_066.png"], ["edges/imgs/test/rgbr/RGB_067.jpg", "edges/edge_maps/test/rgbr/RGB_067.png"], ["edges/imgs/test/rgbr/RGB_070.jpg", "edges/edge_maps/test/rgbr/RGB_070.png"], ["edges/imgs/test/rgbr/RGB_071.jpg", "edges/edge_maps/test/rgbr/RGB_071.png"], ["edges/imgs/test/rgbr/RGB_075.jpg", "edges/edge_maps/test/rgbr/RGB_075.png"], ["edges/imgs/test/rgbr/RGB_081.jpg", "edges/edge_maps/test/rgbr/RGB_081.png"], ["edges/imgs/test/rgbr/RGB_083.jpg", "edges/edge_maps/test/rgbr/RGB_083.png"], ["edges/imgs/test/rgbr/RGB_090.jpg", "edges/edge_maps/test/rgbr/RGB_090.png"], ["edges/imgs/test/rgbr/RGB_092.jpg", "edges/edge_maps/test/rgbr/RGB_092.png"], ["edges/imgs/test/rgbr/RGB_094.jpg", "edges/edge_maps/test/rgbr/RGB_094.png"], ["edges/imgs/test/rgbr/RGB_098.jpg", "edges/edge_maps/test/rgbr/RGB_098.png"], ["edges/imgs/test/rgbr/RGB_102.jpg", "edges/edge_maps/test/rgbr/RGB_102.png"], ["edges/imgs/test/rgbr/RGB_107.jpg", "edges/edge_maps/test/rgbr/RGB_107.png"], ["edges/imgs/test/rgbr/RGB_111.jpg", "edges/edge_maps/test/rgbr/RGB_111.png"], ["edges/imgs/test/rgbr/RGB_120.jpg", "edges/edge_maps/test/rgbr/RGB_120.png"], ["edges/imgs/test/rgbr/RGB_124.jpg", "edges/edge_maps/test/rgbr/RGB_124.png"], ["edges/imgs/test/rgbr/RGB_132.jpg", "edges/edge_maps/test/rgbr/RGB_132.png"], ["edges/imgs/test/rgbr/RGB_138.jpg", "edges/edge_maps/test/rgbr/RGB_138.png"], ["edges/imgs/test/rgbr/RGB_139.jpg", "edges/edge_maps/test/rgbr/RGB_139.png"], ["edges/imgs/test/rgbr/RGB_141.jpg", "edges/edge_maps/test/rgbr/RGB_141.png"], ["edges/imgs/test/rgbr/RGB_145.jpg", "edges/edge_maps/test/rgbr/RGB_145.png"], ["edges/imgs/test/rgbr/RGB_160.jpg", "edges/edge_maps/test/rgbr/RGB_160.png"], ["edges/imgs/test/rgbr/RGB_170.jpg", "edges/edge_maps/test/rgbr/RGB_170.png"], ["edges/imgs/test/rgbr/RGB_181.jpg", "edges/edge_maps/test/rgbr/RGB_181.png"], ["edges/imgs/test/rgbr/RGB_182.jpg", "edges/edge_maps/test/rgbr/RGB_182.png"], ["edges/imgs/test/rgbr/RGB_190.jpg", "edges/edge_maps/test/rgbr/RGB_190.png"], ["edges/imgs/test/rgbr/RGB_192.jpg", "edges/edge_maps/test/rgbr/RGB_192.png"], ["edges/imgs/test/rgbr/RGB_206.jpg", "edges/edge_maps/test/rgbr/RGB_206.png"], ["edges/imgs/test/rgbr/RGB_212.jpg", "edges/edge_maps/test/rgbr/RGB_212.png"], ["edges/imgs/test/rgbr/RGB_214.jpg", "edges/edge_maps/test/rgbr/RGB_214.png"], ["edges/imgs/test/rgbr/RGB_226.jpg", "edges/edge_maps/test/rgbr/RGB_226.png"], ["edges/imgs/test/rgbr/RGB_228.jpg", "edges/edge_maps/test/rgbr/RGB_228.png"], ["edges/imgs/test/rgbr/RGB_234.jpg", "edges/edge_maps/test/rgbr/RGB_234.png"], ["edges/imgs/test/rgbr/RGB_237.jpg", "edges/edge_maps/test/rgbr/RGB_237.png"], ["edges/imgs/test/rgbr/RGB_247.jpg", "edges/edge_maps/test/rgbr/RGB_247.png"], ["edges/imgs/test/rgbr/RGB_248.jpg", "edges/edge_maps/test/rgbr/RGB_248.png"], ["edges/imgs/test/rgbr/RGB_254.jpg", "edges/edge_maps/test/rgbr/RGB_254.png"]]

hello,@kadirnar. thank you for your replying. The file of 'test_pair.lst' is same as you.

@zwz-append
Copy link
Author

Guys did you solve this issue?

hello, @xavysp. I have solved the above issue. But,I meet a new issue about issue. "TypeError: '>' not supported between instances of 'int' and 'NoneType'" ### in lin 491 of dataset.py. I set parameters as you. Do you konw how to address this issue.

@kadirnar
Copy link

Guys did you solve this issue?

hello, @xavysp. I have solved the above issue. But,I meet a new issue about issue. "TypeError: '>' not supported between instances of 'int' and 'NoneType'" ### in lin 491 of dataset.py. I set parameters as you. Do you konw how to address this issue.

I fixed it by updating the image_size code.
https://github.com/xavysp/LDC/blob/main/utils/img_processing.py#L47

image_vis = cv2.resize(image_vis, dsize=(img_shape[1], img_shape[0]))

@zwz-append
Copy link
Author

I fixed it by updating the image_size code.

I have checked the code in img_processing.py#L47. It is same with the above code you sented me.
image

@kadirnar
Copy link

I am sorry. Can you tell me the output of crop_size and img.shape? It throws an error because there is no Int object.

I don't remember what I changed, but I am training in colab with these codes.
https://github.com/kadirnar/Pytorch-LDC

@zwz-append
Copy link
Author

Thanks @kadirnar. I have found 'crop_size -> None, img.shape (720, 1280, 3)'. What can i do to adjust the crop_size.
image

@kadirnar
Copy link

If you can share the codes on github I can help.

Crop_Size: 352
https://github.com/xavysp/LDC/blob/main/main.py#L329-L336

@zwz-append
Copy link
Author

If you can share the codes on github I can help.

Crop_Size: 352 https://github.com/xavysp/LDC/blob/main/main.py#L329-L336

Thanks @ kadirnar. I have checked and changed my code https://github.com/xavysp/LDC/blob/main/main.py#L329-L336 as you showed me. The img_width == 352, but the img_heigth == 480, so I have changed both paremeters == 352. That's ok. Thanks!

@poetry00
Copy link

If you can share the codes on github I can help.
Crop_Size: 352 https://github.com/xavysp/LDC/blob/main/main.py#L329-L336

Thanks @ kadirnar. I have checked and changed my code https://github.com/xavysp/LDC/blob/main/main.py#L329-L336 as you showed me. The img_width == 352, but the img_heigth == 480, so I have changed both paremeters == 352. That's ok. Thanks!

hi!Have you finished reproducing this code?Please help me if you can.

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

4 participants