This repository contains a Deepfake Image Detection API built using FastAPI. The API allows you to send images and receive a response indicating whether the image is a deepfake or not.
To run this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/Abdul25Basit/Deepfake-Image-Detection-API.git
-
Navigate to the project directory:
cd Deepfake-Image-Detection-API
Follow the steps below to set up and run the API locally.
python -m venv fastml
- For Windows:
.\fastml\Scripts\activate
- For macOS/Linux:
source fastml/bin/activate
pip install uvicorn gunicorn fastapi pydantic scikit-learn pandas pillow torch transformers python-multipart
uvicorn mlapi:app --reload
The API will be running on http://localhost:8000.
To use the API, send a POST request to the /
endpoint with an image file. Send the image using form data with key name image
and type will be file.
One use case for this API is integrating it into a social media application to distinguish between deepfake images and real images, enhancing the trust and authenticity of the content shared on the platform.
Contributions are welcome! If you have any suggestions or improvements, please create an issue or submit a pull request.
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
. - Make your changes and commit them:
git commit -m 'Add some feature'
. - Push to the branch:
git push origin feature/your-feature-name
. - Open a pull request.
If you have any questions or feedback, please feel free to contact me at [email protected]