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

相关推荐
简简单单做算法1 天前
基于GA遗传优化的Transformer-LSTM网络模型的时间序列预测算法matlab性能仿真
深度学习·matlab·lstm·transformer·时间序列预测·ga遗传优化·电池剩余寿命预测
龙文浩_1 天前
AI中NLP的文本张量表示方法在自然语言处理中的演进与应用
人工智能·pytorch·深度学习·神经网络·自然语言处理
极光代码工作室1 天前
基于BERT的新闻文本分类系统
深度学习·nlp·bert·文本分类
XINVRY-FPGA1 天前
XC7VX690T-2FFG1157I Xilinx AMD Virtex-7 FPGA
arm开发·人工智能·嵌入式硬件·深度学习·fpga开发·硬件工程·fpga
AI视觉网奇1 天前
生成GeoGebra
人工智能·深度学习
古希腊掌管代码的神THU1 天前
【清华代码熊】图解 Gemma 4 架构设计细节
人工智能·深度学习·自然语言处理
Purple Coder1 天前
7-RNN 循环网络层
人工智能·rnn·深度学习
大写的z先生1 天前
【深度学习 | 论文精读】Qwen-VL:从“纯文本”到“火眼金睛”,通向多模态大模型的进阶之路
人工智能·深度学习
workflower1 天前
深度学习是通用型人工智能的基础
人工智能·深度学习·设计模式·软件工程·软件构建·制造
卡梅德生物科技小能手1 天前
CD40LG(CD40配体)靶点深度解析:免疫调控机制与抗体药物工程化策略
经验分享·深度学习·生活