BluViT
Vision Transformer encoder trained from scratch on Indian road imagery (IDD)
- Maturity
- Not assessed
- Program
- P1 · Perception
- Platform
- GPU workstation
- Source
- No public repository
- License
- Not specified
A camera-only driving stack needs one image encoder that serves cameras of different fields of view and resolutions. BluViT is trained from zero, and its README states that masked-autoencoder pretraining is what makes a from-scratch Vision Transformer work with about ten thousand labelled images. A study with a pre-registered gate tests that on IDD, against a supervised-only arm, a control arm and a from-scratch CNN reference. A second study compares a large-kernel convolutional encoder with ResNet-50, both from scratch, under a go/no-go rule written before the runs.
How it is put together.
BluViT is an image encoder for camera-based driving perception, trained from zero on Indian road imagery with no ImageNet weights. BluViT-S is a ViT-S/16 with 2D axial rotary position embeddings, register tokens, QK-norm, LayerScale and a camera-id embedding. It is pretrained as a masked autoencoder on unlabelled frames and fine-tuned for 26-class semantic segmentation on the public India Driving Dataset (IDD), evaluated with the IDD protocol and exported to ONNX. The same repository holds BluConv-T, a convolutional encoder with no attention, compared with ResNet-50 under the same protocol.
- 1
Data
IDD segmentation pairs with joint augmentation, unlabelled frames from directories, videos or a jsonl manifest
bluvit/data/ - 2
BluViT encoder
ViT-S/16 with 2D RoPE, registers, QK-norm, LayerScale and camera-id embedding
bluvit/model/vit.py - 3
Masked autoencoder
75 percent masking, small decoder, normalised-pixel loss; pretrains the encoder
bluvit/model/mae.py - 4
Segmentation head
Multi-tap all-MLP head with deep supervision
bluvit/model/seg.py - 5
Train and evaluate
MAE pretraining, IDD fine-tune, IDD-protocol evaluation, ONNX export
bluvit/train/ - 6
IDD tools
Label masks matching the official tool, class weights, frame extraction, benchmark
tools/
Specification.
- Encoder
- ViT-S/16 with 2D axial rotary position embeddings (no absolute position table, so inference size can differ from training size), four register tokens, QK-norm, LayerScale, stochastic depth and a six-slot camera-id embedding
- Conv encoder
- BluConv-T: four BatchNorm stages with 13x13 depthwise kernels trained through dilated reparameterisation branches and merged for export, squeeze-excite, GRN and a camera gate, with an FPN segmentation head; ResNet-50 runs through the same head and training script
- Pretraining
- Masked autoencoder with 75 percent masking, a small 192-wide, four-block decoder that is discarded afterwards, and a normalised-pixel loss; reads frame directories, videos or a jsonl frame manifest
- Segmentation
- Multi-tap all-MLP head with deep supervision; fine-tuning with layer-wise lr decay, EMA weights and class-weighted cross-entropy on IDD level 3 (26 classes)
- Evaluation
- IDD-protocol mean IoU at 1280x720 with per-class IoU; person, rider, motorcycle and autorickshaw are reported separately in every run
- IDD tools
- Level-3 label masks identical, pixel for pixel, to the official AutoNUE createLabels.py on every Part I and II mask; class weights; video frame extraction
- Export
- ONNX with input normalisation folded in, and the TensorRT trtexec commands to build an engine
- Runs on
- Trained and evaluated on one workstation GPU (NVIDIA GeForce RTX 5080); the README also gives setup for a Jetson AGX Orin 64 GB, where it has not been measured. No public repository: a local directory only
Notes.
Measured on the India Driving Dataset
The author trained and evaluated five arms on the public India Driving Dataset (IDD), each for 40 epochs on the same 14,027 training images and scored on the official val split at the final epoch. Pretrained for 400 epochs as a masked autoencoder on unlabelled IDD frames, BluViT-S reached a mean IoU of 64.48 %. The same encoder trained from random initialisation reached 37.31 %, and the study’s pre-registered gate passed. That supervised arm was handicapped by the recipe’s layer-wise learning-rate decay, so a control arm without it was run: it reached 48.12 %, and pretraining still adds 16.36 points. A DeepLabV3 ResNet-50 trained from scratch with the same data and evaluation reached 60.17 %. A later ResNet-50 with an FPN head and the AdamW optimiser, also from scratch, reached 63.57 %, within one point of the pretrained ViT (below).
| Quantity | Value | Conditions | Basis |
|---|---|---|---|
| Mean IoU on IDD val, BluViT-S, MAE init (epoch 400) | 64.48 % | encoder from the MAE checkpoint at epoch 400 (unlabelled IDD frames only); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-15 |
| Mean IoU on IDD val, BluViT-S, MAE init (epoch 150) | 62.85 % | encoder from the MAE checkpoint at epoch 150 of 400 (unlabelled IDD frames only); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-15 |
| Mean IoU on IDD val, DeepLabV3 ResNet-50, from scratch (reference) | 60.17 % | reference CNN: torchvision DeepLabV3 ResNet-50, no pretrained weights, SGD with a poly schedule; IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-10 |
| Mean IoU on IDD val, BluViT-S, supervised only, layer decay 1.0 (control) | 48.12 % | control arm: random initialisation, layer-wise lr decay off (1.0); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-16 |
| Mean IoU on IDD val, BluViT-S, supervised only (random init) | 37.31 % | random initialisation, layer-wise lr decay 0.75 (the MAE arms' recipe); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-10 |
| Gain in mean IoU from MAE initialisation (epoch 400) over supervised-only | 27.17 points | gate pair: MAE init (epoch 400) minus supervised-only, both with layer-wise lr decay 0.75; verdict PASS (must win on mean IoU and on person, rider, motorcycle and autorickshaw); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-15 |
| Gain in mean IoU from MAE initialisation (epoch 400) over the supervised control (layer decay 1.0) | 16.36 points | MAE init (epoch 400) minus the control (supervised-only, layer-wise lr decay off); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-16 |
The four road-user classes
Every run reports person, rider, motorcycle and autorickshaw separately. The pretrained encoder is ahead of both supervised ViT arms and of the DeepLabV3 reference on each of the four. The later ResNet-50 with an FPN head and AdamW is ahead of it on person, rider and motorcycle.
| Quantity | Value | Conditions | Basis |
|---|---|---|---|
| IoU, person, BluViT-S, MAE init (epoch 400) | 64.15 % | encoder from the MAE checkpoint at epoch 400 (unlabelled IDD frames only); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-15 |
| IoU, rider, BluViT-S, MAE init (epoch 400) | 68.92 % | encoder from the MAE checkpoint at epoch 400 (unlabelled IDD frames only); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-15 |
| IoU, motorcycle, BluViT-S, MAE init (epoch 400) | 73.4 % | encoder from the MAE checkpoint at epoch 400 (unlabelled IDD frames only); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-15 |
| IoU, autorickshaw, BluViT-S, MAE init (epoch 400) | 84.92 % | encoder from the MAE checkpoint at epoch 400 (unlabelled IDD frames only); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-15 |
| IoU, person, DeepLabV3 ResNet-50, from scratch (reference) | 62.87 % | reference CNN: torchvision DeepLabV3 ResNet-50, no pretrained weights, SGD with a poly schedule; IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-10 |
| IoU, rider, DeepLabV3 ResNet-50, from scratch (reference) | 66.57 % | reference CNN: torchvision DeepLabV3 ResNet-50, no pretrained weights, SGD with a poly schedule; IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-10 |
| IoU, motorcycle, DeepLabV3 ResNet-50, from scratch (reference) | 71.27 % | reference CNN: torchvision DeepLabV3 ResNet-50, no pretrained weights, SGD with a poly schedule; IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-10 |
| IoU, autorickshaw, DeepLabV3 ResNet-50, from scratch (reference) | 82.39 % | reference CNN: torchvision DeepLabV3 ResNet-50, no pretrained weights, SGD with a poly schedule; IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-10 |
| IoU, person, BluViT-S, supervised only, layer decay 1.0 (control) | 43.6 % | control arm: random initialisation, layer-wise lr decay off (1.0); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-16 |
| IoU, rider, BluViT-S, supervised only, layer decay 1.0 (control) | 49.8 % | control arm: random initialisation, layer-wise lr decay off (1.0); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-16 |
| IoU, motorcycle, BluViT-S, supervised only, layer decay 1.0 (control) | 56.65 % | control arm: random initialisation, layer-wise lr decay off (1.0); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-16 |
| IoU, autorickshaw, BluViT-S, supervised only, layer decay 1.0 (control) | 70.18 % | control arm: random initialisation, layer-wise lr decay off (1.0); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-16 |
| IoU, person, BluViT-S, supervised only (random init) | 27.25 % | random initialisation, layer-wise lr decay 0.75 (the MAE arms' recipe); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-10 |
| IoU, rider, BluViT-S, supervised only (random init) | 35.77 % | random initialisation, layer-wise lr decay 0.75 (the MAE arms' recipe); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-10 |
| IoU, motorcycle, BluViT-S, supervised only (random init) | 43.65 % | random initialisation, layer-wise lr decay 0.75 (the MAE arms' recipe); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-10 |
| IoU, autorickshaw, BluViT-S, supervised only (random init) | 51.43 % | random initialisation, layer-wise lr decay 0.75 (the MAE arms' recipe); IDD level 3 (26 classes), official val split (2,036 images), final epoch of 40, EMA weights, scored at 1280x720 (IDD protocol); trained on 14,027 IDD train images, 512x896 crops, batch 8, bf16; one seed | Reproduced 2026-11-10 |
A convolutional encoder: BluConv-T
The repository also holds BluConv-T, a convolutional encoder with no attention: four BatchNorm stages with 13x13 depthwise kernels, squeeze-excite and GRN. It was compared with ResNet-50, both from scratch with the same FPN segmentation head, under two optimiser recipes fixed before the runs. With AdamW it led by 2.32 points; with SGD it trailed, at a difference of −2.29 points. In TensorRT half precision it took 5.818 ms against ResNet-50’s 2.078 ms on the workstation GPU. A rule written before the runs said that unless BluConv-T clearly beat ResNet-50, the recommendation would be the ResNet-50 route, and that is the study’s verdict. The full comparison, with INT8 results, is technical report IF-TR-2026-07.
| Quantity | Value | Conditions | Basis |
|---|---|---|---|
| Mean IoU on IDD val, BluConv-T + FPN head, AdamW, from scratch | 65.89 % | AdamW lr 1e-3, poly; from scratch; IDD val (2,036 images, 26 classes, IDD protocol); final epoch of 40, EMA; one seed | Reproduced 2026-11-16 |
| Mean IoU on IDD val, ResNet-50 + FPN head, AdamW, from scratch | 63.57 % | AdamW lr 1e-3, poly; from scratch; IDD val (2,036 images, 26 classes, IDD protocol); final epoch of 40, EMA; one seed | Reproduced 2026-11-17 |
| Mean IoU on IDD val, ResNet-50 + FPN head, SGD, from scratch | 57.97 % | SGD lr 0.01, poly; from scratch; IDD val (2,036 images, 26 classes, IDD protocol); final epoch of 40, EMA; one seed | Reproduced 2026-11-16 |
| Mean IoU on IDD val, BluConv-T + FPN head, SGD, from scratch | 55.68 % | SGD lr 0.01, poly; from scratch; IDD val (2,036 images, 26 classes, IDD protocol); final epoch of 40, EMA; one seed | Reproduced 2026-11-16 |
| Mean IoU difference, BluConv-T minus ResNet-50 (both + FPN head), AdamW | 2.32 points | both arms: AdamW lr 1e-3, poly; from scratch; IDD val (2,036 images, 26 classes, IDD protocol); final epoch of 40, EMA; one seed | Reproduced 2026-11-17 |
| Mean IoU difference, BluConv-T minus ResNet-50 (both + FPN head), SGD | −2.29 points | both arms: SGD lr 0.01, poly; from scratch; IDD val (2,036 images, 26 classes, IDD protocol); final epoch of 40, EMA; one seed | Reproduced 2026-11-16 |
| Median latency, BluConv-T + FPN head, TensorRT half precision | 5.818 ms | batch 1, 3x720x1280, median of 300 runs; AdamW weights; workstation GPU, not a device | Reproduced 2026-11-17 |
| Median latency, ResNet-50 + FPN head, TensorRT half precision | 2.078 ms | batch 1, 3x720x1280, median of 300 runs; AdamW weights; workstation GPU, not a device | Reproduced 2026-11-17 |
Pretraining and cost
| Quantity | Value | Conditions | Basis |
|---|---|---|---|
| MAE masked-patch loss, epoch 1 of 400 | 0.9053 | masked autoencoder, 75 percent masking, normalised-pixel loss; 512x896, batch 32, bf16; 42,320 unlabelled IDD frames with nothing from val or test (asserted in code) | Reproduced 2026-11-15 |
| MAE masked-patch loss, epoch 50 of 400 | 0.3127 | masked autoencoder, 75 percent masking, normalised-pixel loss; 512x896, batch 32, bf16; 42,320 unlabelled IDD frames with nothing from val or test (asserted in code) | Reproduced 2026-11-15 |
| MAE masked-patch loss, epoch 150 of 400 | 0.2988 | masked autoencoder, 75 percent masking, normalised-pixel loss; 512x896, batch 32, bf16; 42,320 unlabelled IDD frames with nothing from val or test (asserted in code) | Reproduced 2026-11-15 |
| MAE masked-patch loss, epoch 400 of 400 | 0.2888 | masked autoencoder, 75 percent masking, normalised-pixel loss; 512x896, batch 32, bf16; 42,320 unlabelled IDD frames with nothing from val or test (asserted in code) | Reproduced 2026-11-15 |
| MAE pretraining wall clock, 400 epochs | 29.7 h | masked autoencoder, 75 percent masking, normalised-pixel loss; 512x896, batch 32, bf16; 42,320 unlabelled IDD frames with nothing from val or test (asserted in code); summed over the run's resumed segments; loader reads a 1280-wide resized cache of the corpus | Reproduced 2026-11-15 |
| MAE pretraining throughput, median | 179.6 img/s | masked autoencoder, 75 percent masking, normalised-pixel loss; 512x896, batch 32, bf16; 42,320 unlabelled IDD frames with nothing from val or test (asserted in code); end to end including data loading | Reproduced 2026-11-15 |
| Fine-tune wall clock, 40 epochs, BluViT-S, MAE init (epoch 400) | 4.45 h | 40 epochs including a val pass each epoch; one seed | Reproduced 2026-11-15 |
| Fine-tune wall clock, 40 epochs, DeepLabV3 ResNet-50, from scratch | 5.62 h | 40 epochs including a val pass each epoch; one seed; the CNN shared the CPU with a cache build, so its time is slightly pessimistic (study report) | Reproduced 2026-11-10 |
| Segmentation inference throughput on the val set | 46.8 img/s | BluViT-S with the segmentation head, batch 1, full image at width 1280, including argmax and the resize to 1280x720; timed over 300 of the 2,036 val images; includes data loading | Reproduced 2026-11-09 |
| BluViT-S encoder parameters | 21.61 M | ViT-S/16: width 384, depth 12, 6 heads, 4 register tokens; the segmentation model with its head has 25.26 M | Reproduced 2026-11-15 |
| Differing pixels, BluViT's label masks vs the official IDD tool | 0 px | all 16,063 Part I + II train and val masks; BluViT's tools/idd_prepare.py masks against masks written by the official AutoNUE createLabels.py (level3Id), after two fixes (fallback background id, polygon rasteriser) | Reproduced 2026-11-09 |
Not yet measured
Each arm ran with one seed. Nothing here is measured on the lab’s own footage, on a vehicle or on the Jetson AGX Orin the README targets, and the IDD test split was not used. None of the convolutional networks has had masked pretraining, so the comparison with the pretrained ViT does not rank the architectures. The studies are technical reports IF-TR-2026-06 and IF-TR-2026-07.
An instrument of P1.
Can perception that runs on commodity hardware detect and range the road users of Indian traffic well enough to warn a driver, and how can that be shown before it is trusted on the road?
Instrument · PrototypeLabeloxAVA data engine for autonomous driving, built for Indian roads
Instrument · Validated in simulationLyne ADASOn-device, warning-only driver assistance for Android phones