edge_eval_python
edge_eval_python copied to clipboard
How do I use this evaluation functions to evaluate my dataset?
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?
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))
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
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?
#1 I will check it soon.
#1 I will check it soon.
Thank you for taking your time to examine my ideas
Thanks for your feedback, code updated.
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?
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.