# Regula Document Reader web API Python 3.5+ client
[![pypi](https://img.shields.io/pypi/v/regula.documentreader.webclient?style=flat-square)](https://support.regulaforensics.com/hc/en-us/articles/115000916306-Documentation)
[![OpenAPI](https://img.shields.io/badge/OpenAPI-defs-8c0a56?style=flat-square)](https://github.com/regulaforensics/DocumentReader-web-openapi)
[![documentation](https://img.shields.io/badge/docs-en-f6858d?style=flat-square)](https://support.regulaforensics.com/hc/en-us/articles/115000916306-Documentation)
[![live](https://img.shields.io/badge/live-demo-0a8c42?style=flat-square)](https://api.regulaforensics.com/)
Documents recognition as easy as reading two bytes.
If you have any problems with or questions about this client, please contact us
through a [GitHub issue](https://github.com/regulaforensics/DocumentReader-web-python-client/issues).
You are invited to contribute [new features, fixes, or updates](https://github.com/regulaforensics/DocumentReader-web-python-client/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22), large or small;
We are always thrilled to receive pull requests, and do our best to process them as fast as we can.
See [dev guide](./dev.md)
## Install package
`regula.documentreader.webclient` is on the Python Package Index (PyPI):
```bash
pip install regula.documentreader.webclient
```
Or using `pipenv`
```bash
pipenv install regula.documentreader.webclient
```
## Example
Performing request:
```python
from regula.documentreader.webclient import *
with open("australia_passport.jpg", "rb") as f:
input_image = f.read()
with DocumentReaderApi(host='http://localhost:8080') as api:
params = ProcessParams(
scenario=Scenario.FULL_PROCESS,
result_type_output=[Result.DOCUMENT_IMAGE, Result.STATUS, Result.TEXT, Result.IMAGES]
)
request = RecognitionRequest(process_params=params, images=[input_image])
response = api.process(request)
```
Parsing results:
```python
# status examples
response_status = response.status
doc_overall_status = "valid" if response_status.overall_status == CheckResult.OK else "not valid"
# text fields example
doc_number_field = response.text.get_field(TextFieldType.DOCUMENT_NUMBER)
doc_number_mrz = doc_number_field.get_value()
doc_number_visual = doc_number_field.get_value(Source.VISUAL)
doc_number_visual_validity = doc_number_field.source_validity(Source.VISUAL)
doc_number_mrz_validity = doc_number_field.source_validity(Source.MRZ)
doc_number_mrz_visual_matching = doc_number_field.cross_source_comparison(Source.MRZ, Source.VISUAL)
# images fields example
normalized_input_image = response.images.document_image()
portrait_field = response.images.get_field(GraphicFieldType.PORTRAIT)
portrait_from_visual = portrait_field.get_value(Source.VISUAL)
portrait_from_rfid = portrait_field.get_value(Source.RFID, original=True)
```
You can find more detailed guide and run this sample in [example](./example) folder.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
资源分类:Python库 所属语言:Python 资源全名:regula.documentreader.webclient-5.7.0.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
Python库 | regula.documentreader.webclient-5.7.0.tar.gz (149个子文件)
setup.cfg 38B
README.md 3KB
PKG-INFO 3KB
PKG-INFO 3KB
process_params.py 37KB
text_field_type.py 34KB
api_client.py 26KB
document_type.py 18KB
configuration.py 16KB
ocr_security_text_result.py 14KB
fiber_result.py 12KB
rest.py 12KB
text_field.py 12KB
photo_ident_result.py 12KB
chosen_document_type.py 12KB
one_candidate.py 11KB
ocr_security_text_result_all_of.py 11KB
fdsid_list.py 11KB
__init__.py 11KB
doc_visual_extended_field.py 11KB
tfdsid_list.py 10KB
ident_result.py 10KB
verified_field_map.py 10KB
text_field_value.py 10KB
security_feature_result.py 10KB
fiber_result_all_of.py 10KB
__init__.py 10KB
images_field_value.py 10KB
graphic_field.py 9KB
lcid.py 9KB
details_optical.py 9KB
photo_ident_result_all_of.py 9KB
image_qa.py 9KB
process_response.py 9KB
status.py 8KB
ident_result_all_of.py 8KB
check_diagnose.py 8KB
details_rfid.py 8KB
lexical_analysis_result.py 8KB
image_quality_result.py 8KB
authenticity_result.py 8KB
document_types_candidates_result.py 8KB
document_image_result.py 7KB
chosen_document_type_result.py 7KB
graphics_result.py 7KB
text_data_result.py 7KB
security_feature_result_all_of.py 7KB
image_quality_check.py 7KB
text.py 7KB
result_item.py 7KB
images_result.py 7KB
status_result.py 7KB
text_result.py 7KB
device_info.py 7KB
authenticity_check_result_item.py 7KB
process_api.py 7KB
process_request.py 6KB
rfid_origin.py 6KB
rectangle_coordinates.py 6KB
transaction_info.py 5KB
default_api.py 5KB
text_available_source.py 5KB
images_field.py 5KB
cross_source_value_comparison.py 5KB
symbol_candidate.py 5KB
original_symbol.py 5KB
authenticity_check_result.py 5KB
symbol_recognition_result.py 5KB
process_request_image.py 5KB
exceptions.py 5KB
images.py 5KB
area_container.py 4KB
per_document_config.py 4KB
security_feature_type.py 4KB
images_available_source.py 4KB
process_system_info.py 4KB
document_types_candidates_list.py 4KB
image_quality_check_list.py 4KB
document_types_candidates.py 4KB
source_validity.py 4KB
points_container.py 4KB
document_image_result_all_of.py 4KB
raw_image_container_list.py 4KB
string_recognition_result.py 4KB
image_quality_result_all_of.py 4KB
authenticity_result_all_of.py 4KB
area_array.py 4KB
doc_visual_extended_info.py 4KB
graphic_field_type.py 4KB
text_data_result_all_of.py 4KB
container_list.py 4KB
lexical_analysis_result_all_of.py 4KB
document_types_candidates_result_all_of.py 4KB
graphic_fields_list.py 4KB
authenticity_check_list.py 4KB
point.py 4KB
graphics_result_all_of.py 3KB
chosen_document_type_result_all_of.py 3KB
authenticity_check_list.py 3KB
list_verified_fields.py 3KB
共 149 条
- 1
- 2
资源评论
挣扎的蓝藻
- 粉丝: 14w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- (源码)基于SpringBoot和Vue的ELADMIN后台管理系统.zip
- rabbitmq-server-3.12.4-windows安装包
- rabbitmq-server-3.12.5-windows安装包
- (源码)基于SpringBoot框架的教材采购管理系统.zip
- rabbitmq-server-3.12.6-windows安装包
- C#企业人事工资管理系统源码数据库 SQL2008源码类型 WinForm
- 用于谷歌地球引擎的 TensorFlow 时间序列分析的 Python 笔记本CNN.ipynb
- (源码)基于Java的垃圾分类查询系统.zip
- rabbitmq-server-3.12.8-windows安装包
- rabbitmq-server-3.12.9-windows安装包
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功