基于keras框架的Vgg深度学习神经网络衣服多标签分类识别系统

第一步:准备数据

6种衣服组合数据:'black_jeans', 'blue_dress', 'blue_jeans', 'blue_shirt', 'red_dress', 'red_shirt',总共有2167张图片,每个文件夹单独放一种动物

第二步:搭建模型

本文选择vgg,其网络结构如下:

参考代码如下:

python 复制代码
class SmallerVGGNet:
	@staticmethod
	def build(width, height, depth, classes, finalAct="softmax"):
		# initialize the model along with the input shape to be
		# "channels last" and the channels dimension itself
		model = Sequential()
		inputShape = (height, width, depth)
		chanDim = -1

		# if we are using "channels first", update the input shape
		# and channels dimension
		if K.image_data_format() == "channels_first":
			inputShape = (depth, height, width)
			chanDim = 1

		# CONV => RELU => POOL
		model.add(Conv2D(32, (3, 3), padding="same",
			input_shape=inputShape))
		model.add(Activation("relu"))
		model.add(BatchNormalization(axis=chanDim))
		model.add(MaxPooling2D(pool_size=(3, 3)))
		model.add(Dropout(0.25))

		# (CONV => RELU) * 2 => POOL
		model.add(Conv2D(64, (3, 3), padding="same"))
		model.add(Activation("relu"))
		model.add(BatchNormalization(axis=chanDim))
		model.add(Conv2D(64, (3, 3), padding="same"))
		model.add(Activation("relu"))
		model.add(BatchNormalization(axis=chanDim))
		model.add(MaxPooling2D(pool_size=(2, 2)))
		model.add(Dropout(0.25))

		# (CONV => RELU) * 2 => POOL
		model.add(Conv2D(128, (3, 3), padding="same"))
		model.add(Activation("relu"))
		model.add(BatchNormalization(axis=chanDim))
		model.add(Conv2D(128, (3, 3), padding="same"))
		model.add(Activation("relu"))
		model.add(BatchNormalization(axis=chanDim))
		model.add(MaxPooling2D(pool_size=(2, 2)))
		model.add(Dropout(0.25))

		# first (and only) set of FC => RELU layers
		model.add(Flatten())
		model.add(Dense(1024))
		model.add(Activation("relu"))
		model.add(BatchNormalization())
		model.add(Dropout(0.5))

		# softmax classifier
		model.add(Dense(classes))
		model.add(Activation(finalAct))

		# return the constructed network architecture
		return model

第三步:统计正确率

第四步:搭建GUI界面

第五步:整个工程的内容

有训练代码和训练好的模型以及训练过程,提供数据,提供GUI界面代码

项目完整文件下载请见演示与介绍视频的简介处给出:➷➷➷

https://www.bilibili.com/video/BV1pJBrYdEvS/

相关推荐
jay神1 天前
VisDrone2019-DET 无人机小目标检测数据集
人工智能·深度学习·yolo·目标检测·计算机视觉·毕业设计·无人机
乔江seven1 天前
【李沐 | 动手学深度学习】17 深度学习硬件:CPU 和 GPU
人工智能·深度学习·深度学习硬件·cpu和gpu
这张生成的图像能检测吗1 天前
(论文速读)IMSE-IGA-CNN-Transformer
人工智能·深度学习·cnn·transformer·故障诊断·预测模型·时序模型
ydmy1 天前
注意力机制(个人理解)
pytorch·python·深度学习
Flying pigs~~1 天前
LoRA 面试完全指南:低秩分解原理 + Transformer 应用
人工智能·深度学习·lora·大模型·微调·transformer
高洁011 天前
大模型部署资源不足?轻量化部署解决方案
python·深度学习·机器学习·数据挖掘·transformer
机械X人1 天前
Encoder-Decoder PLM
人工智能·深度学习
却道天凉_好个秋1 天前
卷积神经网络CNN(七):感受野
人工智能·python·深度学习·神经网络·感受野
隔壁大炮1 天前
Day07-RNN介绍
人工智能·pytorch·rnn·深度学习·神经网络·算法·numpy
雷帝木木1 天前
Python 并发编程的高级技巧与性能优化
人工智能·python·深度学习·机器学习