mayankjain2710/fakenewsdetection

CSS

0

9 commits

updated Jun 25, 2025

See the code

README

📰 Fake News Detection System (Multi-Modal)

An advanced AI-powered web application that detects fake news across multiple formats — including text articles, AI-generated images, and deepfake videos. Built with modern ML/NLP/CV techniques, it helps reduce misinformation by analyzing and classifying the authenticity of various content types in real time.


🚀 Features

  • 🧠 Detects fake vs real news articles using NLP + ML
  • 🖼️ Detects AI-generated images using CNNs and Transformer models
  • 🎞️ Detects deepfake or tampered videos using video forensics techniques
  • 📑 Text classification using pretrained transformer models (e.g., BERT)
  • 🌐 Web-based UI built with React for easy testing
  • ⚡ FastAPI backend with endpoints for text, image, and video input
  • 🧾 Clean and simple UI for testing all media types
  • 🔁 Trained on diverse datasets (Kaggle, FakeNewsNet, FF++)

🛠️ Tech Stack

Frontend:

  • React.js
  • Axios

Backend:

  • Python
  • FastAPI
  • Scikit-learn
  • HuggingFace Transformers
  • OpenCV
  • TensorFlow / PyTorch (for CV models)
  • NLTK, NumPy, Pandas

📦 Installation & Setup

🔧 Prerequisites

  • Python 3.8+
  • Node.js & npm
  • pip or virtualenv
  • CUDA (optional for GPU-based video/image models)

1️⃣ Clone the repository

git clone https://github.com/your-username/fake-news-detector.git
cd fake-news-detector

2️⃣ Backend Setup (FastAPI)

cd backend
pip install -r requirements.txt
uvicorn main:app --reload

📍 The FastAPI backend will start at: http://localhost:8000

3️⃣ Frontend Setup (React)

cd frontend
npm install
npm start

📍 The React app will start at: http://localhost:3000

📥 Input Types Supported

📝 News articles (text)

🖼️ Image files (e.g., .jpg, .png)

🎞️ Video files (e.g., .mp4, .avi)

Each content type is analyzed separately by a dedicated ML model.

📈 How It Works

📝 Text: User enters news content → Sent to backend → NLP model analyzes → Returns ✅ Real or ❌ Fake.

🖼️ Image: User uploads image → CNN/Transformer model checks for AI generation → Returns result.

🎞️ Video: User uploads video → Frames analyzed for deepfakes → Returns authenticity status.

Each result is shown instantly on the frontend with a confidence score.

📈 Output

✅ Real / ❌ Fake classification

⚠️ Confidence scores

📊 Optionally show visual explanation (Grad-CAM, attention maps)

📸 Frontend Screenshots

Screenshots of the user interface for testing news, images, and videos.

📝 News Detection UI

Screenshot

Screenshot

Screenshot

Screenshot

Screenshot

mayankjain2710/fakenewsdetection

CSS

0

9 commits

updated Jun 25, 2025

See the code

README

📰 Fake News Detection System (Multi-Modal)

An advanced AI-powered web application that detects fake news across multiple formats — including text articles, AI-generated images, and deepfake videos. Built with modern ML/NLP/CV techniques, it helps reduce misinformation by analyzing and classifying the authenticity of various content types in real time.


🚀 Features

  • 🧠 Detects fake vs real news articles using NLP + ML
  • 🖼️ Detects AI-generated images using CNNs and Transformer models
  • 🎞️ Detects deepfake or tampered videos using video forensics techniques
  • 📑 Text classification using pretrained transformer models (e.g., BERT)
  • 🌐 Web-based UI built with React for easy testing
  • ⚡ FastAPI backend with endpoints for text, image, and video input
  • 🧾 Clean and simple UI for testing all media types
  • 🔁 Trained on diverse datasets (Kaggle, FakeNewsNet, FF++)

🛠️ Tech Stack

Frontend:

  • React.js
  • Axios

Backend:

  • Python
  • FastAPI
  • Scikit-learn
  • HuggingFace Transformers
  • OpenCV
  • TensorFlow / PyTorch (for CV models)
  • NLTK, NumPy, Pandas

📦 Installation & Setup

🔧 Prerequisites

  • Python 3.8+
  • Node.js & npm
  • pip or virtualenv
  • CUDA (optional for GPU-based video/image models)

1️⃣ Clone the repository

git clone https://github.com/your-username/fake-news-detector.git
cd fake-news-detector

2️⃣ Backend Setup (FastAPI)

cd backend
pip install -r requirements.txt
uvicorn main:app --reload

📍 The FastAPI backend will start at: http://localhost:8000

3️⃣ Frontend Setup (React)

cd frontend
npm install
npm start

📍 The React app will start at: http://localhost:3000

📥 Input Types Supported

📝 News articles (text)

🖼️ Image files (e.g., .jpg, .png)

🎞️ Video files (e.g., .mp4, .avi)

Each content type is analyzed separately by a dedicated ML model.

📈 How It Works

📝 Text: User enters news content → Sent to backend → NLP model analyzes → Returns ✅ Real or ❌ Fake.

🖼️ Image: User uploads image → CNN/Transformer model checks for AI generation → Returns result.

🎞️ Video: User uploads video → Frames analyzed for deepfakes → Returns authenticity status.

Each result is shown instantly on the frontend with a confidence score.

📈 Output

✅ Real / ❌ Fake classification

⚠️ Confidence scores

📊 Optionally show visual explanation (Grad-CAM, attention maps)

📸 Frontend Screenshots

Screenshots of the user interface for testing news, images, and videos.

📝 News Detection UI

Screenshot

Screenshot

Screenshot

Screenshot

Screenshot