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

相关推荐
lucas_AI12 分钟前
PyTorch、JAX 全中招:Softmax 藏了两个数值 Bug,DeepMind 用十余行代码修好了
深度学习
计算机毕业编程指导师12 分钟前
基于深度学习的电子垃圾与混合材料图像分类系统实战:ResNet-50迁移学习+Django部署+三种识别入口完整方案
python·深度学习·毕业设计·resnet·课程设计·图像分类·电子垃圾
古希腊掌管代码的神THU12 小时前
为什么DPO中chosen/rejected概率同时下降?
人工智能·深度学习·机器学习·自然语言处理·面试
云上先途15 小时前
开发专属 AI 工具,数据安全和隐私风险怎么规避?
大数据·人工智能·深度学习
数聚天成DeepSData18 小时前
验收一批标注数据时,一致性到底在比谁和谁
人工智能·深度学习·机器学习·数据集·deepsdata
迷途呀19 小时前
强化学习概念
人工智能·深度学习·机器学习·强化学习·1024程序员节
m0_6220235320 小时前
产业资本运作:新金融博弈下的产业链安全底盘搭建
大数据·深度学习·重构·1024程序员节
zhenaibo52120 小时前
开题报告如何选择研究方法?为什么很重要?
深度学习
鬼手点金21 小时前
从 API 消息到模型 Token:Chat Template
java·前端·javascript·数据库·人工智能·深度学习·1024程序员节