--- metrics: - accuracy - f1 --- # NotUrFace-AI: Deepfake Detection Model ## Model Details ### Model Description NotUrFace-AI is a deepfake detection model designed to classify video content as real or fake. It processes first 30-50 video frames using **TensorFlow** and applies advanced machine learning techniques to identify synthetic or manipulated media. This is a passion project aimed at combating deepfake proliferation. The model is particularly useful for: - **Social media content moderation** - **Digital forensics** - **Research in deepfake detection and AI ethics** **Developer:** Sarvansh Pachori **Model Type:** Deepfake detection (video-based classification) **Finetuned from:** XceptionNet (pretrained) ### Model Sources - **Repository:** [sarvansh30/NotUrFace-AI](https://github.com/sarvansh30/NotUrFace-AI) - **Demo:** [Hugging Face Space](https://huggingface.co/spaces/sarvansh/NotUrFace-AI) ## Usage ### Direct Use - Classifying videos as real or fake for research, moderation, or forensic purposes. ### Downstream Use - The model can be fine-tuned with additional deepfake datasets for improved detection on specific video types. ### Out-of-Scope Use - The model is not intended for legal decision-making or high-stakes scenarios where absolute certainty is required. ## Bias, Risks, and Limitations - Accuracy may vary depending on dataset bias and the quality of input videos. - False positives or false negatives can occur, requiring human verification for critical applications. - It may struggle with detecting highly sophisticated, unseen deepfake techniques. ### Recommendations - Users should validate outputs in real-world applications before making critical decisions. - Future improvements may include training on a more diverse dataset to reduce bias. ## Getting Started Use the following code snippet to get started: ```python from transformers import AutoModelForImageClassification, AutoTokenizer model = AutoModelForImageClassification.from_pretrained("sarvansh/NotUrFace-AI") tokenizer = AutoTokenizer.from_pretrained("sarvansh/NotUrFace-AI") ``` ## Evaluation ### Testing Data, Factors & Metrics #### Testing Data The model was tested on unseen samples from the FaceForensics++ and CelebDFv2 datasets. #### Metrics - **Accuracy**: Measures correct classifications. - **F1 Score**: Balances precision and recall. ### Results | Metric | Value | | ------------------- | ------ | | Training Accuracy | 98.44% | | Validation Accuracy | 97.05% | | Test Accuracy | 95.93% | **Disclaimer:** These results were obtained using the FaceForensics++ and CelebDFv2 datasets. Performance in real-world scenarios may vary. ### Tips for Best Performance - The model works best with videos that have **proper lighting**. - It only analyzes the **first 1-1.5 seconds** of a video, so ensure the clip is appropriately selected for evaluation. ## Model Architecture and Objective - **Feature Extraction:** XceptionNet (pretrained on ImageNet) to extract spatial features. - **Temporal Analysis:** LSTM layers to analyze frame dependencies. - **Classification:** Fully connected layers for final binary classification. ## Citation If using this model in research, please cite: **BibTeX:** ``` @article{noturface-ai, author = {Sarvansh Pachori}, title = {NotUrFace-AI: Deepfake Detection Model}, year = {2024}, journal = {Hugging Face Model Hub}, url = {https://huggingface.co/sarvansh/NotUrFace-AI} } ``` ## Contact Information For any issues, improvements, or inquiries, contact: - **Author:** Sarvansh Pachori - **Email:** [sarvansh.pachori45@gmail.com](mailto:sarvansh.pachori45@gmail.com) - **My Github profile:** [sarvansh30](https://github.com/sarvansh30) ---