Coder Social home page Coder Social logo

phamvanhanh6720 / idcardvnrecognition Goto Github PK

View Code? Open in Web Editor NEW
24.0 0.0 12.0 110.47 MB

Recognize and extract information from ID Card VietNam

Python 57.11% CSS 18.17% HTML 23.76% Dockerfile 0.95%
deep-learning recognition ocr-recognition idcard vietnam idcard-ocr

idcardvnrecognition's Introduction

IDCardVNRecognition

  • Recommend: GPU + OS(Ubuntu)

Update

  • I recently updated the new version that is easy to install and is improved slightly in accuracy and performance.

Install Dependencies

# Install an ASGI server, for production such as Uvicorn or Hypercorn.
pip3 install uvicorn[standard]
pip3 install -r requirements.txt

Run Server

uvicorn run:app --host='hostname'

idcardvnrecognition's People

Contributors

dependabot[bot] avatar phamvanhanh6720 avatar sonnguyen129 avatar tranhuuhuy297 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

idcardvnrecognition's Issues

Lỗi khi chạy Demo

Em tải về chạy thử thì nó ra lỗi này. Em xin cách khắc phục ạ!

D:\Downloads\IDCardVNRecognition-master>python run.py
ENV is set to: production
2020-10-13 10:42:50.586144: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
File exists: C:\Users\VBD.cache/gdown\https-COLON--SLASH--SLASH-drive.google.com-SLASH-uc-QUESTION-export-EQUAL-download&id-EQUAL-1-olev206xLgXYf7rnwHrcZLxxLg5rs0p
Traceback (most recent call last):
File "run.py", line 1, in
from app import app
File "D:\Downloads\IDCardVNRecognition-master\app_init_.py", line 10, in
from app import main
File "D:\Downloads\IDCardVNRecognition-master\app\main.py", line 33, in
reader = Predictor(config)
File "D:\Downloads\IDCardVNRecognition-master\reader\reader.py", line 22, in init
model.load_state_dict(torch.load(weights, map_location=torch.device(device)))
File "C:\Users\VBD\AppData\Roaming\Python\Python37\site-packages\torch\nn\modules\module.py", line 1045, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for VietOCR:
size mismatch for transformer.embed_tgt.weight: copying a param with shape torch.Size([232, 256]) from checkpoint, the shape in current model is torch.Size([233, 256]).
size mismatch for transformer.fc.weight: copying a param with shape torch.Size([232, 256]) from checkpoint, the shape in current model is torch.Size([233, 256]).
size mismatch for transformer.fc.bias: copying a param with shape torch.Size([232]) from checkpoint, the shape in current model is torch.Size([233]).

hướng dẫn em fix lỗi này với ạ

Anh có thể cho em xin file hoặc đường dẫn đến cropper với detector được không ạ. Em cảm ơn ạ.
Traceback (most recent call last):
File "run.py", line 1, in
from app.main import app
File "D:\project\v4\IDCardVNRecognition\app\main.py", line 31, in
cropper = Cropper(config_path=download_weights(cfg['cropper']['cfg']),
KeyError: 'cropper'

How to download config and weight?

Dear author, I recently used this code to do some work, but when running main.py, I always get a requests connection error, I found that this error is appearing when the model configuration and weights are downloaded, what should I do?

any help would be appreciate.

Lỗi khi chạy demo

em cài đầy đủ thư viện và chạy demo thì xuất hiện lỗi này, anh cho em cách khắc phục được k ạ. Em cảm ơn ạ

hieu@hieu-X510UQR:~/Desktop/IDCardVNRecognition$ python3 run.py
ENV is set to: production
2020-10-18 19:02:29.610328: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
Traceback (most recent call last):
File "run.py", line 1, in
from app import app
File "/home/hieu/Desktop/IDCardVNRecognition/app/init.py", line 10, in
from app import main
File "/home/hieu/Desktop/IDCardVNRecognition/app/main.py", line 33, in
reader = Predictor(config)
File "/home/hieu/Desktop/IDCardVNRecognition/reader/reader.py", line 14, in init
model, vocab = build_model(config)
File "/home/hieu/.local/lib/python3.6/site-packages/vietocr/tool/translate.py", line 111, in build_model
config['transformer'])
File "/home/hieu/.local/lib/python3.6/site-packages/vietocr/model/transformerocr.py", line 13, in init
self.cnn = CNN(backbone, **cnn_args)
File "/home/hieu/.local/lib/python3.6/site-packages/vietocr/model/cnn.py", line 15, in init
self.model = vgg.vgg19_bn(**kwargs)
TypeError: vgg19_bn() got an unexpected keyword argument 'pretrained'

Tìm input, output node name

Chào bạn, bạn có thể cho mình hỏi 1 câu hơi ngoài lề một chút: Làm sao để tìm ra input và output node name khi gọi tf serving ?

Ví dụ như trong repo của bạn có sử dụng request.inputs["input_1"]result = result.outputs["tf_op_layer_concat_14"].float_val

Mình có thử dùng tool Netron nhưng chỉ tìm được input.

Cám ơn các bạn rất nhiều.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.