Skip to content

Real-Time Misinformation Detection and Verification System for Broadcast Media

Notifications You must be signed in to change notification settings

vatsal-afk/Facto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Welcome to Facto!

Facto is a Real-Time Misinformation Detection and Verification System for Broadcast Media. It analyzes news from various sources in real-time, validates its credibility, and provides accurate information to users.


App Screenshot

Project Setup

Prerequisites

Ensure that you have the following software installed before setting up the project:

  • Node.js (v14 or later)
  • npm (v6 or later)
  • python
  • pip

Steps to Set Up the Project

  1. Clone the repository:
git clone https://github.com/vatsal-afk/facto.git
  1. Set up the Backend:

For UNIX (Mac/Linux) Users:

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
chmod +x run_backend.sh
./run_backend.sh

For Windows Users (PowerShell)

python -m venv venv
venv\Scripts\Activate
pip install -r requirements.txt
Set-ExecutionPolicy Unrestricted -Scope Process
./run_backend.ps1
  1. Set up the Frontend: Navigate to the @/frontend directory:
cd ../frontend
npm install
npm run dev

Configuration

To configure the project, create a .env file in the root directory with (feel free to mail the developers for the environment variables)

GUARDIAN_API_KEY = ""
NEWS_API_KEY = ""
REDDIT_CLIENT_ID = ''
REDDIT_CLIENT_SECRET = ""

NEXT_PUBLIC_GUARDIAN_API_KEY = ""
NEXT_PUBLIC_YOUTUBE_API_KEY = ""
NEXT_PUBLIC_DEPLOYED_CONTRACT_ADDRESS = "0xA1d0071641C156d7fd035Fa01169a164EEe3B786"
NEXT_PUBLIC_GOOGLE_API_KEY = ""
NEXT_PUBLIC_NEWS_API_KEY = ""
MONGODB_URI = "mongodb+srv://tanmaysdream9460:[email protected]/facto"
NEXTAUTH_SECRET="do_not_fall_in_trap"
NEXTAUTH_URL="http://localhost:3000"
NEXT_PUBLIC_GOOGLE_CUSTOM_SEARCH_ENGINE_ID=""

Features

  1. Custom News Input for Verification
  2. Graphical Analysis of Custom News
  3. YouTube News Verification System
  4. Role-Based Access Control
  5. Blockchain-Based Voting for Verified Users
  6. Discussion Forum for General Users
  7. Trending News and Social Media Insights

How to Become a Verified User βœ…

To improve the reliability and credibility of the platform, users can become verified based on their contributions, such as sharing news insights or engaging in discussions. This feature is designed for professionals or individuals who actively contribute to the platform’s goals. 🌍


Steps to Become Verified πŸ”‘

  1. Sign Up πŸ“:
    Visit the Auth Page and sign up as a general user.

  2. Submit Credentials πŸ“„:
    Provide documentation that confirms your professional background or contributions to specific news topics.

  3. Verification Review πŸ”:
    The verification team will assess your submission and confirm your status within a few days.

  4. Voting Access πŸ—³οΈ:
    After verification, you'll gain the ability to vote on news accuracy and contribute to the model’s evaluation.


Benefits of Verification 🌟

  • Contribute Meaningfully 🌐: Verified users can vote to determine whether news is real or fake.

  • Build Credibility πŸ†: Verified status enhances your recognition as a trustworthy participant.

  • Support Accuracy πŸ“Š: Your verified status helps improve the quality of news verification.


Voting feature:

For getting the feedback of the generalist and verified user we will have the voting feature for the verdict that is being generated by the server, and here is a quick walkthrough for that:

App Screenshot

First you will connect to the metamask and login to get the blockchain server started then there will be the traction page appearing.

App Screenshot

In the transaction page, once the transaction is completed you will be able to vote.

App Screenshot

Just click on the upvote and downvote option to express your required sentiments.

Web Scraping for Recent News

App Screenshot

This feature collects and analyzes the latest news articles from reliable sources like The Guardian, Reddit, and News API. Using libraries like BeautifulSoup for HTML parsing, Requests for HTTP requests, and praw for accessing Reddit’s API, the platform retrieves diverse and up-to-date content. The data is then processed for analysis and insights, ensuring relevant news is always available for verification.


About the Models

1. πŸ“°Fake News Verification Model

This model verifies the authenticity of news by comparing custom inputs to trusted sources. It uses advanced natural language processing (NLP) and embedding-based similarity checks to assess the credibility of news claims.

