代码拉取完成,页面将自动刷新
同步操作将从 breezedeus/CnOCR 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# 可取值:['densenet-s']
ENCODER_NAME = densenet_lite_136
# 可取值:['fc', 'gru', 'lstm']
DECODER_NAME = fc
MODEL_NAME = $(ENCODER_NAME)-$(DECODER_NAME)
INDEX_DIR = /data/jinlong/ocr_data
TRAIN_CONFIG_FP = docs/examples/train_config_gpu.json
train:
CUDA_VISIBLE_DEVICES=1 cnocr train -m $(MODEL_NAME) --index-dir $(INDEX_DIR) --train-config-fp $(TRAIN_CONFIG_FP)
finetune:
CUDA_VISIBLE_DEVICES=0 cnocr train --finetuning -m densenet_lite_136-gru --index-dir /data/jinlong/ocr_data/finetuning-general --train-config-fp docs/examples/train_config_finetune.json \
-p runs/CnOCR-Rec/ga6ubc1s/checkpoints/cnocr-v2.2-densenet_lite_136-gru-epoch=029-val-complete_match-epoch=0.7936-model.ckpt
# 训练模型
train-number-pure:
CUDA_VISIBLE_DEVICES=1 cnocr train -m number-$(MODEL_NAME) --index-dir data/output_number_pure --train-config-fp docs/examples/train_config_number.json
evaluate-number-pure:
cnocr evaluate -m number-$(MODEL_NAME) -i data/output_number_pure/dev.tsv --image-folder data/output_number_pure --batch-size 128 -c cuda:0 -o eval_results/number-$(MODEL_NAME)
evaluate:
cnocr evaluate -m $(MODEL_NAME) -i $(REC_DATA_ROOT_DIR)/test-part.txt --image-folder $(REC_DATA_ROOT_DIR) --batch-size 128 -c cuda:0 -o eval_results/$(MODEL_NAME)-$(EPOCH)
filter:
python scripts/filter_samples.py --sample_file $(REC_DATA_ROOT_DIR)/test-part.txt --badcases_file evaluate/$(MODEL_NAME)-$(EPOCH)/badcases.txt --distance_thrsh 2 -o $(REC_DATA_ROOT_DIR)/new.txt
predict:
cnocr predict -m $(MODEL_NAME) -f docs/examples/rand_cn1.png
.PHONY: train predict evaluate filter
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。