- 94.8%AUC-ROC · Brand AF1 94.0% · accuracy 90.6%
- 87.8%AUC-ROC · Brand BF1 87.2% · accuracy 82.3%
- 448²input resolutionHigh resolution to preserve fine logo detail
The challenge
Counterfeit logos differ from genuine ones in small details — spacing, stroke weight, proportions — and the classes are imbalanced. A naive classifier overfits quickly, and its default 0.5 threshold rarely matches the real cost of a wrong call.
Our approach
Transfer learning from an ImageNet-pretrained ConvNeXt-Base at 448 × 448, with class-balanced sampling and a weighted loss, mixed-precision training, EMA weight smoothing and a warmup-plus-cosine learning-rate schedule. Instead of the default cut-off, the decision threshold is tuned for the best F1 score.
Workflow
How it works, step by step.
The pipeline in 5 stages, from prepare to verify. Each stage has a clear input, a clear output and a reason to exist.
- 01
Prepare
Logo crops at 448 × 448 with color jitter, grayscale, blur, sharpness and affine augmentation.
- 02
Balance
WeightedRandomSampler plus a pos_weight loss counter class imbalance.
- 03
Train
ConvNeXt-Base fine-tuned with mixed precision, EMA (0.998) and warmup + cosine LR.
- 04
Calibrate
Decision threshold searched from 0.05 to 0.95 for the best F1.
- 05
Verify
Per-brand evaluation on held-out data: AUC-ROC, F1 and accuracy.
Results
What it produced.
Results per brand · held-out data
Brand A
Brand B
Model configuration
- Backbone
- ConvNeXt-Base (ImageNet-pretrained)
- Image size
- 448 × 448
- Batch size
- 20
- Max epochs
- 600 · early stop after 80
- Learning rate
- 1.5e-4 · warmup + cosine decay
- Weight decay
- 2e-4
- EMA decay
- 0.998
Augmentation probability
Brand names withheld. Each brand is trained and thresholded separately.
Stack & techniques
- PyTorch
- ConvNeXt-Base
- Transfer learning
- Mixed precision (AMP)
- EMA
- Cosine LR schedule
Delivered by members of the Saerosense founding team. Client names are withheld unless public — references are available on request.
Related service
Start a project
Have a similar problem?
Send a few lines about your data and the outcome you want. We reply within two business days with a feasibility read and a proposed scoping plan.