Training of the Drive Model#
This page gives the training ladder of the drive model and the student that drives from the sensors of the vehicle.
Sources: Vehicle/Policy/acres_policy (teacher.py, student.py, sft.py, unreal.py), Benchmark/acres_bench/drive/train (ppo.py, grpo.py, grpo_drive.py, dagger.py). Recipes: Benchmark/acres_bench/drive/train/recipes/train.sh, Benchmark/acres_bench/drive/eval/recipes/. The models, the runs and the results are in Data/Drive (ACRES_DRIVE_DATA), not in git.
The Ladder#
The ladder is: the search reference, behavior cloning, DAgger, PPO, GRPO, then GRPO again with the corridor (GRPO-ck). The reward of each step is the score of the drive judge.
The GRPO recipe uses the vehicle-matched simulator defaults. Each run needs a new name.
The run record (<out>.run.json) and checkpoints store the seed, training arguments, simulator settings, software versions, and hash of the starting checkpoint.
--seed seeds both PyTorch and the simulator. The trainer saves each checkpoint to a temporary file before it replaces the destination.
The Student#
The teacher (Data/Drive/models/paper/ppo.pt) reads 458 numbers. The vehicle has 362 of them. It must get the other 96 from its sensors.
| Block of the Observation of the Teacher | Size | On the Vehicle |
|---|---|---|
| Ego: speed, gear, curvature, plan progress, shield, stall, time, ground limit | 11 | Yes (the state and the plan) |
| The route ahead: 24 points, gear, length left | 73 | Yes (the mission) |
| The clearance grid of the corridor, 21 x 13 cells | 273 | Yes (the corridor of the map) |
| The 8 nearest actors: position, heading, size, velocity, kind, present | 96 | No: the camera and the LiDAR |
| The last verdict of the checker | 5 | Yes (the checker runs on the vehicle) |
A static obstacle of a scenario (a bale, a parked car) is an actor here, because it is not in the map.
Network#
- Sensor encoder (
student.py).- LiDAR: two scans (now and 0.5 s before) as bird's-eye grids, x -40 m to 60 m, y ±30 m, cells of 0.5 m. Each cell has the count, the highest and the lowest point, and the strongest intensity (
sft.py cache). The encoder drops the returns nearer than 1.6 m (the body of the vehicle). A small U-Net encodes the grids. - Camera: the front image at 448 x 256 through ResNet-18 (ImageNet weights), pooled to one vector. The encoder adds it, with the 362 known numbers and the last actions, to the deepest LiDAR features.
- LiDAR: two scans (now and 0.5 s before) as bird's-eye grids, x -40 m to 60 m, y ±30 m, cells of 0.5 m. Each cell has the count, the highest and the lowest point, and the strongest intensity (
- Actor head (CenterNet). On cells of 1 m, it gives a heat map of the actor centers for each kind (focal loss). At each center it gives the offset, the heading, the size and the velocity (L1 loss). The 8 strongest peaks above 0.3, nearest first, fill the actor block of the teacher.
- Policy. The network of the teacher reads the 362 known numbers and the predicted actor block. It starts with the weights of the teacher. The loss has three terms. The first is the KL divergence from the logits of the teacher over the accepted actions. The others are the cross-entropy on the choice of the teacher and BCE on keep.
- At run time the student ranks the actions and ACRES Core checks them. The student never drives an action that the checker refused.
The training has two phases. Phase (a) trains the actor head alone, with the policy of the teacher frozen. Phase (b) trains end to end with the policy loss and the actor loss as an auxiliary term.
Data#
Data/Drive/runs/unreal_train/*.npz: 532 episodes of the game, approximately 46,000 decisions with 5 sensor frames each. The training uses 90 % of the episodes. The other 10 % are the held-out set.- The training does not use the decisions of a stuck stretch (speed below 0.05 m/s and no accepted candidate for more than 10 s). Their labels repeat and teach the policy to wait.
- On the held-out decisions, the teacher with the true actor block agrees with the recorded choice in 100 % of the decisions. With no actors, it agrees in 72.9 %. The student must close this gap.
- Augmentation: dropout of LiDAR rings and columns, range noise, camera color jitter, and a random intensity and dropped points in the cells of a person.
- The game draws the height of each person from 1.55 m to 1.9 m (
unreal.py). - The closed-loop tests use
Data/Drive/runs/unreal_val(35 episodes).
Evaluation#
- Offline: the position error of the actors, the recall of the people within 20 m, the agreement with the teacher.
- Closed loop in the game (
acres_policy.unreal): success, contacts and timeouts of each family, against the teacher on the same 35 scenarios. - DAgger: the student drives the game, and the teacher labels the states that the student reaches.
Limits#
- The people of the game are cylinders for the LiDAR. On real scans at 3 m to 10 m, the shape agrees (height 1.65 m against 1.80 m, width 0.52 m against 0.52 m) but the intensity does not (it changes on real people, it is constant in the game). No measurement exists beyond 10 m.
- The camera encoder pools the whole image. It does not project the image into the bird's-eye grid.