1 Star 0 Fork 1

kento-yang/AdvancedEAST

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
tianchi_submit.py 855 Bytes
一键复制 编辑 原始数据 按行查看 历史
huoyijie 提交于 2018-05-14 16:22 . add tianchi_submit.py
import os
from tqdm import tqdm
from network import East
from predict import predict_txt
import cfg
if __name__ == '__main__':
east = East()
east_detect = east.east_network()
east_detect.load_weights(cfg.saved_model_weights_file_path)
image_test_dir = os.path.join(cfg.data_dir, 'icpr_mtwi_task3/image_test/')
txt_test_dir = os.path.join(cfg.data_dir, 'icpr_mtwi_task3/txt_test/')
test_imgname_list = os.listdir(image_test_dir)
print('found %d test images.' % len(test_imgname_list))
for test_img_name, _ in zip(test_imgname_list,
tqdm(range(len(test_imgname_list)))):
img_path = os.path.join(image_test_dir, test_img_name)
txt_path = os.path.join(txt_test_dir, test_img_name[:-4] + '.txt')
predict_txt(east_detect, img_path, txt_path, cfg.pixel_threshold, True)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kento-yang/AdvancedEAST.git
git@gitee.com:kento-yang/AdvancedEAST.git
kento-yang
AdvancedEAST
AdvancedEAST
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385