✨Key Features:

  • πŸ”—Embedding-Based Comparison: Compares news input embeddings with external sources to check for similarities.
  • πŸ“šFact Density: Measures the factual depth of news to detect sensationalism.
  • πŸ”€Lexical Diversity: Assesses vocabulary richness to flag repetitive or overly simplified language.
  • 😊Sentiment Analysis: Evaluates emotional bias in the content, aiming for neutrality.
  • πŸ“–Readability: Ensures content is clear and not oversimplified.

βš™οΈHow It Works:

  1. ✍️Input News: Custom news input is provided.
  2. 🧠Embedding Extraction: The input is transformed into embeddings.
  3. πŸ”Similarity Check: The model compares the embeddings to trusted sources.
  4. πŸ”§Refinement: Additional parameters (fact density, sentiment, etc.) refine the decision.
  5. βœ…Output: The model returns a credibility score and a verdict (real or fake).

πŸ“Š Visual Output:

  • Bar charts and interactive symbols display scores for each parameter, providing a clear visual summary of the news verification process.
  • Knowledge graph for getting the sense out of the news.

πŸ› οΈ Models Used

Feature Models/Tools
Embedding Comparison BERT, RoBERTa, SBERT
Fact Density T5, GPT, Google Knowledge Graph API
Lexical Diversity spaCy, TextBlob
Sentiment Analysis VADER Sentiment, BERT-Sentiment
Readability Scoring Flesch-Kincaid Readability Tests, Custom Algorithms

πŸŽ₯ Live News Verification from YouTube

This repository contains a Live News Verification Model that processes YouTube videos to verify the authenticity of news. The model extracts audio, transcribes it, and analyzes the content in smaller, meaningful chunks to ensure accurate evaluation.

App Screenshot


πŸš€ Features

  • 🎡 Audio Extraction
    Extract audio directly from YouTube videos using youtube-dlp.

  • πŸ“„ Whisper for Transcription
    Convert audio to text with high accuracy using the Whisper model.

  • πŸ“ News Chunking
    Break transcribed text into smaller, context-specific chunks for efficient analysis.

  • βŒβœ… Fake News Classification
    Analyze and classify news chunks as real or fake using trusted source comparison.

  • ⏳ Timestamp Flexibility
    Start analyzing from a specific timestamp for focused evaluations.


πŸ› οΈ Models and Tools Used

Feature Models/Tools
Audio Extraction youtube-dlp
Audio Transcription Whisper
Embedding Comparison BERT, RoBERTa
Fake News Classification SBERT, GPT
Chunking & Analysis spaCy, Custom Algorithms

πŸ“‹ How It Works

  1. Input Video: Upload the YouTube video URL to be analyzed.
  2. Audio Conversion: Extract audio from the video using youtube-dlp.
  3. Audio Transcription: Transcribe the extracted audio to text using the Whisper model.
  4. Content Chunking: Split the transcription into smaller chunks for detailed analysis.
  5. Verification: Compare each chunk with embeddings from trusted sources to classify news as real βœ… or fake ❌.
  6. Timestamp Selection: Optionally select a starting timestamp for targeted analysis.

πŸ“Š Visual Outputs

  • Detailed classification for each chunk with timestamps.
  • Bar charts and credibility scores for visual summary.

Flow of the project

Here is a detailed flowchart showing various routes:

sequenceDiagram
    participant User
    participant Dashboard
    participant Auth
    participant TrendAnalysis
    participant Counter
    participant LiveBroadcast
    participant Transcribe
    participant Process
    participant CustomNews
    participant GraphAnalysis
    participant Bills
    participant UN
    participant SocialMedia

    User->>Dashboard: Access Tailor-made Dashboard
    Dashboard->>Auth: User Login (Journalist/General)
    Auth->>Dashboard: Return Authenticated User
    
    Dashboard->>TrendAnalysis: Analyze Recent News Articles
    TrendAnalysis->>Counter: Vote on Articles
    
    Dashboard->>LiveBroadcast: Analyze Live YouTube Broadcast
    LiveBroadcast->>Transcribe: Use yt-dlp & FFmpeg for Audio Extraction
    Transcribe->>Process: Summarize Transcription
    
    Dashboard->>CustomNews: Input Custom News Data
    CustomNews->>GraphAnalysis: Analyze Custom News

    Dashboard->>Bills: Get Recent Parliamentary Bills
    Dashboard->>UN: Get Latest UN Convention Updates
    Dashboard->>SocialMedia: Analyze Social Media Links

    Note right of TrendAnalysis: Trend analysis helps in identifying fake news
    Note right of Counter: Voting allows users to reduce misinformation
    Note right of LiveBroadcast: Extracting and transcribing YouTube live videos
    Note right of GraphAnalysis: Web scraping and graph-based news analysis
Loading

Thank You!

Developed by Cybr_Rakshak πŸš€

About

Real-Time Misinformation Detection and Verification System for Broadcast Media

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •