Two TFLite models used by
Car Nebula for real-time Advanced Driver
Assistance (ADAS) running entirely on-device on Android automotive hardware.
64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 124 128 132 136 140
144 148 152 156 160 164 168 172 176 180 184 188 192 196 200 204 208 212
216 220 224 228 232 236 240 244 248 252 256 260 264 268 272 276 280 284
Camera frame (CameraX / USB UVC)
│
├──► EfficientDet Lite0 (every 3 frames)
│ └──► AdasBox list: label, bounding rect, estimated distance
│ └──► HUD overlay: boxes, collision warning, top-down view
│
└──► UFLD ResNet-18 (every 3 frames)
└──► Lane boundary points (left/right, top/bottom)
└──► Camera overlay: seg mask, lane lines
HUD: road corridor, departure warning
Results are temporally smoothed between inference runs so the UI always has
something to render even on frames that skip inference.
1// Load from downloaded file
2val model = FileInputStream(file).channel.use { ch ->
3 ch.map(FileChannel.MapMode.READ_ONLY, 0, file.length())
4}
5val interpreter = InterpreterApi.create(
6 model,
7 InterpreterApi.Options()
8 .setRuntime(InterpreterApi.Options.TfLiteRuntime.FROM_SYSTEM_ONLY)
9 .setNumThreads(2)
10)