Luca96 / carla-driving-rl-agent

Code for the paper "Reinforced Curriculum Learning for Autonomous Driving in CARLA" (ICIP 2021)
MIT License
108 stars 25 forks source link

Result Visualization ? #32

Open Andrea010725 opened 2 weeks ago

Andrea010725 commented 2 weeks ago

Is there a part of the code that involves visualizing the data for the algorithm's returns and values? If so, in what part of the code?

Luca96 commented 2 weeks ago

Hi @Andrea010725. You can use the CARLACollectWrapper to record all the inputs, outputs, and intermediate values (e.g., rewards, returns, etc) which are all saved as traces (i.e., npz compressed files that you can open with numpy) by serialize(): this is done automatically by Stage.collect(). Moreover, you can use this notebook to visualize the collected traces. Otherwise, if you want to visualize some statistics while the agent interacts with the environment, you could extend an existing environment (the render method) adding your custom visualizations.