ExplodingCB2 commited on
Commit
26b26ef
·
verified ·
1 Parent(s): ee68aa6

Add pictures to the model card: training frames and labels, a full lap, and the mask on held-out real footage

Browse files
.gitattributes CHANGED
@@ -33,3 +33,9 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ images/01-drape-before-after.png filter=lfs diff=lfs merge=lfs -text
37
+ images/02-expert-labels.png filter=lfs diff=lfs merge=lfs -text
38
+ images/07-drive-v5-lap-top-down.png filter=lfs diff=lfs merge=lfs -text
39
+ images/08-real-footage-heldout-typical.png filter=lfs diff=lfs merge=lfs -text
40
+ images/09-real-footage-heldout-worst.png filter=lfs diff=lfs merge=lfs -text
41
+ images/progress.png filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -16,6 +16,10 @@ A small camera-only driving model for an autonomous go-kart on the Purdue Grand
16
 
17
  > **Status: a simulator result, not a road-tested model.** It has never seen the kart's own camera and has never driven a real kart. See [What this does not show](#what-this-does-not-show).
18
 
 
 
 
 
19
  Code, training scripts, the simulator and the full version history are in the project repository: https://github.com/ExplodingCB/mcqueen-vip (branch `training-perception`, see `docs/13-driving-model-versions.md`).
20
 
21
  ## Files
@@ -27,6 +31,7 @@ Code, training scripts, the simulator and the full version history are in the pr
27
  | `checkpoints/drive-v4.pt` | drive-v3 plus real helmet-cam footage for the mask |
28
  | `checkpoints/drive-v6.pt` | Trained on a faster teacher line. Best open-loop numbers, but **does not complete laps**; included as a research result |
29
  | `model.py`, `driver.py`, `example.py` | Everything needed to load a checkpoint and run it on an image |
 
30
  | `laptime-v2-best.json` | The searched expert line (racing line offsets and speed limits) the faster teacher uses |
31
 
32
  ## Checksums (SHA-256)
@@ -56,6 +61,26 @@ mask, line, speed = driver.predict_drive(frame)
56
 
57
  The model assumes a camera about 0.7 m above the ground, pitched about 8 degrees down, with a 100 degree horizontal field of view. A different mount shifts the line, because it is in metres. `python example.py frame.jpg` prints the same thing.
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  ## Model
60
 
61
  `DriveNet`: a 3.9 M parameter encoder-decoder (a dilated bottleneck, all standard convolutions) with a mask head, plus a driving head that reads the bottleneck and the quarter-resolution decoder features (with pixel-coordinate channels) and regresses the line and speeds. Input is the 240 x 135 half-resolution frame. About 7 ms per frame on one CPU thread.
@@ -75,6 +100,7 @@ The model assumes a camera about 0.7 m above the ground, pitched about 8 degrees
75
  | Target-speed error | 0.34 m/s |
76
  | Pavement mask IoU on unseen simulator frames | 0.979 |
77
  | **Pavement mask IoU on 575 held-out real kart frames, against auto-labels** | **0.84** |
 
78
 
79
  For reference: a simulator-only model scores 0.39 on the real frames, below a fixed "the lower part of the picture is road" guess (0.47). Models trained on the faster teacher (drive-v6) fail to complete laps.
80
 
 
16
 
17
  > **Status: a simulator result, not a road-tested model.** It has never seen the kart's own camera and has never driven a real kart. See [What this does not show](#what-this-does-not-show).
18
 
19
+ ![drive-v5 driving a full lap of the simulated Purdue track from the camera alone](images/07-drive-v5-lap-top-down.png)
20
+
21
+ *drive-v5 driving a full lap (64.6 s) of the simulated track from the camera alone. The path is coloured by speed; the thin orange lines are the lines the model chose along the way.*
22
+
23
  Code, training scripts, the simulator and the full version history are in the project repository: https://github.com/ExplodingCB/mcqueen-vip (branch `training-perception`, see `docs/13-driving-model-versions.md`).
24
 
25
  ## Files
 
31
  | `checkpoints/drive-v4.pt` | drive-v3 plus real helmet-cam footage for the mask |
32
  | `checkpoints/drive-v6.pt` | Trained on a faster teacher line. Best open-loop numbers, but **does not complete laps**; included as a research result |
33
  | `model.py`, `driver.py`, `example.py` | Everything needed to load a checkpoint and run it on an image |
34
+ | `images/` | The pictures on this page |
35
  | `laptime-v2-best.json` | The searched expert line (racing line offsets and speed limits) the faster teacher uses |
36
 
37
  ## Checksums (SHA-256)
 
61
 
62
  The model assumes a camera about 0.7 m above the ground, pitched about 8 degrees down, with a 100 degree horizontal field of view. A different mount shifts the line, because it is in metres. `python example.py frame.jpg` prints the same thing.
