1.数据集
分成训练集和测试集
训练集有四个文件夹
第一个文件夹为
Grape Black Measles(葡萄黑麻疹)病害(3783张)
Grape Black rot葡萄黑腐病病害数据集(3596张)
Grape Healthy 健康葡萄叶(2594张)
Grape Isariopsis Leaf Spot(Isariopsis叶斑)(3228张)
测试集每类有3张照片
对数据集感兴趣的可以关注最后一行
import numpy as np
import os
import matplotlib.pyplot as plt
import cv2import warnings
warnings.filterwarnings('ignore')import keras
from tensorflow.keras.optimizers import Adam
from keras.models import Sequential, Model
from keras.layers import Dense, LeakyReLU, Reshape, Flatten, Input
from keras.layers import Conv2D, MaxPooling2D, Activation, Dropout, Conv2DTranspose, GlobalAveragePooling2D,BatchNormalization
#数据https://mbd.pub/o/bread/ZJyWl5ps