Lane Detection Model Not Producing Any Results

Hello! I’m very new to this so please excuse any obvious mistakes.

I want to create a computer vision model in pytorch that will detect and highlight lane markers on the road using a live video feed. This is mainly for learning purposes as I know models like this already exist.

I wanted to start training with a very low count of training images because I want to make sure this all works before I spend time creating masks for more images.

I was able to train a simple segmentation model that I found online. During training, the loss was going down. Once the training finished, I tried to pass one of the training images through the model, but the results I got were unexpected.

After “denormalizing” the output mask and applying it to the input image using cv2, it was just completely blank.

Can you take a look at my code and see if anything jumps out at you as being incorrect?

Some things I can think of that might be causing this:

  • Model is too simple for this task
  • Not enough training data (I know this is true, but I was expecting at least some results)
  • My normalization/denormalization is wrong

Thanks in advance!

https://github.com/joeysantana3/lane-detection/blob/master/Lane-Detection-Complete.ipynb

Hi Joey, did you check the prediction output whether it’s normalized?
If I understand it correctly, your prediction should be a sigmoid output according to predict() function. In your case the mask ranges between 0. and 1. Thus I would transform the output to 0…255 value range and check if it works.