afm_cvpr2019 icon indicating copy to clipboard operation
afm_cvpr2019 copied to clipboard

error"python preparation_york.py" KeyError:'line'

Open shuttworth opened this issue 3 years ago • 6 comments

here are some errors image how to solve it?

shuttworth avatar Aug 07 '21 02:08 shuttworth

I find the data struct is different from described on website. So you read like this: 'P1020171/P1020171.jpg' and 'P1020171/P1020171LinesAndVP.mat'? Also key_word "lines" is in *LinesAndVP.mat.

SueeH avatar Aug 17 '21 09:08 SueeH

I find the data struct is different from described on website. So you read like this: 'P1020171/P1020171.jpg' and 'P1020171/P1020171LinesAndVP.mat'? Also key_word "lines" is in *LinesAndVP.mat.

yes,it is different from described on website. It's the same with 'P1020171/P1020171.jpg' and 'P1020171/P1020171LinesAndVP.mat' The temporary solution is not to execute “python preparation_york.py”

Do you have some good ideas?

shuttworth avatar Aug 17 '21 09:08 shuttworth

I find the data struct is different from described on website. So you read like this: 'P1020171/P1020171.jpg' and 'P1020171/P1020171LinesAndVP.mat'? Also key_word "lines" is in *LinesAndVP.mat.

yes,it is different from described on website. It's the same with 'P1020171/P1020171.jpg' and 'P1020171/P1020171LinesAndVP.mat' The temporary solution is not to execute “python preparation_york.py”

Do you have some good ideas? I modified code in preparation_york.py like : $ test_lst = glob.glob(osp.join(data_root,'P*')) $ test_lst = [osp.basename(f) for f in test_lst] $def load_datum(filename): $ image = cv2.imread(osp.join(data_root,filename,filename)+'.jpg') $ lsgs = sio.loadmat(osp.join(data_root,filename,filename)+'LinesAndVP.mat')['lines'] mainly changed target pic path and mat path. Then run OK

SueeH avatar Aug 18 '21 07:08 SueeH

I find the data struct is different from described on website. So you read like this: 'P1020171/P1020171.jpg' and 'P1020171/P1020171LinesAndVP.mat'? Also key_word "lines" is in *LinesAndVP.mat.

yes,it is different from described on website. It's the same with 'P1020171/P1020171.jpg' and 'P1020171/P1020171LinesAndVP.mat' The temporary solution is not to execute “python preparation_york.py” Do you have some good ideas? I modified code in preparation_york.py like : $ test_lst = glob.glob(osp.join(data_root,'P*')) $ test_lst = [osp.basename(f) for f in test_lst] $def load_datum(filename): $ image = cv2.imread(osp.join(data_root,filename,filename)+'.jpg') $ lsgs = sio.loadmat(osp.join(data_root,filename,filename)+'LinesAndVP.mat')['lines'] mainly changed target pic path and mat path. Then run OK

Thanks for your reply. I did it like what you had done. It's ok now.Thanks!! My requirement is to train the images in outside scenes. Have you train the "york" dataset? I read the "afm_atrous.yaml" and "readme.md",only "wireframe" can train,the "york" folder can only be tested. The "wireframe" folder have the "train.json" ,while the "york" folder didn't Do you have some ideas? thank you!

shuttworth avatar Aug 19 '21 09:08 shuttworth

I find the data struct is different from described on website. So you read like this: 'P1020171/P1020171.jpg' and 'P1020171/P1020171LinesAndVP.mat'? Also key_word "lines" is in *LinesAndVP.mat.

yes,it is different from described on website. It's the same with 'P1020171/P1020171.jpg' and 'P1020171/P1020171LinesAndVP.mat' The temporary solution is not to execute “python preparation_york.py” Do you have some good ideas? I modified code in preparation_york.py like : $ test_lst = glob.glob(osp.join(data_root,'P*')) $ test_lst = [osp.basename(f) for f in test_lst] $def load_datum(filename): $ image = cv2.imread(osp.join(data_root,filename,filename)+'.jpg') $ lsgs = sio.loadmat(osp.join(data_root,filename,filename)+'LinesAndVP.mat')['lines'] mainly changed target pic path and mat path. Then run OK

Thanks for your reply. I did it like what you had done. It's ok now.Thanks!! My requirement is to train the images in outside scenes. Have you train the "york" dataset? I read the "afm_atrous.yaml" and "readme.md",only "wireframe" can train,the "york" folder can only be tested. The "wireframe" folder have the "train.json" ,while the "york" folder didn't Do you have some ideas? thank you! On the way of training .

SueeH avatar Aug 20 '21 01:08 SueeH

I find the data struct is different from described on website. So you read like this: 'P1020171/P1020171.jpg' and 'P1020171/P1020171LinesAndVP.mat'? Also key_word "lines" is in *LinesAndVP.mat.

yes,it is different from described on website. It's the same with 'P1020171/P1020171.jpg' and 'P1020171/P1020171LinesAndVP.mat' The temporary solution is not to execute “python preparation_york.py” Do you have some good ideas? I modified code in preparation_york.py like : $ test_lst = glob.glob(osp.join(data_root,'P*')) $ test_lst = [osp.basename(f) for f in test_lst] $def load_datum(filename): $ image = cv2.imread(osp.join(data_root,filename,filename)+'.jpg') $ lsgs = sio.loadmat(osp.join(data_root,filename,filename)+'LinesAndVP.mat')['lines'] mainly changed target pic path and mat path. Then run OK

Thanks for your reply. I did it like what you had done. It's ok now.Thanks!! My requirement is to train the images in outside scenes. Have you train the "york" dataset? I read the "afm_atrous.yaml" and "readme.md",only "wireframe" can train,the "york" folder can only be tested. The "wireframe" folder have the "train.json" ,while the "york" folder didn't Do you have some ideas? thank you! On the way of training .

okay , I'm waiting for your reply~ If possible,My email is [email protected] We can email each other~

shuttworth avatar Aug 20 '21 01:08 shuttworth