Glutamat42 / Ultra-Fast-Lane-Detection

This is part of our master project. The projects goal is to adapt https://github.com/cfzd/Ultra-Fast-Lane-Detection for the model car of our university. Our results (including datasets and models) are available on our website: https://glutamat42.github.io/Ultra-Fast-Lane-Detection/
Other
4 stars 1 forks source link

Real-Time Carla Lane detection 0.9.11 #1

Closed k-nayak closed 2 years ago

k-nayak commented 2 years ago

Hello @Glutamat42,

I hope you are available to answer a few of my questions. I am very interested in the CARLA simulator 0.9.11 and how deep learning can be used in this simulator,

a. I found the lane detection model in Carla very interesting and wanted to know if I can replicate and try it on my machine, which has no GPU. Using the pre-trained weights available on your website.

b. Can I launch Carla and use this model to detect lanes in real-time? which script file do I use to do so?

I hope to hear from you soon.

Thanks in advance.

Glutamat42 commented 2 years ago

a) I never ran it on cpu, but it shouldn't be too complicated to modify the application to run on the cpu. Maybe its already enough to replace all .cuda() with .cpu() and .to('cuda') with .to('cpu')

b) A direct input from carla is not implemented. But you can use the screencap module. I did it with GTA that way and it worked fine.

I hope that helps you. Feel free to reply if you need further assistance.

k-nayak commented 2 years ago

thanks for such a quick response. Can you tell me which script file I have to edit for using the CPU?

I will look into the screencap module to see if I can input from Carla directly.

On what kind of data was this model used to detect lanes? was it an image or video? as seen on the main page of the repo.

Glutamat42 commented 2 years ago

thanks for such a quick response. Can you tell me which script file I have to edit for using the CPU?

just every occurrence in the whole project.

On what kind of data was this model used to detect lanes?

Short version: We collected a lot of frames while driving in carla (with a bot) and sampled the frames to be balanced based on different categories. The exact approach we used should be documented somewhere (it's been a while since we wrote the documentation :D)

I created a branch "cpu" where i did the changes required to run on cpu and based on the low fps after the changes it's running on the cpu. Also I did not see a process using the gpu. So i think it should work for you, but i did not test it on a computer without a nvidia gpu, so i might have overlooked something.

Here's the command i used to run it python ufld.py configs/simple13.py --mode runtime --input_mode screencap --output_mode video --video_out_enable_live_video 1 --video_out_enable_video_export 0 --video_out_enable_image_export 0 --batch_size 1 --trained_model /home/markus/Downloads/simple13_ep099.pth

You probably also want to change screencap_recording_area to match your carla window. But for a first test you can omit it.

k-nayak commented 2 years ago

Thanks again. I will try to implement Ultra fast lane detection in Carla for real-time detection and in case I run into an error I will stay in touch. Thanks again for the quick response.