- Dataset
- Overview
- Demo
- Screenshots
- Installation
- Deployement on Heroku
- Bug / Feature Request
- Technologies Used
- Team
- Contact
Data Set Information:
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.
Dataset extracted from: https://www.kaggle.com/ritesaluja/bank-note-authentication-uci-data
Attribute Information:
- variance of Wavelet Transformed image (continuous)
- skewness of Wavelet Transformed image (continuous)
- curtosis of Wavelet Transformed image (continuous)
- entropy of image (continuous)
- class (integer)
This example aims to detect fraudulent notes accurately. For that, a set of images taken from genuine and forged banknote-like specimens is created. Features such as wavelet variance, wavelet skewness, wavelet kurtosis, and image entropy are extracted from the images.
The final accuracy obtained by this method is 100% on an independent testing set.
This is a classification project, since the variable to be predicted is binary (fraudulent or legal). The goal here is to model the probability that a banknote is fraudulent, as a function of its features.
Link: https://bank-money-api.herokuapp.com/
The Code is written in Python 3.7. If you don't have Python installed you can find it here. If you are using a lower version of Python you can upgrade using the pip package, ensuring you have the latest version of pip. To install the required packages and libraries, run this command in the project directory after cloning the repository:
pip install -r requirements.txt
For creating the ML model, Jupyter notebook is used. For creating the web app Streamlit framework is used. For running the streamlit python file run the following command in your working directory command prompt.
streamlit run sapp.py
You can also follow the streamlit documentation to know more about it.
We had also developed another web app using Flask framework and Flasgger which is a Flask extension to extract OpenAPI-Specification from all Flask views registered in your API. Flasgger also comes with SwaggerUI embedded so you can access http://localhost:5000/apidocs and visualize and interact with your API resources.
We had used Docker which is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels. Because all of the containers share the services of a single operating system kernel, they use fewer resources than virtual machines. Follow the steps to install Docker. If your system does not supports docker then you can try Docker toolbox.
To dockerize you must create a Dockerfile.
The next step is to open the Docker Quickstart Terminal in your present working directory where all files and Dockerfile is present and shoot this command:
To build the Docker image
docker build -t streamlit_app .
To run the Docker image:
docker run -p 8501:8501 streamlit_app
Instead if you have any problem you can see the Docker Documentation.
Also see the important commands for Docker provide by DZone.
The main sapp.py is used for deployment with Heroku.
To deploy this app we are using Heroku Platform. You must first register on Heroku. Create your new app and give the app name and start deploying with the help of Heroku CLI command or connect your Github account. After successful connecting search your application repository and then start your deploying process. Once the app is successfully build you can visit your web app.
Our next step would be to follow the instruction given on Heroku Documentation to deploy a web app.
The next step is that you must create setup.sh. ‘setup.sh’ specifies the commands to be executed to configure the environment before running the app.
‘Procfile’ lists the commands to be executed to start the app. In our ‘Procfile’, we’ll first run ‘setup.sh’ that creates the required config files and then run the app using the ‘streamlit run’ command.
web: sh setup.sh && streamlit run sapp.py
If you find a bug (the website couldn't handle the query and / or gave undesired results), kindly open an issue here by including your search query and the expected result.
If you'd like to request a new function, feel free to do so by opening an issue here. Please include sample queries and their corresponding results.
Pratik Bambulkar |
You can reach me :