Skip to content
This repository has been archived by the owner on Jul 16, 2019. It is now read-only.

A bank card number recognition system based on deep-learning.

License

Notifications You must be signed in to change notification settings

eXceediDeaL/DeepCard-Tensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeepCard

A bank card number recognition system based on deep-learning.

Usage

Docker

Pull Image

  1. Pull and run from Docker Hub.
docker run -it --rm -p 8000:80 --name dc stardustdl/deepcard:cpu
  1. Visit URL http://localhost:8000 to see DeepCard website.

Rebuild Image

  1. Build DeepCard.Host (needs .NET Core SDK):
cd ./src/DeepCard.Host
dotnet publish -c Release -r linux-x64
  1. Build docker image:
docker build -t deepcard:cpu -f ./docker/cpu/Dockerfile .
  1. Start docker container (will use more than 3GB memory):
docker run -it --rm -p 8000:80 --name dc deepcard:cpu
  1. Visit URL http://localhost:8000 to see DeepCard website.

Host

If you want to run directly on the host, use this method.

  1. Install dependences:
chmod +x ./build.sh
./build.sh

If you need to build GUI from the source code, you need to install .NET Core SDK first. These commands are commentted in build.sh.

  1. Run the server:
chmod +x ./run.sh
./run.sh
  1. Visit URL http://localhost:8000 to see DeepCard website.

  2. If you want to batch images, copy your images into ./src/DeepCard.API/test_images and use these commands:

cd ./src/DeepCard.API
python3 ./demo.py

The results will be at ./src/DeepCard.API/test_result/result.txt, each line contains a file name and its recognization result.

Development

Use different shells to run these command, because they need long-run.

  1. Copy the trained models to the directories. Or copy src/DeepCard.API/server.py to the independent OCR directory, and run the file there.

  2. Start the OCR API server.

cd ./src/DeepCard.API ; python server.py
  1. Start the website host server
dotnet run -p ./src/DeepCard.Host

Then visit the URL http://localhost:5000. You can see the website.

Hints: If you want to debug host without real OCR, start the demo API server with command: dotnet run -p ./src/DeepCard.API.Demo --urls="http://localhost:4000"

Dependences

  1. Python
  2. OpenCV
  3. Tensorflow
  4. Keras
  5. Pytorch
  6. .NET Core 2.2

Reference

Collaborators