日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程语言 > python >内容正文

python

lfw分类 python_无法在sklearn中使用LFW数据集

發(fā)布時(shí)間:2023/12/20 python 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 lfw分类 python_无法在sklearn中使用LFW数据集 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

好像找人功能不起作用,但我不明白為什么。在

測(cè)試代碼如下:In [1]: import numpy as np

In [2]: from sklearn import datasets

In [3]: lfw= datasets.fetch_lfw_people()

IOError Traceback (most recent call last)

in ()

----> 1 lfw= datasets.fetch_lfw_people()

C:\Python27\lib\site-packages\sklearn\datasets\lfw.pyc in fetch_lfw_people(data_

home, funneled, resize, min_faces_per_person, color, slice_, download_if_missing

)

270 faces, target, target_names = load_func(

271 data_folder_path, resize=resize,

--> 272 min_faces_per_person=min_faces_per_person, color=color, slice_=s

lice_)

273

274 # pack the results as a Bunch instance

C:\Python27\lib\site-packages\sklearn\externals\joblib\memory.pyc in __call__(se

lf, *args, **kwargs)

169 'directory %s'

170 % (name, argument_hash, output_dir))

--> 171 return self.call(*args, **kwargs)

172 else:

173 try:

C:\Python27\lib\site-packages\sklearn\externals\joblib\memory.pyc in call(self,

*args, **kwargs)

321 if self._verbose:

322 print self.format_call(*args, **kwargs)

--> 323 output = self.func(*args, **kwargs)

324 self._persist_output(output, output_dir)

325 duration = time.time() - start_time

C:\Python27\lib\site-packages\sklearn\datasets\lfw.pyc in _fetch_lfw_people(data

_folder_path, slice_, color, resize, min_faces_per_person)

195 target = np.searchsorted(target_names, person_names)

196

--> 197 faces = _load_imgs(file_paths, slice_, color, resize)

198

199 # shuffle the faces with a deterministic RNG scheme to avoid having

C:\Python27\lib\site-packages\sklearn\datasets\lfw.pyc in _load_imgs(file_paths,

slice_, color, resize)

149 if i % 1000 == 0:

150 logger.info("Loading face #%05d / %05d", i + 1, n_faces)

--> 151 face = np.asarray(imread(file_path)[slice_], dtype=np.float32)

152 face /= 255.0 # scale uint8 coded colors to the [0.0, 1.0] floa

ts

153 if resize is not None:

C:\Python27\lib\site-packages\scipy\misc\pilutil.pyc in imread(name, flatten)

100 """

101

--> 102 im = Image.open(name)

103 return fromimage(im,flatten=flatten)

104

C:\Python27\lib\site-packages\PIL\Image.pyc in open(fp, mode)

1978 pass

1979

-> 1980 raise IOError("cannot identify image file")

1981

1982 #

IOError: cannot identify image file

總結(jié)

以上是生活随笔為你收集整理的lfw分类 python_无法在sklearn中使用LFW数据集的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。