Screen ON / OFF Classifier

A tiny CNN binary classifier (~4 k parameters) that tells whether a cropped image of a phone screen is ON (lit / displaying content) or OFF (dark / ambient reflections only).

Designed for ultra-fast CPU inference on a 60 FPS video stream.

Model details

Property Value
Architecture 3-layer CNN + AdaptiveAvgPool + Linear
Input size 1 x 64 x 64 grayscale (channel-first)
Parameters ~4 000
Output single logit (ON = 1, OFF = 0)
Pre-processing Resize -> Grayscale -> [(x/255) - 0.5] / 0.5
Speed target ~1000 FPS on modern CPU (batch=1, ONNX Runtime)

Files

  • โ€“ Trained model (ONNX)
  • โ€“ Python inference helper with built-in pre-processing
  • โ€“ Training script (generates synthetic dataset, trains, exports ONNX)

Usage

Batch inference for higher throughput:

Synthetic training data

The model was trained on a synthetic dataset of 1 200 images per class:

  • ON โ€“ bright screen rectangle with UI-like colour blocks, slight blur, random reflection streaks.
  • OFF โ€“ dark screen rectangle with ambient light reflections, blur, noise.

Both classes include translation augmentations at training time.

Generated by ML Intern

This model repository was generated by ML Intern, an agent for machine learning research and development on the Hugging Face Hub.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support