Screenshot classifier
A lightweight binary classifier for screenshot detection.
Model
mobilenetv3_small_screenshot.keras— trained Keras model for screenshot / not_screenshot classification
Usage
import tensorflow as tf
from tensorflow import keras
model = keras.models.load_model("mobilenetv3_small_screenshot.keras")
# Example inference
img = keras.utils.load_img("image.png", target_size=(224, 224))
arr = keras.utils.img_to_array(img)
arr = tf.keras.applications.mobilenet_v3.preprocess_input(arr)
arr = arr[None, ...]
pred = model.predict(arr)
score = float(pred[0, 0])
label = "screenshot" if score >= 0.5 else "not_screenshot"
print(label, score)
Input format
- RGB images
- resized to
224x224 - model expects a single sigmoid score
Prediction threshold
score >= 0.5→screenshotscore < 0.5→not_screenshot
Notes
- Model backbone:
MobileNetV3Smallpretrained on ImageNet - Output activation:
sigmoid - Loss used during training:
binary_crossentropy