ConvNeXt-V2-L
A modernized convolutional network trained with transformer-era recipes — the convolution counterpart to DINOv3.
- A patchify stem reduces the image to a 56×56 feature map, then four convolution stages run left to right.
- Each stage shrinks spatially (56 → 28 → 14 → 7) and grows in channels (192 → 384 → 768 → 1536) — a feature pyramid, coarse to fine.
- Inside a block, a large 7×7 depthwise kernel reads wide context while staying fully convolutional — no attention.
- Global average pooling collapses the last map to one vector, and a fresh linear head scores the nine weapon classes.
The convolution model
ConvNeXt-V2 is a convolutional network rebuilt with the design choices that made transformers work — larger kernels, fewer activations, modern normalization — plus a self-supervised masked-autoencoder pretraining stage. It stays fully convolutional, betting on locality and weight-sharing rather than global attention.
We fine-tuned the in22k-pretrained Large variant on the nine weapon classes. It is self-contained (no gated backbone at inference), which is why it is the primary model behind the live workshop.
It is the convolution half of the contrast with DINOv3. The point of running both is to see whether two opposite architectures agree — and on the clean data, they do.
| At a glance | Specification |
|---|---|
| Backbone | ConvNeXt-V2-Large (FCMAE-pretrained, in22k) |
| Parameters | ~198 M (full fine-tune) |
| Input / stem | 224×224 → 4×4 stride-4 patchify stem → 56×56 |
| Stages | 4 · dims 192 / 384 / 768 / 1536 · depths 3·3·27·3 |
| Block | 7×7 depthwise → pointwise inverted bottleneck + GRN |
| Classifier head | Global avg-pool → LayerNorm → linear → 9 classes |
Hierarchical convolution stages
ConvNeXt keeps the classic convolutional pyramid. A patchify stem first downsamples the 224×224 image to a 56×56 feature map, then four stages run in sequence. Each stage halves the spatial resolution (56 → 28 → 14 → 7) and roughly doubles the channel count (192 → 384 → 768 → 1536), trading where for what: fine spatial detail early, abstract semantic features late.
Every feature is computed by a kernel applied identically across all positions — locality and weight-sharing. Unlike a transformer, the receptive field starts tiny and grows only with depth, which is the inductive bias that makes CNNs data-efficient.
Large-kernel depthwise blocks
The modern part is inside each block. A ConvNeXt block leads with a 7×7 depthwise convolution — one filter per channel — so it reads a wide spatial context cheaply, echoing a transformer's wide view without leaving convolution. That is followed by a pointwise inverted bottleneck (expand channels 4×, GELU, project back), with far fewer activation and normalization layers than a ResNet bottleneck.
ConvNeXt-V2 adds Global Response Normalization (GRN), which encourages channels to specialise and was co-designed with the masked-autoencoder pretraining. The result is a pure-conv block that borrows the recipe, but not the attention, of transformers.
Masked-autoencoder pretraining, then fine-tune
The backbone is pretrained with FCMAE — a fully-convolutional masked autoencoder that hides most of the image and learns to reconstruct it — on ImageNet-22k, with no labels. This gives strong general visual features before a single weapon is seen.
We then fine-tune the whole network on the nine weapon classes. Because nothing is gated or frozen and there is no external dependency at inference, ConvNeXt-V2 is self-contained — which is why it is the primary model behind the live workshop on this page.
Why we chose it
ConvNeXt-V2 is the strongest modern convolutional family, and it ships with masked-autoencoder pretraining, so like DINOv3 it transfers well from few images. It is also fully self-contained at inference — no gated backbone, no external download — which is why it is the model behind the live workshop on this page.
It is the convolution counterpart to DINOv3 in a deliberate head-to-head. If a pure-convolution model and a pure-attention model land within a point of each other on clean data, the dataset — not the architecture — is the ceiling.
How we fine-tuned it
Unlike DINOv3, the whole network is fine-tuned. At 198 M parameters it is large, but it still fits in 12 GB with fp16 and batch size 16. A smaller learning rate (1e-4) keeps the pretrained features from being washed out on so few images. The same heavy augmentation applies — the online transforms plus the DiffuseMix corpus that expands the clean training set about fivefold — to widen the limited data.
As with DINOv3 we keep the best-validation checkpoint. Clean-split accuracy peaks at epoch 14 (96.9%) and declines afterward; the headline number is that peak, and the curve below makes the selection explicit.
| Fine-tuning | Setting |
|---|---|
| Strategy | Full fine-tune (all parameters) |
| Pretraining | FCMAE self-supervised, ImageNet-22k |
| Trainable weights | All ~198 M parameters |
| Optimizer | AdamW · weight decay 0.05 |
| Learning rate | 1e-4 · cosine annealing |
| Epochs / batch | 30 / 16 · best-val checkpoint kept |
| Precision | AMP fp16 |
| Augmentation (online) | TrivialAugment + RandomErasing + MixUp/CutMix + label smoothing |
| Augmentation (corpus) | DiffuseMix (CVPR 2024) — clean training set expanded ~5× (395 → 1,975 generated views) |
| Hardware | single RTX 3060 (12 GB) |
| Seed | 42 |
Two splits, because the data leaks
Before trusting any accuracy number we checked the dataset itself. A perceptual-hash audit compared every image to every other and found 82 train↔val duplicate pairs — roughly half of the validation set are near-identical copies of training images. The models had effectively already seen part of the test set, so every number on the official split is optimistic. This is a normal data-quality issue in scraped datasets, not anyone's mistake.
So we built a leakage-proof split by construction: de-duplicate within each class (union-find over the perceptual hashes, keep the highest-resolution copy), then re-split 80/20 stratified with a fixed seed. 221 of 714 images — nearly 1 in 3 — were duplicates, leaving 493 unique images (395 train / 98 val). The originals are untouched and every change is logged. From here, accuracy means performance on genuinely unseen weapons.
The full leakage audit and de-duplication figures are on the case-study overview. Every metric below is reported on both splits so the inflation is visible.
Every metric, both splits
The deck shows one accuracy number; here is the full picture. Each metric appears on the leaky original split (n=143) and on the clean, leakage-proof split (n=98). Values are computed from the saved best-checkpoint predictions: precision/recall/F1 are macro-averaged over the nine classes, ROC-AUC and specificity are one-vs-rest then averaged, and MCC is the multiclass Matthews coefficient.
| Metric | Original (leaky) | Clean (honest) |
|---|---|---|
| Accuracy | 96.5% (138/143) | 96.9% (95/98) |
| Macro F1 | 0.965 | 0.968 |
| Weighted F1 | 0.965 | 0.969 |
| Macro precision | 0.967 | 0.971 |
| Macro recall | 0.966 | 0.970 |
| Macro ROC-AUC | 0.9984 | 0.9850 |
| MCC (multiclass) | 0.961 | 0.966 |
| Macro specificity | 0.996 | 0.996 |
Per-class precision, recall and F1 on bothsplits — the macro figures above are the unweighted mean of each table's rows. Every miss sits in the long-gun group; blades and the handgun are perfect on both.
Original (leaky) split · n=143
| Class | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| Bazooka | 0.92 | 0.92 | 0.92 | 13 |
| Grenade launcher | 0.89 | 0.94 | 0.92 | 18 |
| Handgun | 1.00 | 1.00 | 1.00 | 14 |
| Knife | 1.00 | 1.00 | 1.00 | 14 |
| Rifle | 0.88 | 1.00 | 0.94 | 15 |
| Shotgun | 1.00 | 0.94 | 0.97 | 16 |
| SMG | 1.00 | 0.94 | 0.97 | 17 |
| Sniper | 1.00 | 0.94 | 0.97 | 18 |
| Sword | 1.00 | 1.00 | 1.00 | 18 |
Clean (leakage-proof) split · n=98
| Class | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| Bazooka | 0.82 | 1.00 | 0.90 | 9 |
| Grenade launcher | 1.00 | 0.82 | 0.90 | 11 |
| Handgun | 1.00 | 1.00 | 1.00 | 11 |
| Knife | 1.00 | 1.00 | 1.00 | 10 |
| Rifle | 1.00 | 0.91 | 0.95 | 11 |
| Shotgun | 1.00 | 1.00 | 1.00 | 11 |
| SMG | 0.92 | 1.00 | 0.96 | 12 |
| Sniper | 1.00 | 1.00 | 1.00 | 11 |
| Sword | 1.00 | 1.00 | 1.00 | 12 |
Mistakes cluster among look-alike weapons
On the clean split ConvNeXt makes only 3 mistakes out of 98 — two grenade launchers read as a bazooka, one rifle read as an SMG. Every error is inside the long-gun group; knife, sword and handgun are perfect.
The leakage gap collapses — and the frontier pair ties
Orange (Inception + LogReg)
−12.3 pts
DINOv3 ViT-L
−2.3 pts
ConvNeXt-V2-L
−-0.4 pts
Stack the models weak-to-strong and the leakage gap collapses: the weak Inception+LogReg baseline drops ~12 points from the leaky to the clean split, while the two frontier models barely move. On the clean split DINOv3 and ConvNeXt — attention versus convolution — disagree on just 2 of 98 images. McNemar's exact test gives p = 0.50: the difference is not significant. They are tied, not ranked. When two opposite designs land in the same place, the dataset, not the model, is the ceiling.
| McNemar paired test | Original (leaky) | Clean (honest) |
|---|---|---|
| Discordant pairs (vs. the other frontier model) | 5 | 2 |
| Exact p-value | 1.00 | 0.50 |
Shown a non-weapon, it still picks a weapon
These are closed-set models: shown any image they must pick one of the nine weapon classes, even when there is no weapon in frame. We tested 27 everyday objects — cows, planes, vintage cars — and the classifier labelled every single one as a weapon. Its most confident mistake was a purple-painted cow called a "sword" at 85%.
There is a signal to lean on: on real weapons confidence sits around 96%, on the non-weapons it falls to a median of ~55%. A confidence threshold near 0.80 would reject 26 of the 27 non-weapons — a good first defence, not a solution (the purple cow still sails through). The proper fix is an explicit "no weapon" class, and for real security use you would tune the threshold toward catching every real weapon.
Compare the other design
DINOv3 ViT-L — Attention · Vision Transformer
Sources & further reading
A 9-class weapons image classifier, audited end to end: a dataset that leaks ~31% duplicates, the accuracy inflation that leakage hides, and two opposite frontier architectures that finish in a statistical tie on genuinely unseen images.



