## 🧠 Background

The generation and detection of deepfake images offer valuable insights for stakeholders across computer vision, machine learning, and cybersecurity domains. For instance, researchers and developers participating in deepfake image competitions can use detection rate predictions to refine their generative models and improve robustness against evolving threats.

Furthermore, analyzing trends in deepfake generation techniques can help organizers design more challenging benchmarks that reflect real-world scenarios. Detection predictions also support the development of automated systems to safeguard digital platforms from synthetic image manipulation, thereby helping to ensure the integrity of online content.

Ultimately, understanding both generation and detection trends can illuminate emerging challenges in digital media security and contribute to the formulation of forward-looking strategies and policies. In summary, predicting deepfake generation and detection outcomes plays a crucial role in driving technological innovation and advancing security measures in the era of generative media.

---

## 🎯 Goal

In this competition, your task is to **generation deepfake video**.

To do so, you can transform the given facial videos *using your own manipulation strategy*.

---

## 📂 Dataset

The dataset used in this competition is based on FaceForensics++, a widely-used benchmark dataset for training deepfake generation models. (FaceForensics++ Github: https://github.com/ondyari/FaceForensics)

**- Training Set: FaceForensics++ dataset, containing labels for the target, is available for download outside of Kaggle for competitors to build their models.**

**- Test Set: Use the 590 source data files provided in the Data section to carry out the manipulation tasks.**


---

## 🧪 Workflow

This is a walk-through of how to make a submission to this code competition.

**Train your models (Your choice - Local Machine, VM).** 
You should be training your models outside of Kaggle using local or other resources.
 
**Use Kaggle Notebooks (Notebook or Script) to create your submission (Kaggle).** 
Submissions must be made through Kaggle. You can upload any pre-trained or locally-trained models as data sources to your submission notebook. 

**Select final submissions by the Submission Deadline (Kaggle).**  Participants are required to generate manipulated video data based on the source data provided in the Data section. Participants are required to submit a submission.csv file along with their manipulated videos. The file must include the original video filename, the manipulated video filename, and a description of the manipulation method used.

---

## 📤 Submission

- Make sure that the team name shown in the code section is consistent with your official team name.
- Participants are required to manipulate the face in the given video datasets in Data section. The source video will be released during the middle of the preliminary round, between June 11 and 13.
- **Video generated by manipulating the source video will be submitted by participants and used as the basis for evaluation.**

---

## 🧮 Scoring & Evaluation

- **The final ranking will be based on manipulation dataset**.

Submissions will be scored based on the True Positive Rate (TPR) and the Human Error Rate (HER).

**[True Positive Rate (TPR)]**
$$TPR = \frac{TP}{TP + FN}$$
where

- *TP (True Positives)*: Number of correctly detected deepfake instances  
- *FN (False Negatives)*: Number of deepfakes incorrectly classified as real

**[Human Error Rate (HER)]**
$$HER= \frac{FN}{TP + FN}$$
- *TP (True Positives):* Number of deepfake instances correctly identified by human evaluators
- *FN (False Positives):* Number of deepfake videos wrongly classified as real by human evaluators
- *N:* Total number of evaluated samples  

Higher TPR is better. TPR measures the proportion of actual deepfakes that are correctly detected by the system.
Lower HER is better. HER measures the proportion of deepfakes that are misclassified by humans.

---

## 📄 Report Requirement

There is no single correct solution in machine learning.  
You are encouraged to explore a variety of creative approaches to improve your model.  
However, you must be able to:
- Clearly explain the rationale behind your approach
- Justify your method choices
- Analyze the dataset preprocessing, modeling steps, and results

A detailed technical **report** must be submitted that outlines your methodology and experimental process.

---

## 🕒 Timeline

June 3 - June 21, 2025 - Preliminary round period. 

June 21, 2025 - Final submission deadline.

June 25, 2025 - Finalist teams announcement (Private leaderboard revealed).

July 2, 2025 - Final round & Award ceremony

Note: Because the private test set is held outside of Kaggle's platform, the private leaderboard will not be revealed immediately. We have estimated the scoring timeframe, but this is subject to revision.

All deadlines are at 11:59:00 PM UTC on the corresponding day unless otherwise noted. The competition organizers reserve the right to update the contest timeline if they deem it necessary.

---

## 🏆 Prizes

| **Award**        | **Prize**     | **Number of Teams** |
| ---------------- | ------------- | ------------------- |
| Grand Prize      | KRW 2,500,000 | 1 team              |
| Excellence Award | KRW 1,500,000 | 1 team              |
| Merit Award      | KRW 1,000,000 | 3 teams             |

---

## 💻 Code Requirements

Submissions to this competition must be made through Notebooks. In order for the "Submit to Competition" button to be active after a commit, the following conditions must be met:

CPU Notebook <= 9 hours run-time
GPU Notebook <= 9 hours run-time on Kaggle's P100 GPUs
No internet access enabled
No using other Kaggle notebooks or utility scripts as inputs to your submission notebook. External data also cannot be externally-referenced (i.e. via BigQuery, Github, external URL). Instead, load external models or datasets directly as an external data source.
Submission file must be named "submission.csv"
Please see the [Code Competition FAQ](https://www.kaggle.com/docs/competitions#kernels-only-FAQ). 

---

## ❓ Q&A

If you have any questions, please write them in the [Discussion](https://www.kaggle.com/competitions/Deepfake_Detection_and_Generation_Challenge_Red_Team/discussion)