This code is based on opencv orb feature detection. SURF and SIFT features can also be used to extract the notes features. You can change the value of number of features detected by changing n_features in detect.py. Further brute force matching is used for matching the templates with existing notes.
The following instructions will get this project up and running on your local machine for development and testing purposes.
Dataset: https://drive.google.com/open?id=1W3xMiVxuCWw58PRCZ3p8IOqROrXe0Y66
Note: Download the files folder on this drive
-
Clone this repository:
git clone https://github.com/shivamkumard107/CurrencyDetectServer.git
-
Unzip the files folder downloaded from drive then Copy and Paste it in this cloned repository The "files" folder and the python file app.py should be in the same directory
-
Making a virtual environment (Open Terminal):
cd /path/to/this/repo/CurrencyDetectServer
virtualenv env
pip install -r requirements.txt
-
Running the flask server:
python app.py
After running app.py, the flask server will be running at port 4555.
Make Request through Postman
-
In the body section of Postman, write key as "image" and select type as file
-
Select a currency image in the value section
-
Send a post request to
localhost:4555/image
There is an android app made to communicate with the server. Install the app via Android studio or install the apk given in repository README
To get better results increase the number of images of each note type covering different image conditions like background lightning and angle. Concurrently change the dictionary in detect.py or if the dataset is very large you can use a for loop for creating dictionary using glob.
Demo: https://drive.google.com/open?id=1XNjrgGH8JMGXbBmHN6x6_YorIFbFAa2-
- Shivam Kumar - Initial work - shivamkumard107
- Saurabh Pandey - Initial work - Saurabh528
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details