Skip to content

Commit

Permalink
update readme and sample.json
Browse files Browse the repository at this point in the history
  • Loading branch information
nickliqian committed Apr 10, 2019
1 parent fc141fd commit a1fed74
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ use CNN recognize captcha by tensorflow.
| 序号 | 文件名称 | 说明 |
| ------ | ------ | ------ |
| 1 | verify_and_split_data.py | 验证数据集和拆分数据为训练集和测试集 |
| 2 | train_model.py | 训练模型 |
| 3 | train_model_v2.py | 训练模型,训练过程中同时输出训练集和验证集的准确率,推荐使用此种方式训练 |
| 2 | network.py | cnn网络基类 |
| 3 | train_model.py | 训练模型,训练过程中同时输出训练集和验证集的准确率,推荐使用此种方式训练 |
| 4 | test_batch.py | 批量验证 |
| 5 | gen_image/gen_sample_by_captcha.py | 生成验证码的脚本 |
| 6 | gen_image/collect_labels.py | 用于统计验证码标签(常用于中文验证码) |
Expand Down Expand Up @@ -359,4 +359,5 @@ tensorflow.python.framework.errors_impl.InvalidArgumentError: Unsuccessful Tenso
原因是两个Recognizer对象都使用了默认的Graph。
解决办法是在创建对象的时候不使用默认Graph,新建graph,这样每个Recognizer都使用不同的graph,就不会冲突了。

5. Flask程序的并发运行
5. Flask程序用于生产
可以参考官方文档:[Flask的生产配置](http://docs.jinkan.org/docs/flask/config.html)
57 changes: 57 additions & 0 deletions sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"origin_image_dir": "sample/origin/",
"train_image_dir": "sample/train/",
"test_image_dir": "sample/test/",
"api_image_dir": "sample/api/",
"online_image_dir": "sample/online/",
"local_image_dir": "sample/local/",
"model_save_dir": "model/",
"image_width": 100,
"image_height": 60,
"max_captcha": 4,
"image_suffix": "png",
"char_set": [
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"a",
"b",
"c",
"d",
"e",
"f",
"g",
"h",
"i",
"j",
"k",
"l",
"m",
"n",
"o",
"p",
"q",
"r",
"s",
"t",
"u",
"v",
"w",
"x",
"y",
"z"
],
"use_labels_json_file": false,
"remote_url": "https://www.xxxxx.com/getImg",
"cycle_stop": 3000,
"acc_stop": 0.99,
"cycle_save": 500,
"enable_gpu": 0
}

0 comments on commit a1fed74

Please sign in to comment.