Skip to content

UrTechTips/FakeNewsClassification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fake News Classification Model

This project implements a multimodal classification model for detecting fake news using the Fakeddit dataset. The model combines BERT for text processing and ResNet for image analysis, leveraging both textual and visual features to improve classification accuracy. By integrating these modalities, the system aims to provide a robust solution for identifying fake news in diverse content formats.

Features

  • Multimodal approach combining text and image analysis.
  • Utilizes BERT for text processing and ResNet for image feature extraction.
  • Trained and evaluated on the Fakeddit dataset.
  • Supports fine-tuning for specific use cases.

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/fake-news-classification.git
    cd fake-news-classification
  2. Create a virtual environment and activate it:

    python -m venv venv
    source venv/bin/activate 

Dataset

Download the Fakeddit dataset from Fakeddit and place it in the data/ directory. Ensure the dataset is preprocessed as required by the model.

Usage

  1. Download the images:

    python get_data.py --tsv_path multimodal_train.tsv
  2. Train the model: Run all the in train_model.ipynb file.

  3. Download the validation images:

    python get_data.py --tsv_path multimodal_validate.tsv --output_csv val_output.csv --image_dir val_images
  4. Validate the model:

    python validate.py

Results

The model achieves the following performance metrics on the Fakeddit dataset:

  • Accuracy: 85%
  • Precision: 85%
  • Recall: 85%

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Commit your changes and push the branch.
  4. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

About

Multimodal Fake News Classification on fakeddit dataset

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published