GitHunt
NU

NukaNarendra/FinancialFraudDetectionUsingML

This project detects financial fraud using machine learning techniques. It includes a pipeline from data collection and model training to deployment with a Flask web app. Users can input transaction data and receive real-time fraud predictions instantly. The models are trained in Google Colab and deployed locally using Flask for easy access.

๐Ÿšจ Financial Fraud Detection Using Machine Learning ๐Ÿšจ

๐Ÿ“– Project Overview

This project is focused on detecting financial fraud using machine learning models. It offers a complete pipeline starting from data collection and model training to deployment through a Flask web application. The objective is to enable users to input transaction data and receive fraud detection predictions in real-time. The machine learning models are trained in Google Colab and deployed locally using Flask.


๐Ÿ“‚ Workflow

1. ๐Ÿ“… Dataset Acquisition

  • Download the dataset from the following link:

2. ๐Ÿ“š Model Training (Google Colab)

  • Open the fraud.ipynb file in Google Colab.
  • Upload the CSV dataset.
  • Execute each cell in the notebook to clean the data, train the machine learning models, and evaluate performance.

3. ๐Ÿ”„ Model Exporting

  • Once the models are trained, export and save them as .h5 (Keras/TensorFlow) or .joblib (Scikit-learn).
  • Download these files and place them in the models/ directory inside your local project folder.

4. ๐Ÿ“ Project Setup (Local Environment)

  • Clone the repository:
    git clone https://github.com/NukaNarendra/FinancialFraudDetectionUsingML
    cd FinancialFraudDetectionUsingML
  • Ensure Python 3.10 or below is installed.

5. ๐Ÿ“š Install Required Dependencies

Install the necessary Python libraries using pip:

pip install flask flask_sqlalchemy werkzeug numpy tensorflow pandas joblib

6. ๐ŸŒ Run the Flask Application

Start the application with:

python main.py

Visit http://127.0.0.1:5000/ on your browser to access the web interface.


๐Ÿ› ๏ธ Tech Stack & Tools

  • Programming Language: Python
  • ML Libraries: TensorFlow, Scikit-learn, Pandas, NumPy, Joblib
  • Web Framework: Flask
  • Notebook: Google Colab
  • Deployment: Localhost via Flask

๐Ÿ“Š Key Features & Results

  • โœ… Trains machine learning models to identify fraudulent financial transactions.
  • โœ… Flask web interface for interactive prediction and user input.
  • โœ… Real-time fraud detection and result display.
  • โœ… Easy-to-use modular structure with pre-trained model integration.

๐Ÿ“ Folder Structure

๐Ÿ“‚ FinancialFraudDetectionUsingML
โ”œโ”€โ”€ ๐Ÿ“ instance
โ”œโ”€โ”€ ๐Ÿ“ static
โ”œโ”€โ”€ ๐Ÿ“ templates
โ”œโ”€โ”€ ๐Ÿ“ models             # Folder to store trained model files
โ”œโ”€โ”€ ๐Ÿ“„ README.md
โ”œโ”€โ”€ ๐Ÿ““ fraud.ipynb        # Google Colab notebook
โ””โ”€โ”€ ๐Ÿ main.py            # Flask application

๐Ÿ”’ Prerequisites

  • Python 3.10 or lower
  • Google Colab for model training
  • Flask & Flask_SQLAlchemy
  • TensorFlow, Pandas, NumPy, Joblib

๐Ÿ‘ฅ Contribution

Contributions are highly welcome! Feel free to raise issues, suggest improvements, or submit pull requests to enhance the functionality and performance.


๐Ÿ‘ค Author

Venkata Narendra Nuka


๐Ÿ“ˆ Future Enhancements

  • ๐Ÿ”” Add real-time alerts for detected frauds via email/SMS.
  • ๐Ÿค– Integrate advanced deep learning models like LSTM or Autoencoders.
  • ๐Ÿ”„ Extend deployment to cloud platforms like Heroku or AWS.
NukaNarendra/FinancialFraudDetectionUsingML | GitHunt