基于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/

相关推荐
yiyu07161 天前
3分钟搞懂深度学习AI:实操篇:Attention
人工智能·深度学习
热爱生活的猴子1 天前
RoBERTa 分类模型正则化调优实验——即dropout和冻结层对过拟合的影响
人工智能·深度学习·分类·数据挖掘·nlp
智算菩萨1 天前
AGI的定义:基于CHC认知理论的量化评估框架深度解析
论文阅读·人工智能·深度学习·ai·agi
deephub1 天前
构建生产级 AI Agent 系统的4大主流技术:反思、工具、规划与多智能体协作
人工智能·python·深度学习·大语言模型·agent
逄逄不是胖胖1 天前
《动手学深度学习》-68多头注意力实现
人工智能·深度学习
这张生成的图像能检测吗1 天前
(论文速读)PatchTST:通道无关补丁时间序列变压器
人工智能·深度学习·神经网络·计算机视觉·注意力机制·vit·时序模型
Narrastory1 天前
明日香 - Pytorch 快速入门保姆级教程(七)
人工智能·pytorch·深度学习
人工智能培训咨询叶梓1 天前
SYNCHECK:提升检索增强型语言模型的可信度
人工智能·深度学习·语言模型·大模型·检索增强·多模态·rag
冰西瓜6001 天前
深度学习的数学原理(二十)—— 序列建模与词嵌入
人工智能·深度学习