GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cwyd0822/cifar10-tensorflow-read-write: 通过Tensorflow将Cifar10数据转换成图像,并且对图像数据序列化为tfrecord数据。本项目对tfrecord的读写操作进行了演示,对代码详细注释。代码和文档将持续更新和优化。

BranchesTags
Open more actions menu

Latest commit

 

History

19 Commits
19 Commits

Folders and files

NameName
Last commit message
Last commit date
data
data
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
batch.py
batch.py
 
 
convert_cifar10_image.py
convert_cifar10_image.py
 
 
reader_cifar10-1.py
reader_cifar10-1.py
 
 
reader_cifar10-2.py
reader_cifar10-2.py
 
 
reader_cifar10.py
reader_cifar10.py
 
 
shuffle_batch.py
shuffle_batch.py
 
 
writer_cifar10.py
writer_cifar10.py
 
 

Repository files navigation

cifar10-tensorflow-read-write

本项目通过Tensorflow对Cifar10数据集进行读写操作。

包括完整代码和详细注释。

Cifar10数据集介绍

  • 由60000个图片组成
  • 6万个图片中,5万张用于训练,1万张用于测试
  • 每个图片是32x32像素
  • 所有图片可以分成10类
  • 每个图片都有一个标签,标记属于哪一个类
  • 测试集中一个类对应1000张图
  • 训练集中将5万张图分为5份
  • 类之间的图片是互斥的,不存在类别重叠的情况

Cifar10数据集分类

分类

Cifar10数据集下载

  • 官方

  • 百度网盘 密码:tuqq

项目运行需要的环境

  • Python 3.7.4
  • TensorFlow 1.5.0

项目运行

convert_cifar10_image.py

这个脚本对数据进行下载,并且转换成图片 首先将文件中下面三行的注释移除

DATA_URL = 'http://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz'
DATA_DIR = 'data'
download_and_uncompress_tarball(DATA_URL, DATA_DIR)

并且执行

python3 convert_cifar10_image.py

这样脚本会自动下载数据,并且转换成图片。其中训练数据在data/image/train目录下。 如果在线下载比较慢,可以通过百度网盘先将数据集下载到项目根目录下,再执行这个convert_cifar10_image.py脚本,这样会自动跳过从网络上下载。

cifar10数据通过tensorflow转换成图像

《cifar10数据通过tensorflow转换成图像》

tf.train.slice_input_producer()和tf.train.string_input_producer函数

《详解tensorflow的tf.train.slice_input_producer和tf.train.string_input_producer生成器》

以Cifar10图像数据为例详解tensorflow对tfrecord数据的读写操作

《以Cifar10图像数据为例详解tensorflow对tfrecord数据的读写操作》

详解tensorflow之tf.train.batch与tf.train.shuffle_batch附完整代码

《详解tensorflow之tf.train.batch与tf.train.shuffle_batch附完整代码》

About

通过Tensorflow将Cifar10数据转换成图像,并且对图像数据序列化为tfrecord数据。本项目对tfrecord的读写操作进行了演示,对代码详细注释。代码和文档将持续更新和优化。

Topics

cifar10pythontensorflowtfrecord

Resources

Readme
MIT license
Activity

Stars

6 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.