Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pjialin/12306-ocr
12306 验证码识别服务
https://github.com/pjialin/12306-ocr
Last synced: 7 days ago
JSON representation
12306 验证码识别服务
- Host: GitHub
- URL: https://github.com/pjialin/12306-ocr
- Owner: pjialin
- License: apache-2.0
- Created: 2019-10-12T08:22:28.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-18T02:46:44.000Z (10 months ago)
- Last Synced: 2024-01-18T08:14:05.540Z (10 months ago)
- Language: Python
- Size: 1.56 MB
- Stars: 171
- Watchers: 8
- Forks: 72
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 12306 验证码识别服务
## 使用
需要运行在 python 3.6 以上版本**1. 安装依赖**
```bash
git clone https://github.com/pjialin/12306-ocrpip install -r requirements.txt
```
**2. 配置程序**
```bash
cp config.toml.example config.toml
```
**3. 运行程序**
```bash
python main.py
```
用于识别文字的模型文件较大,没有放在仓库中,第一次运行会自动进行联网下载,所以可能需要等待一会才能运行起来。## Docker 使用
```bash
docker run -d -p 8000:8000 pjialin/12306-ocr
```
启动后通过 `http://IP:8000` 进行访问### 对接 Py12306
打开 **py12306** 目录下的 `py12306/helpers/api.py` 文件,找到 `API_FREE_CODE_QCR_API=` 的位置,并替换成当前 ocr 服务的接口地址,如:
```
API_FREE_CODE_QCR_API = 'http://127.0.0.1:8000/check/'
```## License
[Apache License.](https://github.com/pjialin/12306-ocr/blob/master/LICENSE)