Instructions to use mancooper/FaceAuthenticator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use mancooper/FaceAuthenticator 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://mancooper/FaceAuthenticator") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,127 +8,121 @@ language:
|
|
| 8 |
- en
|
| 9 |
pipeline_tag: image-classification
|
| 10 |
tags:
|
| 11 |
-
-
|
| 12 |
-
-
|
| 13 |
-
-
|
| 14 |
- vgg16
|
| 15 |
-
-
|
| 16 |
---
|
| 17 |
|
| 18 |
# FaceAuthenticator.keras
|
| 19 |
|
| 20 |
## Model Card
|
| 21 |
|
| 22 |
-
### Model
|
| 23 |
|
| 24 |
-
|
| 25 |
-
- **Developer:** Prathmesh Patil
|
| 26 |
-
- **Model Architecture:** VGG16-based Convolutional Neural Network (CNN)
|
| 27 |
-
- **Face Detection:** YOLO (You Only Look Once)
|
| 28 |
-
- **Model Framework:** Keras
|
| 29 |
-
- **License:** MIT
|
| 30 |
-
- **Task:** Face detection and real/fake face image classification
|
| 31 |
-
|
| 32 |
-
### Model Description
|
| 33 |
|
| 34 |
-
|
| 35 |
|
| 36 |
-
|
| 37 |
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
-
### Intended Use
|
| 41 |
|
| 42 |
-
|
| 43 |
|
| 44 |
-
The model can be used to
|
| 45 |
|
| 46 |
-
|
| 47 |
|
| 48 |
Potential applications include:
|
| 49 |
-
- Preliminary deepfake image detection.
|
| 50 |
-
- Facial image authenticity analysis.
|
| 51 |
-
- Integration into image verification tools.
|
| 52 |
-
- Educational and research projects involving computer vision.
|
| 53 |
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
The system consists of two primary components:
|
| 61 |
|
| 62 |
-
|
| 63 |
-
2. **VGG16-Based Classification:** Extracts facial image features and classifies the detected face as real or fake.
|
| 64 |
|
| 65 |
-
|
| 66 |
|
| 67 |
-
|
| 68 |
|
| 69 |
-
|
| 70 |
|
| 71 |
-
|
| 72 |
|
| 73 |
-
|
| 74 |
|
| 75 |
-
|
| 76 |
|
| 77 |
```text
|
| 78 |
-
dataset
|
| 79 |
-
βββ
|
| 80 |
-
|
| 81 |
-
β
|
|
|
|
| 82 |
βββ train.csv
|
| 83 |
-
βββ valid
|
| 84 |
-
β βββ fake
|
| 85 |
-
β βββ real
|
| 86 |
βββ valid.csv
|
| 87 |
```
|
| 88 |
|
| 89 |
-
The
|
| 90 |
|
| 91 |
-
|
| 92 |
|
| 93 |
-
###
|
| 94 |
|
| 95 |
-
|
| 96 |
-
- **Evaluation:** Validation performance should be assessed using representative, previously unseen images.
|
| 97 |
-
- **Additional Metrics:** Precision, recall, F1-score, and a confusion matrix are recommended for a more comprehensive evaluation.
|
| 98 |
|
| 99 |
-
|
| 100 |
|
| 101 |
-
- **
|
| 102 |
-
- **
|
| 103 |
-
- **
|
| 104 |
-
- **
|
| 105 |
-
- **
|
| 106 |
-
- **Limited Evaluation:** The reported accuracy alone does not establish reliability across all real-world scenarios.
|
| 107 |
|
| 108 |
-
|
| 109 |
|
| 110 |
-
|
| 111 |
|
| 112 |
-
The model
|
| 113 |
-
|
| 114 |
-
### How to Get Started
|
| 115 |
|
| 116 |
-
|
| 117 |
|
| 118 |
-
|
| 119 |
|
| 120 |
-
|
| 121 |
-
2. Use YOLO to detect and localize faces.
|
| 122 |
-
3. Extract the detected facial regions.
|
| 123 |
-
4. Apply the preprocessing required by the VGG16-based classifier.
|
| 124 |
-
5. Run classification to obtain the real/fake prediction.
|
| 125 |
|
| 126 |
-
|
| 127 |
|
| 128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
|
| 130 |
-
|
| 131 |
|
| 132 |
-
|
|
|
|
|
|
|
|
|
|
| 133 |
|
| 134 |
-
|
|
|
|
| 8 |
- en
|
| 9 |
pipeline_tag: image-classification
|
| 10 |
tags:
|
| 11 |
+
- deep-learning
|
| 12 |
+
- computer-vision
|
| 13 |
+
- cnn
|
| 14 |
- vgg16
|
| 15 |
+
- face-authentication
|
| 16 |
---
|
| 17 |
|
| 18 |
# FaceAuthenticator.keras
|
| 19 |
|
| 20 |
## Model Card
|
| 21 |
|
| 22 |
+
### 1. Model Overview
|
| 23 |
|
| 24 |
+
**FaceAuthenticator.keras** is a deep learning model developed by Prathmesh Patil for classifying facial images as real or fake. The model uses the VGG16 convolutional neural network (CNN) architecture to extract visual features and distinguish between authentic facial images and potentially manipulated or synthetic images.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
The model is designed for experimental applications in facial image classification and deepfake detection.
|
| 27 |
|
| 28 |
+
### 2. Model Details
|
| 29 |
|
| 30 |
+
- **Model Name:** FaceAuthenticator.keras
|
| 31 |
+
- **Developer:** Prathmesh Patil
|
| 32 |
+
- **Model Architecture:** VGG16
|
| 33 |
+
- **Model Type:** Convolutional Neural Network (CNN)
|
| 34 |
+
- **Framework:** Keras
|
| 35 |
+
- **Task:** Binary image classification
|
| 36 |
+
- **Output Classes:** Real Image, Fake Image
|
| 37 |
+
- **Training Duration:** 10 epochs
|
| 38 |
+
- **Reported Validation Accuracy:** Approximately 82%
|
| 39 |
+
- **License:** MIT
|
| 40 |
|
| 41 |
+
### 3. Intended Use
|
| 42 |
|
| 43 |
+
#### Direct Use
|
| 44 |
|
| 45 |
+
The model can be used to classify facial images into real and fake categories. It is intended for experimentation, educational purposes, and prototyping computer vision applications involving facial image authenticity.
|
| 46 |
|
| 47 |
+
#### Downstream Applications
|
| 48 |
|
| 49 |
Potential applications include:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
+
- Deepfake detection prototypes.
|
| 52 |
+
- Facial image authenticity analysis.
|
| 53 |
+
- Computer vision research and experimentation.
|
| 54 |
+
- Integration into web applications and image analysis tools.
|
| 55 |
+
- Development of educational projects involving CNN-based image classification.
|
|
|
|
|
|
|
| 56 |
|
| 57 |
+
The model may require additional training, calibration, and evaluation before being adapted to a specific application.
|
|
|
|
| 58 |
|
| 59 |
+
#### Out-of-Scope Use
|
| 60 |
|
| 61 |
+
The model is not intended to serve as a standalone identity verification or access-control system. It does not establish a person's identity or determine whether an individual is authorized to access a system.
|
| 62 |
|
| 63 |
+
It should not be used as the sole basis for security-critical decisions, identity verification, or other high-impact applications.
|
| 64 |
|
| 65 |
+
### 4. Training Data
|
| 66 |
|
| 67 |
+
The model was trained using a dataset containing facial images categorized into real and fake classes.
|
| 68 |
|
| 69 |
+
The dataset follows the directory structure below:
|
| 70 |
|
| 71 |
```text
|
| 72 |
+
dataset/
|
| 73 |
+
βββ dataset-metadata.json
|
| 74 |
+
βββ train/
|
| 75 |
+
β βββ fake/
|
| 76 |
+
β βββ real/
|
| 77 |
βββ train.csv
|
| 78 |
+
βββ valid/
|
| 79 |
+
β βββ fake/
|
| 80 |
+
β βββ real/
|
| 81 |
βββ valid.csv
|
| 82 |
```
|
| 83 |
|
| 84 |
+
The training and validation datasets are organized to support supervised binary image classification.
|
| 85 |
|
| 86 |
+
Detailed information about the dataset's origin, size, demographic composition, and collection methodology has not been specified.
|
| 87 |
|
| 88 |
+
### 5. Training Procedure
|
| 89 |
|
| 90 |
+
The model uses the VGG16 architecture to learn visual features from facial images and classify them into the designated categories.
|
|
|
|
|
|
|
| 91 |
|
| 92 |
+
**Reported training configuration:**
|
| 93 |
|
| 94 |
+
- **Architecture:** VGG16
|
| 95 |
+
- **Training Epochs:** 10
|
| 96 |
+
- **Learning Approach:** Supervised learning
|
| 97 |
+
- **Task:** Binary image classification
|
| 98 |
+
- **Reported Accuracy:** Approximately 82%
|
|
|
|
| 99 |
|
| 100 |
+
The reported accuracy should be interpreted in the context of the dataset and evaluation procedure used during development. Independent testing is recommended to assess generalization to unseen images and different data distributions.
|
| 101 |
|
| 102 |
+
### 6. Performance and Evaluation
|
| 103 |
|
| 104 |
+
The model achieved an approximate accuracy of 82% during its reported evaluation.
|
|
|
|
|
|
|
| 105 |
|
| 106 |
+
Performance may vary depending on image quality, image preprocessing, compression artifacts, facial occlusions, and differences between the training data and real-world inputs.
|
| 107 |
|
| 108 |
+
Further evaluation using independent test datasets and metrics such as precision, recall, F1-score, and a confusion matrix would provide a more comprehensive assessment of model performance.
|
| 109 |
|
| 110 |
+
### 7. Limitations and Potential Risks
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
|
| 112 |
+
The model has several limitations that users should consider:
|
| 113 |
|
| 114 |
+
- **Dataset dependency:** Performance depends on the quality, diversity, and representativeness of the training data.
|
| 115 |
+
- **Generalization:** The model may perform differently on images from sources or domains not represented during training.
|
| 116 |
+
- **Image quality:** Low resolution, compression, poor lighting, and occlusions may affect predictions.
|
| 117 |
+
- **Potential bias:** Underrepresentation of particular demographic groups or image-generation techniques may lead to uneven performance.
|
| 118 |
+
- **Prediction reliability:** An individual prediction may be incorrect, even when the model performs well overall.
|
| 119 |
+
- **Evolving manipulation techniques:** New image-generation and manipulation methods may reduce the model's effectiveness over time.
|
| 120 |
|
| 121 |
+
The model's predictions should be treated as estimates rather than definitive proof of image authenticity.
|
| 122 |
|
| 123 |
+
------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| 124 |
+
THIS MODEL IS OLD AND I AM STILL WORKING ON THE NEWER VERSION OF IT
|
| 125 |
+
THANK YOU FOR DOWNLOADING THE MODEL I HOPE YOU WILL LIKE IT
|
| 126 |
+
------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| 127 |
|
| 128 |
+
###
|