For the demonstration purpose, we're going to test a Real video and Deepfake video of former American President Mr. Doanld Trump and check whether our application detects it. Source of the video 🔗
We have obtained accelerated version of the model after using Intel® oneAPI Deep Neural Network Library
Deepfake_Demo.mp4
This project aims to detect deepfake videos using advanced deep learning techniques, specifically leveraging the ResNeXt-50 model architecture. Deepfake videos, which are highly realistic but fabricated using AI algorithms, pose a significant threat to the authenticity of visual media content. By developing a robust framework for classifying videos as real or fake, we contribute to the ongoing efforts to combat the proliferation of misinformation and preserve the integrity of digital media platforms.
- Utilizes the Celeb-DF-v2 dataset, comprising a 6000+ diverse collection of real and synthesized videos featuring celebrity personas.
- Implements the ResNeXt-50 model architecture for video classification.
- Provides functionality for preprocessing videos, extracting frames, and applying data augmentation techniques.
- Offers inference capabilities for detecting deepfake videos in real time.
- Includes example scripts for training the model and evaluating its performance.
Leveraging the powerful resources provided by Intel Developer Cloud accelerated our development and deployment of the deepfake video detection model. We harnessed the computational capabilities of Intel's CPUs and XPUs to optimize critical components, such as video preprocessing, frame extraction, and model inference.
By taking advantage of Intel's high-performance computing infrastructure and optimized software libraries (e.g., Intel's one deep neural network library), we significantly reduced the time required for data preprocessing, model training, and inference. This allowed for faster experimentation, iterative improvements, and ultimately, a more efficient deployment of our deepfake detection solution.
To run this project, you'll need the following libraries:
- Python 3.x
- oneDNN (Intel's Deep neural Network Library)
- PyTorch
- torchvision
- timm
- OpenCV
- PIL
Download oneDNN source code or clone the repository.
git clone https://github.com/oneapi-src/oneDNN.git
Build the Library
Ensure that all software dependencies are in place and have at least the minimal supported version.
- CMAKE_INSTALL_PREFIX to control the library installation location
- CMAKE_BUILD_TYPE to select between build type (Release, Debug, RelWithDebInfo).
Linux/macOs
Generate makefile:
mkdir -p build && cd build && cmake ..
Build the library:
make -j
Build the doumentation:
make doc
Install the library,headers,and documentations:
make install
Windows
Generate a Microsoft Visual Studio solution:
mkdir build && cd build && cmake -G "Visual Studio 15 2017 Win64" ..
For the solution to use the Intel C++ Compiler, select the corresponding toolchain using the cmake -T switch:
cmake -G "Visual Studio 15 2017 Win64" -T "Intel C++ Compiler 19.0" ..
Build the library:
cmake --build .
You can also use the msbuild command-line tool directly (here /p:Configuration selects the build configuration which can be different from the one specified in CMAKE_BUILD_TYPE, and /m enables a parallel build):
msbuild "oneDNN.sln" /p:Configuration=Release /m
Build the documentation
cmake --build . --target DOC
Install the library, headers, and documentation:
cmake --build . --target INSTALL
Validate the Build
Run unit tests:
ctest
Contributions are welcome! Feel free to submit bug reports, feature requests, or pull requests to help improve this project.
Clone the project
git clone https://github.com/SaiNivedh26/Team-Nooglers
Go to the project directory
cd Team-Nooglers
Install dependencies
pip install -r requirements.txt
Start the server
npm run start
- Developed a custom data pipeline for loading and preprocessing the Celeb-DF-v2 dataset. 📂
- Implemented the ResNeXt-50 model architecture using PyTorch for video classification. 🔥
- Utilized transfer learning techniques by fine-tuning the model on the Celeb-DF-v2 dataset. 🏋️♀️
- Leveraged Intel Developer Cloud's powerful computing resources and optimized libraries (e.g., oneDNN) to accelerate model training and inference. ⚡
This is the comparison of regular code and the same code utlized OneDNN for an 1080 p Video with the duration of 20 seconds. The Implementation of Intel® oneAPI Deep Neural Network Library accelerated the performance by 2.8 - 3 times
This project is licensed under the MIT License.