KittiSeg icon indicating copy to clipboard operation
KittiSeg copied to clipboard

Pretrained model not working

Open tejus-gupta opened this issue 8 years ago • 5 comments

image

I segmented the following image using the pretrained model but didn't get good results. What could be the problem?

000618

tejus-gupta avatar Oct 05 '17 07:10 tejus-gupta

I have the same problem too.. There is probably some kind of specific format images must follow... so not every image work.. Did you manage to solve this?

dvirsamuel avatar Oct 20 '17 08:10 dvirsamuel

@tejus-gupta Can you share the associated code and sample image?

tushar-dadlani avatar Nov 26 '17 03:11 tushar-dadlani

I used the pretrained model for segmentation i.e. python demo.py --input_image data/demo/test_image.png

Test Image Link

tejus-gupta avatar Nov 26 '17 05:11 tejus-gupta

@tejus-gupta On initial observation between the Kitti dataset images with your image, I noticed that the brightness was much lesser in your sample image. I increased the brightness and got much better results. You might have to use something from opencv to do this programmatically all the time. Brighter test image test-image Raw output test-image_raw Red Blue intermediate image test-image_rb Green Prediction with threshold > 0.5 test-image_green

tushar-dadlani avatar Nov 26 '17 09:11 tushar-dadlani

FWIW, this piece of code makes the image brighter and still doesn't seem to improve the results for other dim-light input images.

def increase_brightness(img, value=30):
    hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
    h, s, v = cv2.split(hsv)

    lim = 255 - value
    v[v > lim] = 255
    v[v <= lim] += value

    final_hsv = cv2.merge((h, s, v))
    img = cv2.cvtColor(final_hsv, cv2.COLOR_HSV2BGR)
    return img

Upon passing on these dim-light images, the output doesn't detect ANY road - and the same happens with the brightened image as well. Any other hunch on how we could possibly proceed to make it more robust?

athityakumar avatar Oct 06 '18 07:10 athityakumar