63
 
64
+ ## Pictures
65
+
66
+ **What the model learned from.** The simulator camera drapes the real 2023 aerial photo of the track over the ground (right), instead of the flat grey and green it started with (left). It is still a flat ground with no buildings and one day's lighting, so it is a harder test, not a photograph.
67
+
68
+ ![Simulator camera: flat render on the left, the aerial photo draped over the ground on the right](images/01-drape-before-after.png)
69
+
70
+ **The labels.** Each training frame carries the expert's racing line (magenta dots) and the speed it wants at each point (yellow, m/s). The camera mount and the image's appearance are randomized so the model does not depend on one exact mount.
71
+
72
+ ![Training frames with the expert's racing line and speeds drawn on them](images/02-expert-labels.png)
73
+
74
+ **Real footage, for the pavement mask.** drive-v5's pavement mask on frames from three real nose-cam videos it was never trained on, against automatic SegFormer labels. Magenta: the model and the label agree. Red: the model says pavement and the label does not. Blue: the label says pavement and the model missed it. Each tile shows its own score. The first sheet is frames near the median; the second is the **lowest-scoring** frames, so you can see what it gets wrong. Across the 404 frames of these three clips the mean IoU is 0.91 (median 0.95, worst tenth 0.78), against 0.67 for a fixed "the lower part of the picture is road" guess. That guess is already strong on easy clips (0.90 on one of them), so the clip-by-clip numbers matter: 0.97, 0.93 and 0.82, against 0.90, 0.76 and 0.32.
75
+
76
+ ![drive-v5 pavement mask on held-out real frames, near the median](images/08-real-footage-heldout-typical.png)
77
+
78
+ ![drive-v5 pavement mask on the lowest-scoring held-out real frames](images/09-real-footage-heldout-worst.png)
79
+
80
+ **Progress across versions.** Open-loop errors on unseen simulator frames, the real-footage mask score, and the simulated lap-time search. drive-v6 has the best open-loop numbers but does not complete laps in the closed loop, which is why those numbers alone are not the measure that matters.
81
+
82
+ ![Progress across model versions](images/progress.png)
83
+
84
  ## Model
85
 
86
  `DriveNet`: a 3.9 M parameter encoder-decoder (a dilated bottleneck, all standard convolutions) with a mask head, plus a driving head that reads the bottleneck and the quarter-resolution decoder features (with pixel-coordinate channels) and regresses the line and speeds. Input is the 240 x 135 half-resolution frame. About 7 ms per frame on one CPU thread.
 
100
  | Target-speed error | 0.34 m/s |
101
  | Pavement mask IoU on unseen simulator frames | 0.979 |
102
  | **Pavement mask IoU on 575 held-out real kart frames, against auto-labels** | **0.84** |
103
+ | Pavement mask IoU on 404 frames from three held-out real nose-cam videos | **0.91** (a fixed guess: 0.67) |
104
 
105
  For reference: a simulator-only model scores 0.39 on the real frames, below a fixed "the lower part of the picture is road" guess (0.47). Models trained on the faster teacher (drive-v6) fail to complete laps.
106
 
images/01-drape-before-after.png ADDED

Git LFS Details

  • SHA256: 139db781a7742d76f110bae43a10529fe47ce3859ae2f9862b8aa3992e447304
  • Pointer size: 131 Bytes
  • Size of remote file: 606 kB
images/02-expert-labels.png ADDED

Git LFS Details

  • SHA256: 352c9d205d94a20c49f9822483e1130d401fa5f2c67db967435cefaeecf0fdf4
  • Pointer size: 132 Bytes
  • Size of remote file: 1.03 MB
images/07-drive-v5-lap-top-down.png ADDED

Git LFS Details

  • SHA256: e873aaeeb046f739deae3c42497b0eac87ab5404347b5759f56223a019b68198
  • Pointer size: 131 Bytes
  • Size of remote file: 100 kB
images/08-real-footage-heldout-typical.png ADDED

Git LFS Details

  • SHA256: 6300ef64a3af7a90cd6354c872de6a8218e6df5fb1d51a3e3d5aa32166738279
  • Pointer size: 131 Bytes
  • Size of remote file: 480 kB
images/09-real-footage-heldout-worst.png ADDED

Git LFS Details

  • SHA256: bd6d2120f95dd981540fda600e4b7d0354f3420a5db6905e4b4e1a5af51fbabb
  • Pointer size: 131 Bytes
  • Size of remote file: 648 kB
images/progress.png ADDED

Git LFS Details

  • SHA256: 57bb41dd577fbbe814c3d5563734b4c0f682eae34598591068f40186f1519d97
  • Pointer size: 131 Bytes
  • Size of remote file: 155 kB