fyangneil / pavement-crack-detection

333 stars 76 forks source link

Question #5

Open CNHNLP opened 5 years ago

CNHNLP commented 5 years ago

When I evaluate the result on my dataset, I need to process nms and thinned to one pixel wide on GT and crack detection . I run eval/nms_process.m to process nms,but how to thinned to one pixel wide, to run EvalEdge.m? Can you give some advice Thank you very much

fyangneil commented 5 years ago

@CNHNLP You can use 'edgesEvalDir' function in Structured Edge Detection Toolbox, set 'thin' to 1 and 'maxDist' to 0.0075.

CNHNLP commented 5 years ago

@fyangneil Thank you for your answer. I'm confused about the meaning of maxDist.Can you explain the maxDist how to calculate.Or give some papers to explain it?
Thanks a lot.

fyangneil commented 5 years ago

@CNHNLP i think the following link may help you. https://github.com/mmaire/hsa-bench/blob/master/benchmark/correspond/correspondPixels.m

CNHNLP commented 5 years ago

@fyangneil I am sorry to disturb you again.I use your train.caffemodel to evaluate your testcrop data,but the result is not good.The ODS is 0.502.OIS is 0.519 and AP is just 0.128.And the AIU score is 0.405. For the ground truth,I use the eval_edge.m to process nms function to the truth label and use double(bwmorph(E1,'thin',inf)) function to transform the label to thin 1 pixel. Then save the thinned ground truth label to mat file.Finally,I run eval_edge.m to evaluate the result. I only change plt.imsave(outputpath + image_name, 1 - scale_lst[i], cmap='gray') sio.savemat(outputpath + name, {'predmap': 1 - scale_lst[i]}) to misc.imsave(outputpath + image_name, scale_lst[i]) sio.savemat(outputpath + name, {'predmap': scale_lst[i]}) in the test.py. Is there any problems on the test process? Look forward to your reply.

fyangneil commented 5 years ago

@CNHNLP The evaluation tool is provided in the upated repo. Please check it out.

CNHNLP commented 5 years ago

@fyangneil I have used your evaltools to get the same result in your paper.Thank you very much!