# ImageNetPreprocess **Repository Path**: AmazingBian/ImageNetPreprocess ## Basic Information - **Project Name**: ImageNetPreprocess - **Description**: ImageNet数据预处理,并转成TFRecord - **Primary Language**: Unknown - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2022-05-27 - **Last Updated**: 2024-10-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ImageNetPreprocess #### 介绍 使用shell脚本对ImageNet2012数据集进行预处理,执行shell脚本便可以实现给ImageNet2012数据集的训练集、验证集解压、解决验证集没有标签的问题和转成TFRecord。 使用的数据集:[ImageNet2012](https://gitee.com/link?target=http%3A%2F%2Fwww.image-net.org%2F) - 数据集大小:共1000个类、224*224彩色图像 - 训练集:共1,281,167张图像 - 验证集:共50,000张图像 - [数据集下载](http://share.6d1p.cn:63633/) #### 前提条件 - liunxOS上有tar、ls等基础命令 - iunxOS上已完成tensorflow安装 ##### 文件目录 ``` ILSVRC2012 ├── bbox ├── ILSVRC2012_bbox_train_v2.tar.gz ├── ILSVRC2012_img_val.tar ├── imagenet2012_train.tar ├── ImageNetPreprocess ├── imagenet_tf ├── train └── val ``` #### 使用说明 ##### 使用git clone方法 ``` git clone https://gitee.com/AmazingBian/ImageNetPreprocess.git bash ImageNetPreprocess/ImageNetPreprocess.sh ``` ##### 直接下载zip包方法 ``` bash ImageNetPreprocess-master/ImageNetPreprocess.sh ``` ##### 后台运行 ``` nohup bash ImageNetPreprocess/ImageNetPreprocess.sh & ``` ``` nohup bash ImageNetPreprocess-master/ImageNetPreprocess.sh & ``` ##### 如果数据集已经解压好,转成TFRecord,执行 ``` python3 ImageNetPreprocess/build_imagenet_data.py --output_directory=imagenet_tf --train_directory=train --validation_directory=val ``` 或者 ``` python3 ImageNetPreprocess-master/build_imagenet_data_master.py --output_directory=imagenet_tf --trainC:\Users\wubian\Desktop\data\ImageNet2012Preprocess\imagenet2012_preprocess.sh_directory=train --validation_directory=val ``` #### 参与贡献 参考tensorflow[数据处理](https://github.com/tensorflow/models/tree/master/research/slim/datasets)