A bank card number recognition system based on deep-learning.
- Pull and run from Docker Hub.
docker run -it --rm -p 8000:80 --name dc stardustdl/deepcard:cpu
- Visit URL
http://localhost:8000
to see DeepCard website.
- Build DeepCard.Host (needs .NET Core SDK):
cd ./src/DeepCard.Host
dotnet publish -c Release -r linux-x64
- Build docker image:
docker build -t deepcard:cpu -f ./docker/cpu/Dockerfile .
- Start docker container (will use more than 3GB memory):
docker run -it --rm -p 8000:80 --name dc deepcard:cpu
- Visit URL
http://localhost:8000
to see DeepCard website.
If you want to run directly on the host, use this method.
- 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
.
- Run the server:
chmod +x ./run.sh
./run.sh
-
Visit URL
http://localhost:8000
to see DeepCard website. -
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.
Use different shells to run these command, because they need long-run.
-
Copy the trained models to the directories. Or copy
src/DeepCard.API/server.py
to the independent OCR directory, and run the file there. -
Start the OCR API server.
cd ./src/DeepCard.API ; python server.py
- 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"
- Python
- OpenCV
- Tensorflow
- Keras
- Pytorch
- .NET Core 2.2