pkuCactus / BDCN

The code for the CVPR2019 paper Bi-Directional Cascade Network for Perceptual Edge Detection
MIT License
341 stars 71 forks source link

How to prepare test_pair.lst for test.py? #38

Open za13 opened 3 years ago

za13 commented 3 years ago

I downloaded the HED-BSDS dataset and placed it in the /BDCN directory.

I then downloaded the BSR dataset from https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/resources.html

I see in cfg.py for test_pair.lst, it says

'data_root': 'path_to/bsds500/BSR/BSDS500/data/',
'data_lst': 'test_pair.lst'

But there is no test_pair.lst in that BSR data set

Am I supposed to use the test.lst in the HED-BSDS to create test_pair.lst for /BSR/BSDS500/data/test_pair.lst? Or create my own test_pair.lst that looks something like below?

images/test/100007.jpg groundTruth/test/100007.mat
images/test/100039.jpg groundTruth/test/100039.mat
...

If I try the latter, I get an error in test.py:

assert len(testloader) == len(nm)
pkuCactus commented 3 years ago

Yes, the lst file just provide the list of file to be infered. And the second column will not be used when evaluation. The reason to this is that i want to use the dataloader to prepare the data when test. Of course, you can also infer with only images.