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

相关推荐
开开心心就好7 分钟前
系统清理工具清理缓存日志,启动卸载管理
linux·运维·服务器·神经网络·cnn·pdf·1024程序员节
victory04319 分钟前
关于深度学习的重要库 transformer
人工智能·深度学习·transformer
sysu_lluozh15 分钟前
【深度学习】神经网络与深度学习-神经网络的编程基础
人工智能·深度学习·神经网络
Hcoco_me17 分钟前
大模型面试题49:从白话到进阶详解SFT 微调的 Loss 计算
人工智能·深度学习·神经网络·算法·机器学习·transformer·word2vec
AI人工智能+22 分钟前
银行回单识别技术:基于深度学习,实现多格式回单秒级解析,识别精度超99.5%
深度学习·ocr·银行回单识别
其美杰布-富贵-李26 分钟前
Transformer 位置编码指南
人工智能·深度学习·transformer·位置编码
小北方城市网37 分钟前
第 4 课:微服务 API 网关设计与接口全生命周期管理|统一入口与接口治理实战
java·大数据·运维·人工智能·python·深度学习·数据库架构
deephub1 小时前
Mosaic:面向超长序列的多GPU注意力分片方案
人工智能·深度学习·神经网络·transformer·注意力机制
Wu_Dylan1 小时前
液态神经网络系列(三) | 从 Neural ODE 到 Liquid Time-constant Networks(LTC):给神经网络注入物理灵魂
人工智能·深度学习·神经网络
m0_650108241 小时前
P2PNet:基于点的密集人群计数与定位
论文阅读·深度学习·人群计数与定位·基于头部中心点·p2pnet