KidsNanny: A Two-Stage Multimodal Content Moderation Pipeline Integrating Visual Classification, Object Detection, OCR, and Contextual Reasoning for Child Safety
Organizations: KidsNanny Research Team, Vartit Technology Inc.
Abstract
We present KidsNanny, a two-stage multimodal content moderation architecture for child safety. Stage 1 combines a vision transformer (ViT) with an object detector for visual screening (11.7 ms); outputs are routed as text not raw pixels to Stage 2, which applies OCR and a text based 7B language model for contextual reasoning (120 ms total pipeline). We evaluate on the UnsafeBench Sexual category (1,054 images) under two regimes: vision-only, isolating Stage 1, and multimodal, evaluating the full Stage 1+2 pipeline. Stage 1 achieves 80.27% accuracy and 85.39% F1 at 11.7 ms; vision-only baselines range from 59.01% to 77.04% accuracy. The full pipeline achieves 81.40% accuracy and 86.16% F1 at 120 ms, compared to ShieldGemma-2 (64.80% accuracy, 1,136 ms) and LlavaGuard (80.36% accuracy, 4,138 ms). To evaluate text-awareness, we filter two subsets: a text+visual subset (257 images) and a text-only subset (44 images where safety depends primarily on embedded text). On text-only images, KidsNanny achieves 100% recall (25/25 positives; small sample) and 75.76% precision; ShieldGemma-2 achieves 84% recall and 60% precision at 1,136 ms. Results suggest that dedicated OCR-based reasoning may offer recall-precision advantages on text-embedded threats at lower latency, though the small text-only subset limits generalizability. By documenting this architecture and evaluation methodology, we aim to contribute to the broader research effort on efficient multimodal content moderation for child safety.
Figures & tables
| Component | Architecture | Input | Output |
|---|---|---|---|
| Image Classifier | ViT-based backbone | RGB image ( ) | Safety probability |
| Object Detector | CNN-based detector | RGB image ( ) | Bounding boxes + class labels + confidence |
| Component | Architecture | Input | Output |
|---|---|---|---|
| OCR Engine | Dedicated OCR module | RGB image (original resolution) | Extracted text with spatial coordinates |
| Contextual Reasoning LLM | 7B LLM | Text: object labels + extracted text | Verdict (Safe/Unsafe) + explanation |
| Capability | NudeNet | FalconsAI | Adam-ViT | Freepik | ShieldGemma-2 | LlavaGuard | KidsNanny |
|---|---|---|---|---|---|---|---|
| Image classification | |||||||
| NSFW object detection | * | ||||||
| Dedicated OCR pipeline | Partial † | Partial † | |||||
| Text safety analysis | Partial † | Partial † | |||||
| Explicit reasoning output | |||||||
| Inference time (ms) | 35 | 7.3 | 7.2 | 15.5 | 1,136 | 4,138 | 11.7 / 120 ‡ |
| Model / Configuration | Accuracy (%) | F1 (%) | Precision (%) | Recall (%) | Inference (ms) |
| Regime 1 — Vision-Only (Stage 1 active; OCR and LLM disabled) | |||||
| FalconsAI | 59.01 | 56.28 | 91.15 | 40.70 | 7.3 |
| NudeNet | 68.03 | 76.01 | 73.96 | 78.18 | 35 |
| Adam-ViT | 68.98 | 73.90 | 81.23 | 67.79 | 7.2 |
| Freepik | 77.04 | 81.12 | 86.81 | 76.13 | 15.5 |
| KidsNanny Stage 1 | 80.27 | 85.39 | 82.05 | 89.02 | 11.7 |
| Model | Accuracy (%) | F1 (%) | Precision (%) | Recall (%) | Inference (ms) |
| Text+Visual subset (257 images — visual content with embedded text) | |||||
| ShieldGemma-2 | 54.86 | 51.67 | 72.94 | 40.00 | 1136 |
| LlavaGuard | 76.45 | 79.18 | 84.06 | 74.84 | 4138 |
| KidsNanny (Stage 1+2) | 81.08 | 85.11 | 80.46 | 90.32 | 115 |
| Text-Only subset (44 images — safety depends primarily on embedded text) | |||||
| ShieldGemma-2 | 59.09 | 70.00 | 60.00 | 84.00 | 1136 |
| Dimension | KidsNanny | ShieldGemma-2 | LlavaGuard |
|---|---|---|---|
| Primary focus | Balanced (FN+FP) | Recall maximisation | Balanced accuracy |
| Recall (full) | 89.31% | 93.56% (highest) | 83.02% |
| Recall (text-only) | 100.00% | 84.00% | 56.00% |
| Precision | 83.22% | 64.96% | 86.17% |
| Inference speed | 120 ms | 1,136 ms | 4,138 ms |
| Context input | ViT + Object + OCR | Vision encoder ( incidental text) | Vision encoder |