Preliminaries

This week, our focus remained on enhancing our model’s performance, especially in the area of obstacle avoidance. Despite the agent’s attempts to decelerate when detecting a vehicle ahead, it doesn’t employ the brake efficiently, leading to frequent collisions. To address this, we adjusted the L1 loss used during training, giving more emphasis to braking than to throttle or steering. We also made progress in integrating traffic generation functionality within Behavior Metrics.

Objectives

  • Adjust driving score weights
  • Modify the L1 loss weights for training
  • Adjust the model-autopilot driving balance for DAgger data collection
  • Continue integration with Behavior Metrics platform

Execution

Weighted L1 Score

Our primary concern is the agent’s inadequate braking response. The image below, showing ground truth versus model predictions on the validation set, underscores this deficiency. Note that the model’s predicted braking remains at zero regardless of the true label value, suggesting a failure to grasp appropriate braking instances.

Previously, our training has been using the L1 loss. In an effort to better capture braking nuances, we shifted to a weighted L1 loss, assigning weights of 2:1:5 to throttle, steering, and braking, respectively. The intention was to encourage the model to prioritize learning about braking. However, as shown below, this alteration had minimal impact on the model’s learning pattern.

Other Ideas: Auxiliary Tasks

As mentioned above, our effort to improve the model’s performance in obstacle avoidance by reweighing the L1 loss didn’t quite work. This persistent issue suggests that we may need to re-evaluate our data, consider other model architectures, or explore alternative training strategies. One of the ideas we have is to train with auxiliary tasks. Here are some auxiliary tasks we might consider:

  • Braking Prediction: By making the model anticipate when it should brake, it could enhance its real-time braking responses.
  • Obstacle Distance Estimation: Predicting the distance to the nearest obstacle could help in modulating speed and deciding when to brake.
  • Speed Prediction: By predicting its next speed, the model might better adjust throttle and braking actions based on upcoming conditions.

Traffic Generation in Behavior Metrics

The user can now specify the number of other vehicles and pedestrians while configuring for the scenario in Behavior Metrics using the yaml config file. An example showcased below demonstrates a scenario where the street is populated by other vehicles. Importantly, these vehicles are set in motion only once the user initiates the ‘start’ and will halt once the agent stops. Switching from asynchronous to synchronous mode in CARLA facilitates this synchronization. We will shortly open a PR for this feature, inviting feedback before finalizing the update.