• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






任重道远-HSY

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2020年5月23日

将图片制作数据拒
摘要: import tensorflow as tf from PIL import Image import numpy as np import cv2 import os def load_sample(sample_dir): print('loading sample dataset..') t 阅读全文
posted @ 2020-05-23 23:17 任重道远-HSY 阅读(157) 评论(0) 推荐(0)
 
python中PIL.Image,OpenCV,Numpy图像格式相互转换
摘要: 元组和列表 a = (1, 2) # a is a tuple b = list(a) # b is a list c = tuple(b) # c is a tuple 元组列表转和ndarray 数组之间转换 a = (1, 2) # a is a tuple b = np.array(a) # 阅读全文
posted @ 2020-05-23 16:05 任重道远-HSY 阅读(5591) 评论(0) 推荐(1)
 
加载图像数据集
摘要: #path:数据路径 #txt:每条数据对应的标签 1 def generateds(path, txt): 2 f = open(txt, 'r') # 以只读形式打开txt文件 3 contents = f.readlines() # 读取文件中所有行 4 f.close() # 关闭txt文件 阅读全文
posted @ 2020-05-23 15:55 任重道远-HSY 阅读(198) 评论(0) 推荐(0)