1 Star 2 Fork 2

aczz / mnist

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
gen_path.py 433 Bytes
一键复制 编辑 原始数据 按行查看 历史
aczz 提交于 2021-03-07 21:24 . feature: add helper scripts
#!/usr/bin/env python
import os
def gen_txt(im_dir, txt_path):
abs_im_dir = os.path.abspath(im_dir)
print('abs_im_dir is:', abs_im_dir)
fout = open(txt_path, 'w')
for item in os.listdir('test'):
if item.endswith('.bmp'):
fullpath = os.path.join(abs_im_dir, item)
fout.write(fullpath+'\n')
fout.close()
gen_txt('train', 'train_img_list.txt')
gen_txt('test', 'test_img_list.txt')
1
https://gitee.com/aczz/mnist.git
git@gitee.com:aczz/mnist.git
aczz
mnist
mnist
master

搜索帮助