IDIDSentinel
Menu
Research24 HoursExperimentsArchitectureMethodologyFailuresDemoAbout
GitHub ↗

A note to the team that inspired this sprint

Hello HyperVerge team!

I recently interviewed for the Deep Learning Research Intern role. After the interview, I spent time exploring HyperVerge's Identity Verification, Document Verification, Forgery Check, Face Authentication, and fraud/deepfake-detection products—and the computer-vision question behind them: how can a system determine whether an identity presented to it is actually trustworthy?

That led me down a research rabbit hole around document presentation attacks, where genuine IDs can be presented through prints, screens, or manipulated representations. I eventually found the paper “Multi-Branch Forensic Architecture for ID Card Presentation Attack Detection with Portrait Extraction.”

Marko Peterlin & Borut Batagelj · ERK 2025

Instead of only waiting for my interview result, I gave myself 24 hours to implement, test, and critically evaluate the idea from scratch. That became IDSentinel. This website is the complete build story—what worked, what failed, the dataset issues I found, and what I learned.

Implemented in 24 hours · Protocol A-Reduced

Semantic.
Texture. Edge.

IDSentinel is my independent, paper-inspired implementation of a forensic vision system for distinguishing bona fide identity-document captures from print and screen presentation attacks.

Research prototype · no production or state-of-the-art claim

SEMTXTEDG
BEST OBSERVED0.679Macro-F1 · reduced protocol
300balanced samples
3classes
3evaluated models
44frozen test samples

The complete project

Can complementary forensic evidence improve over semantics alone?

Presentation attacks place a reproduction between the camera and the identity document. A printed copy can preserve semantic content while changing surface texture. A screen recapture can preserve layout while adding display structure and edge characteristics.

The project therefore tests three controlled configurations: semantic ConvNeXt alone, semantic plus texture, and semantic plus fixed-Sobel edge evidence. The classifier receives pixels only—never device, source, detector, file-path, or padding metadata.

01

BONA FIDE

Real identity-document capture

02

PRINT

Printed reproduction presented to the camera

03

SCREEN

Document recaptured through another display

Architecture

One audited crop. Complementary representations.

Every model receives the same 384×384 RGB portrait/context crop. The semantic backbone captures higher-level appearance; the texture path measures learned pixel structure; the edge path exposes fixed luminance gradients before lightweight learned processing.

384×384 RGB
portrait + context crop
SemanticConvNeXt-Tinyhigh-level representation
Texture32×32 → 16→32→6464-D representation
EdgeLuminance → Sobel X/Y32-D representation
Tested as two-branch systems
M4: Semantic + Texture · M5: Semantic + Edge
Inspect every layer and freeze decision →

Inside the edge representation

Original → grayscale → Sobel magnitude.

This real M5 research artifact shows deterministic examples across BONA_FIDE, PRINT, and SCREEN, including both correct and failed predictions. The fixed Sobel front end reveals contour structure without pretending it is an attention map or causal explanation.

M5 forensic grid comparing original identity-document crops, grayscale conversions, and Sobel magnitude maps for correct and failed examples across three classes
Recorded experiment visualization · M5 fixed-Sobel edge branch · examples selected deterministically by manifest order

Dataset and scientific controls

Protocol design came before training.

A proposed four-class DLC-2021 + SIDTD merge was blocked because dataset source could reveal the composite label. Instead, the primary experiment uses DLC-2021 alone for BONA_FIDE, PRINT, and SCREEN.

Read the methodology →
214 / 42 / 44train / validation / test
0base-document split violations
0exact or pHash-distance-6 cross-split clusters
300 / 300successful portrait/context crops

Protocol A-Reduced is not the full DLC-2021 benchmark. It is a controlled 24-hour reduced reproduction protocol built under dataset-access, network, storage, and 8 GB laptop constraints.

Frozen test results

Texture produced the highest observed score.

M4 reached 0.679 Macro-F1, driven primarily by observed PRINT improvement. Edge also improved over the semantic baseline overall, but SCREEN F1 decreased in that run.

With 44 test samples and one primary seed, these differences are descriptive—not evidence of statistical superiority.

BONA_FIDE

M30.414
M40.480
M50.480

PRINT

M30.690
M40.889
M50.846

SCREEN

M30.667
M40.667
M50.595
M3

Semantic

0.590Macro-F1

18 failures / 44

M4

Semantic + Texture

0.679Macro-F1

14 failures / 44

M5

Semantic + Edge

0.640Macro-F1

16 failures / 44

Open metrics, confusion matrices, and training curves →

Structured implementation

Six research gates, not one training script.

M0

Audit the paper

Separated paper-described components from assumptions before implementation.

M1

Protect scientific validity

Audited provenance, licensing, lineage, source confounding, and leakage risks.

M2

Build the protocol

Created a deterministic, group-safe 300-sample DLC-2021 reduced benchmark.

M3

Establish semantics

Trained the frozen-split ConvNeXt-Tiny baseline.

M4

Isolate texture

Added a lightweight pixel-only texture branch and learned fusion.

M5

Isolate edges

Added fixed Sobel gradients and a lightweight learned edge branch.

See how I built it in 24 hours

Failure analysis

Branches changed which samples failed.

Of M3's 18 failures, seven were corrected by both branch models, four only by texture, two only by edge, and five persisted across all configurations. BONA_FIDE remained the hardest class.

7corrected by both
4texture only
2edge only
5persistent
Study the failure transitions →

Research-grade by being honest

The limitations stay visible.

Only 300 samples, 44 test cases, one seed, no stochastic augmentation, unequal lineage coverage, a possible padding shortcut, and architecture changes that prevent a perfectly head-matched causal ablation.