-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running repo #1
Comments
Hi,
In order to run this repository, You need place the "code" directory inside "PythonAPI" directory of carla. Then:
Unfortunately, I cannot upload the weights of my trained model, since it exceeds the size limit. If you have any issues, please contact me. |
Thanks a lot for your help ,I have a question does your project follow traffic light and traffic sign rules? |
Traffic lights 7 signs are enabled only for NPC Vehicles to obey them. NPC Vehicles work in auto-pilot mode, so they are expected to stop when required. My agent does not obey to traffic lights. However, when there other vehicles in front of him, waiting for the green light, my agent will wait as well. |
Thanks a lot for your help🙏I have made |
10000 Iterations are a bit low. It took me 200000 iterations to train the vehicle... However, as I mention in project's readme, there are things You can do to improve the training performance.
The above process is called Transfer Learning. Another thing You could try is create a better QNetwork. Currently, my network uses a single Convolutional Layer only. You could try adding more layers. |
Can you tell me the steps to do transfer learning I mean how to use the weight of previous training to initialize current training , what should I do to be able to do transfer learning |
Open the file "straight_lane_agent_c51_training.py" and check the lines 161-169:
The train_checkpointer calls the initialize_or_restore() method, which checks to see If there are any previous checkpoints inside the checkpoint directory. So, in order to do transfer learning, just temporarily remove any cars that are spawned during the training. This can be done by disabling the traffic_manager in the environment/simulation.py file. Later, You can enable the traffic_manager and run the straight_lane_agent_c51_training.py again. The weights of the previous training should automatically be loaded in the agent. !! Important !! This agent was trained with an NVIDIA GTX980. If you have more powerful GPU, increasing the parameters & layers of the Categorical Q Network will result in faster training, which means less iterations for your training. |
Thanks a lot for your help , I have a question can you tell me how to disable traffic manager? |
Just remove the lines associated with the traffic manager in the environment/simulation.py in order to remove the vehicles from the scene. |
Thanks a lot for your help , |
The agent is currenly being trained on avoiding collision with vehicles. Of course You are welcome to expand and improve the agent by addining pedestrians to the environment. In order to do that, You need to add 3 steps: Step 1.
For example, the vehicles are spawned in the simulation.py file in the line: traffic_manager.spawn_vehicles() at the reset() method. You could add a method (e.g. spawn_pedestrians()) in the traffic manager that does the same with pedestrians. Note: There is an example in the carla directory that already shows you how to add pedestrians. The file is inside the examples directory in the PythonAPI folder and is called: spawn_npc.py Step 2. Also You need to check the segmentation color of the pedestrians: I think it is a red color. Then, You need to modify the simulation/image_data_utils.py, in order to add the pedestrians in the observation as well. Step 3. |
Hi thanks a lot for your help |
Hi, Carla's dev team has already developed a rule-based agent that obeys the traffic lights. You can find the code of the agent inside the file: PythonApi/carla/agents/navigation/basic_agent.py |
Hi, can you share with us libraries versions that you have used please |
Sure, I will add a documentation today |
Hi ,Hope you are well
Hi , I was trying to run this repo but I can’t , can you please tell me how to make testing after training and validation?
What Carla version fits this repo?
I have Carla 0.9.11 ,does it suit your model?
Can I use CPU instead of GPU?
can I run this repo on windows?
Sorry for making it long .
Thanks in advance
The text was updated successfully, but these errors were encountered: