当前位置:网站首页>开源|商品识别推荐系统
开源|商品识别推荐系统
2022-07-31 06:48:00 【思考实践】
几个月前做的项目,整理一下,比较简单,就是根据数据集进行图片分类(使用resnet50),再通过识别结果匹配推荐数据库,进行推荐。
前端:html、js
后端:python-flask框架、pytorch框架
项目结构:

dataset_dir文件夹:数据集放进这个文件夹,不同种类图片放进对应种类文件夹,再通过
models文件夹:存放训练好的模型
static文件夹:存放前端网页显示的需要的图片
templates文件夹:前端网页模板文件
inference.py 测试推理效果的文件
label.py
from torchvision.datasets import ImageFolder
dataset=ImageFolder("C:/Users/forwhat/Desktop/recommend/cloth/train") #获取路径,返回的是所有图的data、label
print(dataset.class_to_idx) #查看类别名,及对应的标签。
print(dataset.imgs) #查看路径里所有的图片,及对应的标签
label_level2.py
under_jeans =['https://detail.tmall.com/item.htm?id=636464038643','https://detail.tmall.com/item.htm?id=629142114736','https://item.taobao.com/item.htm?id=633482107680','https://item.taobao.com/item.htm?id=653135699650'
,'https://detail.tmall.com/item.htm?id=626092831491']
under_skirt = ['https://item.taobao.com/item.htm?id=667268983604','https://detail.tmall.com/item.htm?id=668100149427','https://detail.tmall.com/item.htm?id=586698989166','https://detail.tmall.com/item.htm?id=635332780625'
,'https://detail.tmall.com/item.htm?id=637917736279']
under_sporty = ['https://detail.tmall.com/item.htm?id=613077657236','https://detail.tmall.com/item.htm?id=580354266231','https://detail.tmall.com/item.htm?id=580354266231','https://detail.tmall.com/item.htm?id=653363447356','https://item.taobao.com/item.htm?id=579123847078'
,'https://detail.tmall.com/item.htm?id=42730275588']
under_suit = ['https://detail.tmall.com/item.htm?id=618731089852','https://detail.tmall.com/item.htm?id=618596933879','https://detail.tmall.com/item.htm?id=636256949983','https://detail.tmall.com/item.htm?id=636363512038'
,'https://item.taobao.com/item.htm?id=665038582357']
upper_casual = ['https://detail.tmall.com/item.htm?id=666855488772','https://detail.tmall.com/item.htm?id=667962767730','https://detail.tmall.com/item.htm?id=610974657070','https://detail.tmall.com/item.htm?id=645567560209'
,'https://detail.tmall.com/item.htm?id=644415535799']
upper_coat = ['https://item.taobao.com/item.htm?id=552053460493','https://item.taobao.com/item.htm?id=598306760200','https://detail.tmall.com/item.htm?id=665519667811','https://detail.tmall.com/item.htm?id=585993479022'
,'https://item.taobao.com/item.htm?id=649233831246']
upper_hoodie = ['https://detail.tmall.com/item.htm?id=666165898023','https://item.taobao.com/item.htm?id=652872409153','https://item.taobao.com/item.htm?id=628894958150','https://detail.tmall.com/item.htm?id=633528937891'
,'https://item.taobao.com/item.htm?id=656080489764']
upper_sporty = ['https://item.taobao.com/item.htm?id=628559051772','https://detail.tmall.com/item.htm?id=668803933152','https://detail.tmall.com/item.htm?id=655672026380','https://detail.tmall.com/item.htm?id=631357306618'
,'https://detail.tmall.com/item.htm?id=601009441405']
upper_suit = ['https://detail.tmall.com/item.htm?id=666236552324','https://detail.tmall.com/item.htm?id=668803933152','https://item.taobao.com/item.htm?id=625828294674','https://detail.tmall.com/item.htm?id=649272374842','https://detail.tmall.com/item.htm?id=666063758350'
,'https://item.taobao.com/item.htm?id=668250478482']
whole_dress = ['https://detail.tmall.com/item.htm?id=598268797504','https://item.taobao.com/item.htm?id=666364831194','https://detail.tmall.com/item.htm?id=667095587171','https://detail.tmall.com/item.htm?id=642013218199'
,'https://detail.tmall.com/item.htm?id=669133765583']split_dataset.py脚本对数据集进行训练集、验证集、测试集的划分。
train.py脚本对数据集进行训练
数据集
符合格式就可以,参考链接一
效果展示


点击一个链接看看

开源地址
基于神经网络的简单推荐系统: 几个月前做的项目,整理一下,比较简单,就是根据数据集进行图片分类(使用resnet50),再通过识别结果匹配推荐数据库,进行推荐。 (gitee.com)
参考资料
(195条消息) 【深度学习】使用python划分数据集为训练集和验证集和测试集并放在不同的文件夹_我系渣渣的博客-CSDN博客_python划分数据集为训练集和测试集
边栏推荐
- 文件 - 05 下载文件:根据文件Id下载文件
- 强化学习科研知识必备(数据库、期刊、会议、牛人)
- 【Go语言入门】一文搞懂Go语言的最新依赖管理:go mod的使用
- Obtaining server and client information
- Embedded system driver primary [2] - _ parameters and dependencies under the kernel module
- 2022.07.15_Daily Question
- 2022.07.18_每日一题
- Tasks and task switching
- 2022.07.26_每日一题
- Pygame Surface对象
猜你喜欢
随机推荐
Conditional statements of shell (test, if, case)
04-SDRAM: Read Operation (Burst)
2022.07.13_每日一题
DAY18: XSS vulnerability
链表实现及任务调度
【 TA - frost Wolf _may - "one hundred plan" 】 art 2.3 hard surface
多进程全局变量失效、变量共享问题
电压源的电路分析知识分享
《opencv学习笔记》-- 仿射变换
2022.07.13_Daily Question
基于交替迭代法的交直流混合系统潮流计算matlab程序iEEE9节点系统算例
【愚公系列】2022年07月 Go教学课程 022-Go容器之字典
2022.07.18 _ a day
页面懒加载
[PSQL] Complex query
Ceph单节点部署
Shellshock
文件 - 05 下载文件:根据文件Id下载文件
那些破釜沉舟入局Web3.0的互联网精英都怎么样了?
Jetpack Compose学习(8)——State及remeber









