2017-03-16 80 views
1

我是机器学习的初学者,想用Github中的一些图像分类代码来处理我的数据。我有问题在python中加载图像数据。问题是 - 我不知道如何。我将如何加载数据并对其进行格式化?如何加载存储在zip文件中的一组图像?

+1

这与深度学习或conda有什么关系? – Elmex80s

+0

Python的[文档索引](https://docs.python.org/3/py-modindex.html#cap-z)显示它有几个与zip相关的模块。我猜[[zipfile]](https://docs.python.org/3/library/zipfile.html#module-zipfile)模块会有所帮助。 – martineau

回答

2

“read”一词含糊不清,但这里是一个使用Image类读取jpeg文件并打印关于它的信息的示例。

import os,sys 
import Image 
jpgfile = Image.open("picture.jpg") 

print jpgfile.bits, jpgfile.size, jpgfile.format 
相关问题