Instructions to use Rohxn08/CNN_mobilenetv2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use Rohxn08/CNN_mobilenetv2 with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://Rohxn08/CNN_mobilenetv2") - Notebooks
- Google Colab
- Kaggle
Face Anti-Spoofing System (MobileNetV2)
Introduction
The Face Anti-Spoofing System is a biometric security application designed to distinguish between genuine faces (Real) and presentation attacks (Spoof), such as printed photos, video replays, or screen-based attacks.
This repository hosts the Deep Learning component of the system, utilizing MobileNetV2 CNN for robust real-time inference.
Model Summary
Deep Learning Model β MobileNetV2 CNN
The primary model for real-time face anti-spoofing.
- Architecture: MobileNetV2 encoder (top 20 layers fine-tuned) + custom dense classification head
- Input Resolution: 224 Γ 224 RGB
- Output Classes:
Real,Spoof - Key Strengths:
- Detects screen glare, moirΓ© patterns, depth inconsistencies
- Optimized for low-latency real-time inference
Model File:face_antispoofing_v3_224.keras
Features (Full System Context)
Dual-Mode Interface
Static Image Verification
- High-resolution image analysis
- Instant predictions (no temporal smoothing)
- Bounding boxes with confidence scores
- Visual debugging support
Live Webcam Protection
- Real-time face detection
- 10-frame temporal voting window for stable predictions
- Color-coded feedback:
- π’ Green β Real
- π΄ Red β Spoof
- Automatic reset when face leaves or scene changes
Tech Stack
AI & Backend
- TensorFlow / Keras β MobileNetV2 CNN
Core Dependencies
- Python 3.10+
- NumPy
- Pillow (PIL)
Project Structure
This repository contains the trained model file:
face_antispoofing_v3_224.keras: The CNN model (MobileNetV2) trained for face anti-spoofing.README.md: Documentation.
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support