Models / ConvNeXt-V2-L
code
view_in_arConvolution · Modern CNN

ConvNeXt-V2-L

A modernized convolutional network trained with transformer-era recipes — the convolution counterpart to DINOv3.

analytics96.9% clean · 96.5% leaky9 classes · ~720 imagesFull fine-tune
Concepts in play
play_circleConvNeXt-V2 — patchify stem, four convolution stages, a 9-class head
  1. A patchify stem reduces the image to a 56×56 feature map, then four convolution stages run left to right.
  2. Each stage shrinks spatially (56 → 28 → 14 → 7) and grows in channels (192 → 384 → 768 → 1536) — a feature pyramid, coarse to fine.
  3. Inside a block, a large 7×7 depthwise kernel reads wide context while staying fully convolutional — no attention.
  4. Global average pooling collapses the last map to one vector, and a fresh linear head scores the nine weapon classes.
How it works

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 glanceSpecification
BackboneConvNeXt-V2-Large (FCMAE-pretrained, in22k)
Parameters~198 M (full fine-tune)
Input / stem224×224 → 4×4 stride-4 patchify stem → 56×56
Stages4 · dims 192 / 384 / 768 / 1536 · depths 3·3·27·3
Block7×7 depthwise → pointwise inverted bottleneck + GRN
Classifier headGlobal 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.

Design choice

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.

Training

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-tuningSetting
StrategyFull fine-tune (all parameters)
PretrainingFCMAE self-supervised, ImageNet-22k
Trainable weightsAll ~198 M parameters
OptimizerAdamW · weight decay 0.05
Learning rate1e-4 · cosine annealing
Epochs / batch30 / 16 · best-val checkpoint kept
PrecisionAMP fp16
Augmentation (online)TrivialAugment + RandomErasing + MixUp/CutMix + label smoothing
Augmentation (corpus)DiffuseMix (CVPR 2024) — clean training set expanded ~5× (395 → 1,975 generated views)
Hardwaresingle RTX 3060 (12 GB)
Seed42
ConvNeXt-V2-L validation accuracy per epoch on both splits
Validation accuracy per epoch on both splits. Marked peaks are the kept checkpoints — clean ep 14 = 96.9%, original ep 9 = 96.5%.

Compare the other design

DINOv3 ViT-L — Attention · Vision Transformer

hubView DINOv3 ViT-L

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.

scienceTry it · Live inference

ConvNeXt-V2-L · Live Inference

Real forward + backward passes on CPU: the nine-class prediction, an out-of-distribution signal, Grad-CAM and robustness probes. Try a non-weapon and watch what a closed-set model does.

ConvNeXt-V2-L · CPU
analytics96.5% orig · 96.9% cleanWeapons · 9-class198M paramsIn this workshop:PredictionsGrad-CAMFGSM attackCorruptionsOOD signal
Recognizes9 weapon categories9 classes · bazooka, grenade launcher, rifle, shotgun, smg, sniper, knife, sword, handgun
Accuracy96.5% orig · 96.9% clean96.5% on the original split, 96.9% on the clean (leakage-proof) split
Works best onA photo of one of the nine weapon typesResized to 224×224 color, ImageNet-normalized.
warning
Expect confident mistakes outside its scope

This model only knows nine weapon classes and has no "no weapon" option. Shown an ordinary object — an animal, a vehicle, a face — it will still return a weapon label, sometimes confidently. We measured this directly: 27 of 27 non-weapons were labelled as weapons. Treat the confidence value, not just the label, as the signal.

Concepts in play

Top-5 Predictions

Upload an image and run analysis to see predictions.

These flagships are closed-set: every image is forced into one of the nine weapon classes. Confidence and entropy are the only signal that an input doesn't belong — there is no "no weapon" option.

Input

image

Confidence vs. OOD

reject < 0.80low confidencehigh confidence
Real weapons (~96%) Non-weapons (~55% median)

Confidence (top-1)

—

Run analysis to compute

Inference Latency

—

CPU forward pass