• 数据制作


    1.数据准备,我们需要一个train和valid文件夹,一个train.txt和val.txt(图片文件夹的位置可以任意,但是这两个txt文件的位置在data/fingervein/目录下)

    train和valid文件夹自然就存放着待训练的图片,train.txt和val.txt的数据格式如下

    复制代码
    FV_USM_beforeLMDB/train_example/1/1.jpg 0 
    FV_USM_beforeLMDB/train_example/1/2.jpg 0
    FV_USM_beforeLMDB/train_example/1/3.jpg 0
    FV_USM_beforeLMDB/train_example/1/4.jpg 0
    FV_USM_beforeLMDB/train_example/1/5.jpg 0
    FV_USM_beforeLMDB/train_example/1/6.jpg 0
    FV_USM_beforeLMDB/train_example/2/1.jpg 1
    FV_USM_beforeLMDB/train_example/2/2.jpg 1
    FV_USM_beforeLMDB/train_example/2/3.jpg 1
    FV_USM_beforeLMDB/train_example/2/4.jpg 1
    FV_USM_beforeLMDB/train_example/2/5.jpg 1
    FV_USM_beforeLMDB/train_example/2/6.jpg 1
    FV_USM_beforeLMDB/train_example/3/1.jpg 2
    FV_USM_beforeLMDB/train_example/3/2.jpg 2
    FV_USM_beforeLMDB/train_example/3/3.jpg 2
    复制代码

    前边是图片路径,后便是label,注意label是从0开始的。

    2. 在example目录下创建自己的文件夹fingervein,将imagenet中所有的文件烤过来,然后进行修改。

    create_imagenet.sh

    复制代码
     //当前目录
    EXAMPLE=/home/wuchao/caffe/examples/fingervein
    //存放train.txt和val.txt的目录
    DATA=/home/wuchao/caffe/data/fingervein
    //不改动
    TOOLS=/home/wuchao/caffe/build/tools

    //图片存放的目录
    TRAIN_DATA_ROOT=/home/wuchao/caffe/MyFiles/
    VAL_DATA_ROOT=/home/wuchao/caffe/MyFiles/
    复制代码

    运行create_imagenet.sh,生成两个数据文件lmdb

  • 相关阅读:
    mysql 优化20点
    java function
    设计模式 概览
    Linux安装java1.8并配置环境变量
    windows下一次执行多个sql文件
    mybatis查询结果为空时的返回值问题
    Java中Json与String互转
    SSM Service自动注入失败
    本地安装Mysql5.7过程中出现的一系列问题
    解决本地工具无法连接服务器上的mysql的问题
  • 原文地址:https://www.cnblogs.com/wuchaodzxx/p/5883056.html
Copyright © 2020-2023  润新知