在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:tensorflow_models_nets开源软件地址:https://gitee.com/DSCjxgzzd/tensorflow_models_nets开源软件介绍:tensorflow_models_nets
1.生成record训练数据dataset已经包含了训练和测试的图片,请直接运行create_tf_record.py
if __name__ == '__main__': # 参数设置 resize_height = 224 # 指定存储图片高度 resize_width = 224 # 指定存储图片宽度 shuffle=True log=5 # 产生train.record文件 image_dir='dataset/train' train_labels = 'dataset/train.txt' # 图片路径 train_record_output = 'dataset/record/train{}.tfrecords'.format(resize_height) create_records(image_dir,train_labels, train_record_output, resize_height, resize_width,shuffle,log) train_nums=get_example_nums(train_record_output) print("save train example nums={}".format(train_nums)) # 产生val.record文件 image_dir='dataset/val' val_labels = 'dataset/val.txt' # 图片路径 val_record_output = 'dataset/record/val{}.tfrecords'.format(resize_height) create_records(image_dir,val_labels, val_record_output, resize_height, resize_width,shuffle,log) val_nums=get_example_nums(val_record_output) print("save val example nums={}".format(val_nums)) # 测试显示函数 # disp_records(train_record_output,resize_height, resize_width) batch_test(train_record_output,resize_height, resize_width) 2.训练过程目前提供VGG、inception_v1、inception_v3、mobilenet_v以及resnet_v1的训练文件,只需要生成tfrecord数据,即可开始训练
3.资源下载
|
请发表评论