91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1KB
    文件類型: .py
    金幣: 1
    下載: 0 次
    發布日期: 2021-01-09
  • 語言: Python
  • 標簽: python??

資源簡介

批量讀取圖片,存放到一個四維數組中,并保存為npz文件。 -------------------------------------------------------------------------------- 有助于幫助訓練做自己的深度學習數據集

資源截圖

代碼片段和文件信息

#?-*-?coding:?utf-8?-*-
“““
Created?on?Sat?Oct?10?14:08:19?2020

@author:?Lenovo
“““
import?os
import?numpy
from?PIL?import?Image

def?getAllImages(folder):
????assert?os.path.exists(folder)
????assert?os.path.isdir(folder)
????imageList?=?os.listdir(folder)
????imageList?=?[os.path.abspath(item)?for?item?in?imageList?if?os.path.isfile(os.path.join(folder?item))]
????return?imageList

#print(getAllImages(r“C:\Users\Lenovo\Desktop\Eyetracking?for?everyone程序\我的調試“))

def?get_imlist(path):?

????return?[os.path.join(pathf)?for?f?in?os.listdir(path)?if?f.endswith(‘.png‘)]

filename=get_imlist(r“C:\Users\Lenovo\Deskto

評論

共有 條評論