From b375b6bddad0d23c8397db84aeb1cfc0f64ce333 Mon Sep 17 00:00:00 2001 From: kerlomz Date: Mon, 12 Nov 2018 22:34:03 +0800 Subject: [PATCH 1/5] fix: The deployment process is not clear. --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b2b86c3..03e513a 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,9 @@ This project is only for deployment models, If you need to train the model, plea cd captcha_platform # captcha_platform is the project path. ``` 4. ```pip install -r requirements.txt``` -5. Place your "model.yaml" in project path, and your model.pb in model folder (create if not exist) -6. Deploy as follows. +5. Copy a config_demo.yaml to the same directory named config.yaml +6. Place your trained model.yaml in model folder, and your model.pb in graph folder (create if not exist) +7. Deploy as follows. ## 1. Http Version 1. Linux @@ -35,17 +36,17 @@ This project is only for deployment models, If you need to train the model, plea ``` 2. Port: 19951 ``` - python flask_server + python flask_server.py ``` 3. Port: 19952 ``` - python tornado_server + python tornado_server.py ``` 2. Windows Deploy (Windows): ``` - python flask_server + python flask_server.py ``` Port: 19951 From f2065002e3db6d400d7b247e7bd61a33e64787d2 Mon Sep 17 00:00:00 2001 From: kerlomz Date: Tue, 4 Dec 2018 22:12:08 +0800 Subject: [PATCH 2/5] fix: Modify the introduction document. --- README.md | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8465bc6..0993a8c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Project Introduction -This project is based on CNN+LSTM+CTC to realize verification code identification. +This project is based on CNN+BLSTM+CTC to realize verification code identification. This project is only for deployment models, If you need to train the model, please move to https://github.com/kerlomz/captcha_trainer # Informed @@ -42,13 +42,40 @@ This project is only for deployment models, If you need to train the model, plea ``` python tornado_server.py ``` + 4. Port: 19953 + ``` + python sanic_server.py + ``` 2. Windows Deploy (Windows): ``` - python flask_server.py + python xxx_server.py ``` - Port: 19951 + +3. Request + + |Request URI | Content-Type | Payload Type | Method | + | ----------- | ---------------- | -------- | -------- | + | http://localhost:[Bind port]/captcha/v1 | application/json | JSON | POST | + + | Parameter | Required | Type | Description | + | ---------- | ---- | ------ | ------------------------ | + | image | Yes | String | Base64 encoding binary stream | + Model_site | No | String | Site name, bindable in yaml configuration | + | model_type | No | String | Category, bindable in yaml configuration | + The request is in JSON format, like: {"image": "base64 encoded image binary stream"} + +4. Response + + | Parameter Name | Type | Description | + | ------- | ------ | ------------------ | + | message | String | Identify results or error messages | + | code | String | Status Code | + | success | String | Whether to request success | + + The return is in JSON format, like: {"message": "xxxx", "code": 0, "success": true} + ## 2. G-RPC Version Deploy: @@ -68,6 +95,7 @@ python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. ./grpc.proto - grpc_server.py - flask_server.py - tornado_server.py + - sanic_server.py - demo.py - model - model-1.yaml @@ -93,6 +121,6 @@ python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. ./grpc.proto This project use SATA License (Star And Thank Author License), so you have to star this project before using. Read the license carefully. # Introduction -https://www.jianshu.com/p/fccd596ef023 +https://www.jianshu.com/p/80ef04b16efc From ce78e9b195d04fc4bad4b81a19b1e3c357b88963 Mon Sep 17 00:00:00 2001 From: kerlomz Date: Tue, 4 Dec 2018 22:24:02 +0800 Subject: [PATCH 3/5] fix: Modify the introduction document. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0993a8c..9d5b4b1 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ This project is only for deployment models, If you need to train the model, plea | image | Yes | String | Base64 encoding binary stream | Model_site | No | String | Site name, bindable in yaml configuration | | model_type | No | String | Category, bindable in yaml configuration | + The request is in JSON format, like: {"image": "base64 encoded image binary stream"} 4. Response From 05fefd07eddd78d21935815974f97890e653299e Mon Sep 17 00:00:00 2001 From: kerlomz Date: Tue, 4 Dec 2018 22:24:51 +0800 Subject: [PATCH 4/5] fix: Modify the introduction document. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d5b4b1..1cf91a9 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ This project is only for deployment models, If you need to train the model, plea |Request URI | Content-Type | Payload Type | Method | | ----------- | ---------------- | -------- | -------- | - | http://localhost:[Bind port]/captcha/v1 | application/json | JSON | POST | + | http://localhost:[Bind-port]/captcha/v1 | application/json | JSON | POST | | Parameter | Required | Type | Description | | ---------- | ---- | ------ | ------------------------ | From fa34192ba165681a9ab0dc1ff5afb04816a48e32 Mon Sep 17 00:00:00 2001 From: kerlomz Date: Tue, 4 Dec 2018 22:25:44 +0800 Subject: [PATCH 5/5] fix: Modify the introduction document. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1cf91a9..311520c 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ This project is only for deployment models, If you need to train the model, plea | Parameter | Required | Type | Description | | ---------- | ---- | ------ | ------------------------ | | image | Yes | String | Base64 encoding binary stream | - Model_site | No | String | Site name, bindable in yaml configuration | + | model_site | No | String | Site name, bindable in yaml configuration | | model_type | No | String | Category, bindable in yaml configuration | The request is in JSON format, like: {"image": "base64 encoded image binary stream"}