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.ipynbfile 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 joblib6. ๐ Run the Flask Application
Start the application with:
python main.pyVisit 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.