edge_eval_python icon indicating copy to clipboard operation
edge_eval_python copied to clipboard

How do I use this evaluation functions to evaluate my dataset?

Open cainiaoqiuzhu opened this issue 3 years ago • 12 comments

Hello, thank you for translating this matlab eval_function into Python. I have some question about your edge_eval_python, how do I use this function to evaluate my dataset? I found that the GT files in the BSDS dataset are divided into 5 matrices, and in your edge_eval_python, five matrices are added up to make one matrix, as the final GT. But in my dataset, the GT files are just some png files, what should I do?

cainiaoqiuzhu avatar Mar 25 '21 01:03 cainiaoqiuzhu

assume that you have image {images_dir}/000012.jpg and gt {gt_dir}/000012/xxx.png

comment https://github.com/Walstruzz/edge_eval_python/blob/7ca20a685d753f71bbcd6347b2b7bba54e22c32c/impl/edges_eval_dir.py#L37 rewrite as

gt = [cv2.imread(g, cv2.IMREAD_UNCHANGED) for g in gt]

comment https://github.com/Walstruzz/edge_eval_python/blob/7ca20a685d753f71bbcd6347b2b7bba54e22c32c/impl/edges_eval_dir.py#L156 rewrite as

gt = os.path.join(gt_dir, "{}".format(i))

Walstruzz avatar Mar 26 '21 01:03 Walstruzz

Thank you for your reply. For the BSDS dataset, each image corresponds to five truth values, which are marked for five people, so in your code gt = [g.item()[1] for g in loadmat(gt)["groundTruth"][0]], gt is a list of length 5, I came up with a solution, for the GT, I converted the .PNG or .JPG to the .MAT, I made five copies of the same MAT matrix. Do you think this is a solution? Thank you so much again for you reply

cainiaoqiuzhu avatar Mar 27 '21 07:03 cainiaoqiuzhu

I used my idea to validate the BIPED dataset of the DexiNed(https://github.com/xavysp/DexiNed/tree/master/DexiNed-Pytorch), I got the result:ODS=0.868, OIS=0.877, AP=0.844. Comparing with the result of the paper:ODS=0.857, OIS=0.861, AP=0.805, I found that there are some differences. Do you agree with me?

cainiaoqiuzhu avatar Mar 27 '21 07:03 cainiaoqiuzhu

#1 I will check it soon.

Walstruzz avatar Mar 28 '21 02:03 Walstruzz

#1 I will check it soon.

Thank you for taking your time to examine my ideas

cainiaoqiuzhu avatar Mar 28 '21 07:03 cainiaoqiuzhu

Thanks for your feedback, code updated.

Walstruzz avatar Apr 13 '21 04:04 Walstruzz

I used my idea to validate the BIPED dataset of the DexiNed(https://github.com/xavysp/DexiNed/tree/master/DexiNed-Pytorch), I got the result:ODS=0.868, OIS=0.877, AP=0.844. Comparing with the result of the paper:ODS=0.857, OIS=0.861, AP=0.805, I found that there are some differences. Do you agree with me?

Hi @cainiaoqiuzhu how long it took?

xavysp avatar Oct 25 '21 23:10 xavysp

Thank you for your reply. For the BSDS dataset, each image corresponds to five truth values, which are marked for five people, so in your code gt = [g.item()[1] for g in loadmat(gt)["groundTruth"][0]], gt is a list of length 5, I came up with a solution, for the GT, I converted the .PNG or .JPG to the .MAT, I made five copies of the same MAT matrix. Do you think this is a solution? Thank you so much again for you reply

“gt is a list of length 5, I came up with a solution, for the GT, I converted the .PNG or .JPG to the .MAT,” How did you achieve this, thank you very much.

Miracle-zj avatar Apr 27 '22 12:04 Miracle-zj