phamvanhanh6720 / idcardvnrecognition Goto Github PK
View Code? Open in Web Editor NEWRecognize and extract information from ID Card VietNam
Recognize and extract information from ID Card VietNam
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'
Fixed:
uninstall older vietocr: python3 -m pip uninstall vietocr
reinstall newest vietocr: python3 -m pip install vietocr
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]).
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'
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"]
và 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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.