alexgkendall / SegNet-Tutorial

Files for a tutorial to train SegNet for road scenes using the CamVid dataset
http://mi.eng.cam.ac.uk/projects/segnet/tutorial.html
847 stars 517 forks source link

Not able to replicate accuracies and Mean IoU #134

Open umadevis opened 6 years ago

umadevis commented 6 years ago

Hai,

I downloaded segnet_basic_camvid.caffemodel from http://mi.eng.cam.ac.uk/~agk34/resources/SegNet/segnet_basic_camvid.caffemodel and tried to run the test_segmentation_camvid.py.

I am getting output image like below. camvid_basic

I am also trying to calculate the accuracies and mean IoU using the matlab script , compute_test_results.m I am getting different values(low values, eg : class average accuracy is :0.088442) than the values quoted in the SegNet tutorial site.

Command I used for testing is
python test_segmentation_camvid.py --model ../Models/segnet_basic_inference.prototxt --weights ../weights/segnet_basic_camvid.caffemodel --iter 233

I saved the predicted images by adding following line "test_segmentation_camvid.py" ind = np.argmax(output, axis=0) cv2.imwrite(output_image,ind) // newly added line.

How to get good segmented output.? Please let me know the steps to get quoted accuracies and Mean IoU.