Skip to main content

Answer sheet ID recognition

Project description

wx_paper_parser

Answer-sheet student-ID recognition library — barcode / QR + handwritten bubble filling, with CNN OCR fallback.

答题卡学号识别库。从扫描或拍摄的答题卡图像中识别考号(条码 / 二维码 + 手写填涂)。

识别流程

入口 EnhanceIdExtractor 按速度优先依次 fallback:

条码 / 二维码 → CNN 检测 + OCR → 遗留识别器
  • 条码 / 二维码:最快,命中即返回
  • CNN 检测 + 手写 OCR:定位学号区域并逐位识别
  • 遗留识别器:兼容旧版填涂式布局

安装

pip install wx_paper_parser

依赖

安装时自动拉取:opencv-pythonnumpyonnxruntimepyyamlzxing-cppshapely

要求 Python ≥ 3.10。

用法

import cv2
from wx_paper_parser import EnhanceIdExtractor

extractor = EnhanceIdExtractor()                     # 默认使用包内模型,懒加载
img = cv2.imread("answer_sheet.jpg")

angle, corrected = extractor.correct_direction(img)  # 校正纸张方向
student_id = extractor.read_code(corrected)          # 识别学号
print(student_id)

主要模块

名称 说明
EnhanceIdExtractor 识别入口,按速度优先 fallback
read_barcode 条码 / 二维码读取
CNNIdRecognizer CNN 检测 + OCR 管线
CompositionIdRecognizer 遗留识别器

完整导出见 wx_paper_parser/__init__.py

License

GPL-3.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wx_paper_parser-1.1.32.tar.gz (35.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wx_paper_parser-1.1.32-py3-none-any.whl (35.9 MB view details)

Uploaded Python 3

File details

Details for the file wx_paper_parser-1.1.32.tar.gz.

File metadata

  • Download URL: wx_paper_parser-1.1.32.tar.gz
  • Upload date:
  • Size: 35.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.16

File hashes

Hashes for wx_paper_parser-1.1.32.tar.gz
Algorithm Hash digest
SHA256 adbe0f5dfdb6da3c4c7806ce5ef27fcbc61cf6ce0b3d4ee88161a3f02ab06b3f
MD5 9edb5a44e0d8b25cf5eb02b0fdb215fa
BLAKE2b-256 d0951c7aeaead12ac2facddc24028363f48274ea671a24692e9b1eb714f8e69e

See more details on using hashes here.

File details

Details for the file wx_paper_parser-1.1.32-py3-none-any.whl.

File metadata

File hashes

Hashes for wx_paper_parser-1.1.32-py3-none-any.whl
Algorithm Hash digest
SHA256 969967e8e85a3329718f499f9c1a32345459ea5ac66bbe770cab10de73c637c0
MD5 a713ea19749102bf76a3310253420d11
BLAKE2b-256 0fb5a7d961648bc2edb127ea772955d0c90525f4fbeb4c8f0594fdac6d7968a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page