import os
import matplotlib.pyplot as plt
import random
from PIL import Image
def main(path):
classes = [i for i in os.listdir(path)] # ['cat', 'dog']
# 将所有图片按照 类别:路径 字典形式保存
images_path = [] # [{'cat': './data/train\\cat\\Baidu_0000.jpeg'}, {'cat': './data/train\\cat\\Baidu_0002.jpeg'}]
for cla in classes:
for i in os.listdir(os.path.join(path, cla)):
dic = {} # 类别:图像路径
img_path = os.path.join(path, cla, i)
dic[cla] = img_path # {'cat': './data/train\\cat\\Baidu_0000.jpeg'}
images_path.append(dic)
# 随机展示4张图像
plt.figure(figsize=(12, 8))
for i in range(4):
r = random.randint(0, len(images_path) - 1) # 生成随机数
label, im_path = list(images_path[r].keys())[0], list(images_path[r].values())[0]
# cat , ./data/train\cat\Baidu_0049.jpeg
im = Image.open(im_path)
plt.subplot(2, 2, i + 1)
plt.title(label)
plt.imshow(im)
plt.savefig('show.jpg') # 保存图片
if __name__ == '__main__':
root = './data/train' # 传入目录
main(path=root)
没有合适的资源?快使用搜索试试~ 我知道了~
植物病害图像分类数据集【已标注,约26,000张数据】
共2000个文件
jpg:1998个
py:1个
json:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 157 浏览量
2024-12-18
22:16:32
上传
评论
收藏 749.94MB 7Z 举报
温馨提示
植物病害图像分类数据集【已标注,约26,000张数据】 分类个数【58】:苹果病害、橘子病害等【具体查看json文件】 划分了训练集、测试集。存放各自的同一类数据图片。如果想可视化数据集,可以运行资源中的show脚本。 CNN分类网络改进:https://blog.csdn.net/qq_44886601/category_12858320.html 【更多图像分类、图像分割(医学)、目标检测(yolo)的项目以及相应网络的改进,可以参考本人主页:https://blog.csdn.net/qq_44886601/category_12803200.html】
资源推荐
资源详情
资源评论
收起资源包目录
植物病害图像分类数据集【已标注,约26,000张数据】 (2000个子文件)
healthy_tea_leaf75.jpg 320KB
healthy_tea_leaf161.jpg 319KB
healthy_tea_leaf180.jpg 318KB
healthy_tea_leaf179.jpg 318KB
healthy_tea_leaf183.jpg 315KB
healthy_tea_leaf128.jpg 313KB
healthy_tea_leaf102.jpg 313KB
healthy_tea_leaf101.jpg 313KB
healthy_tea_leaf25.jpg 311KB
healthy_tea_leaf24.jpg 311KB
healthy_tea_leaf86.jpg 309KB
healthy_tea_leaf171.jpg 309KB
healthy_tea_leaf159.jpg 309KB
healthy_tea_leaf158.jpg 309KB
healthy_tea_leaf143.jpg 306KB
healthy_tea_leaf135.jpg 300KB
healthy_tea_leaf136.jpg 300KB
healthy_tea_leaf30.jpg 298KB
healthy_tea_leaf131.jpg 297KB
healthy_tea_leaf51.jpg 297KB
healthy_tea_leaf177.jpg 287KB
healthy_tea_leaf176.jpg 287KB
healthy_tea_leaf165.jpg 284KB
healthy_tea_leaf164.jpg 284KB
healthy_tea_leaf42.jpg 281KB
healthy_tea_leaf41.jpg 281KB
healthy_tea_leaf198.jpg 280KB
healthy_tea_leaf197.jpg 280KB
healthy_tea_leaf153.jpg 279KB
healthy_tea_leaf168.jpg 279KB
healthy_tea_leaf167.jpg 279KB
healthy_tea_leaf71.jpg 276KB
healthy_tea_leaf48.jpg 275KB
healthy_tea_leaf47.jpg 275KB
healthy_tea_leaf54.jpg 275KB
healthy_tea_leaf72.jpg 274KB
healthy_tea_leaf68.jpg 274KB
healthy_tea_leaf192.jpg 272KB
healthy_tea_leaf160.jpg 264KB
healthy_tea_leaf178.jpg 263KB
healthy_tea_leaf181.jpg 261KB
healthy_tea_leaf2.jpg 261KB
healthy_tea_leaf21.jpg 261KB
healthy_tea_leaf114.jpg 261KB
healthy_tea_leaf3.jpg 261KB
healthy_tea_leaf154.jpg 259KB
healthy_tea_leaf100.jpg 259KB
healthy_tea_leaf127.jpg 259KB
healthy_tea_leaf219.jpg 256KB
healthy_tea_leaf12.jpg_Flip_Horizontally_and_Vertically.jpg 256KB
healthy_tea_leaf82.jpg 256KB
healthy_tea_leaf157.jpg 255KB
healthy_tea_leaf134.jpg 254KB
healthy_tea_leaf142.jpg 252KB
healthy_tea_leaf49.jpg 251KB
healthy_tea_leaf76.jpg 249KB
healthy_tea_leaf16.jpg_Horizontally_flip.jpg 244KB
healthy_tea_leaf16.jpg_Flip_Horizontally_and_Vertically.jpg 244KB
healthy_tea_leaf45.jpg 241KB
healthy_tea_leaf44.jpg 241KB
red_leaf_spot_in_tea306.jpg 238KB
red_leaf_spot_in_tea281.jpg 236KB
red_leaf_spot_in_tea282.jpg 236KB
healthy_tea_leaf103.jpg 234KB
healthy_tea_leaf201.jpg 232KB
healthy_tea_leaf64.jpg 228KB
healthy_tea_leaf73.jpg 228KB
red_leaf_spot_in_tea107.jpg 227KB
red_leaf_spot_in_tea106.jpg 227KB
red_leaf_spot_in_tea194.jpg 227KB
red_leaf_spot_in_tea191.jpg 227KB
red_leaf_spot_in_tea192.jpg 227KB
red_leaf_spot_in_tea201.jpg 226KB
red_leaf_spot_in_tea200.jpg 226KB
healthy_tea_leaf118.jpg 226KB
healthy_tea_leaf212.jpg 226KB
healthy_tea_leaf213.jpg 226KB
healthy_tea_leaf46.jpg 224KB
red_leaf_spot_in_tea398.jpg 224KB
healthy_tea_leaf193.jpg 224KB
red_leaf_spot_in_tea38.jpg 224KB
healthy_tea_leaf52.jpg 224KB
healthy_tea_leaf67.jpg 223KB
red_leaf_spot_in_tea393.jpg 223KB
healthy_tea_leaf90.jpg 222KB
healthy_tea_leaf89.jpg 222KB
healthy_tea_leaf55.jpg 221KB
red_leaf_spot_in_tea47.jpg 221KB
red_leaf_spot_in_tea48.jpg 221KB
healthy_tea_leaf147.jpg 219KB
red_leaf_spot_in_tea366.jpg 219KB
red_leaf_spot_in_tea365.jpg 219KB
healthy_tea_leaf1.jpg 218KB
red_leaf_spot_in_tea128.jpg 217KB
red_leaf_spot_in_tea213.jpg 217KB
red_leaf_spot_in_tea129.jpg 217KB
red_leaf_spot_in_tea212.jpg 217KB
red_leaf_spot_in_tea279.jpg 216KB
red_leaf_spot_in_tea11.jpg 214KB
red_leaf_spot_in_tea116.jpg 214KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
Ai医学图像分割
- 粉丝: 2w+
- 资源: 2260
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Data Science from Scratch
- fftw3-x64-windows.zip
- hello-world 镜像
- 【微信小程序源代码】微信商城小程序(完整前后端+mysql+LW).zip
- ceres-x64-windows.zip
- 非常好的影评系统源代码100%好用.zip
- 基于SpringBoot的“医疗服务系统”的设计与实现(源码+数据库+文档+PPT).zip
- 基于SpringBoot的“校园闲置物品交易网站”的设计与实现(源码+数据库+文档+PPT).zip
- 基于opencv aruco模块的ROS2 aruco标记检测
- LabVIEW实现WiFi通信【LabVIEW物联网实战】
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功