

Machine Learning END-TO-END Project Using Flask API, Docker & AWS to Classify Bank 💵 Counterfeit VS Non-Counterfeit Notes 💵
📍 Production URL for availing this app ➡️ Fake Note Detection
- This project aims to classify Counterfeit and Non-Counterfeit Bank Notes using Machine Learning techniques.
- This project was also Containerized Using Docker.
- Deployment was done using Flask API on an AWS EC2 instance.
- Data were extracted from images that were taken from genuine and forged banknote-like specimens. For digitization, an industrial camera usually used for print inspection was used. The final images have 400x 400 pixels. Due to the object lens and distance to the investigated object gray-scale pictures with a resolution of about 660 dpi were gained. Wavelet Transform tool were used to extract features from images.
- Source ➡️ Kaggle
- Features provided in the dataset are:-
- Variance
- Skewness
- Curtosis
- Entropy
- EDA ➡️ After performing EDA on this dataset, it was easy to conclude that the features ➡️ Variance and Skewness are the most important features which will help us create a clear distinction between fake and genuine notes. For detailed analysis done via EDA, please refer the BankNoteAuth.ipynb file.
- Train-Test split: The dataset was split into 70(train):30(test) ratio. No cross-validation set was created since the dataset is very small. It contains only 1372 data points.
- Data Pre-processing ➡️ The features were simply Standardized.
- Choosing the Machine Learning models ➡️ 3 different ML models were used for analysis and all 3 gave very good results.
- Scoring used ➡️ was f1-score. Below table displays all 3 models and the f1-scores obtained:-
- Support Vector Machine resulted the highest f1-score of 1.0.
- A simple web-app has been built using this model (as shown in the Demo) and Flask API and Containerized using Docker.
- This web-app has also been Deployed into Production using Flask API on an AWS EC2 instance.
- Please refer my documentation Flask_Docker_AWS_Procedures to see how I deployed and containerized.
- Using this web-app, you can enter variance,skewness,curtosis and entropy features extracted by you and the app will tell you if the Note is fake or genuine.
🖍️ matplotlib 🖍️ seaborn 🖍️ numpy 🖍️ pandas 🖍️ prettytable 🖍️ Flask
- Jupyter Notebook
- Sublime Text
- Docker
- AWS

Leave a Reply