当前位置:网站首页>Open Source | Commodity Recognition Recommender System
Open Source | Commodity Recognition Recommender System
2022-07-31 07:58:00 【thinking practice】
A project I did a few months ago,整理一下,比较简单,It is based on the data set图片分类(使用resnet50),Then pass the identification resultMatch recommendation database,进行推荐.
前端:html、js
后端:python-flask框架、pytorch框架
项目结构:
dataset_dir文件夹:Datasets are placed in this folder,Different types of pictures are placed in the corresponding types of folders,再通过
models文件夹:存放训练好的模型
static文件夹:Stores the required images displayed on the front-end web page
templates文件夹:Front-end web page template file
inference.py A file to test inference effects
label.py
from torchvision.datasets import ImageFolder
dataset=ImageFolder("C:/Users/forwhat/Desktop/recommend/cloth/train") #获取路径,All images are returneddata、label
print(dataset.class_to_idx) #View category names,及对应的标签.
print(dataset.imgs) #See all the pictures in the path,及对应的标签
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.pyThe script does a training set on the dataset、验证集、测试集的划分.
train.pyThe script trains on the dataset
数据集
Just fit the format,参考链接一
效果展示
Click a link to take a look
开源地址
参考资料
边栏推荐
猜你喜欢
随机推荐
Matlab学习第一天(持续更新中)
Financial leasing business
【微服务】 微服务学习笔记二:Eureka注册中心的介绍及搭建
The Ballad of Lushan Sends Lu's Servant to the Void Boat
[PSQL] Complex query
正则表达式绕过
文件 - 02 上传文件:上传临时文件到服务器
'vite' is not an internal or external command, nor is it a runnable program or batch file.
事务的传播机制
【Go】Go 语言切片(Slice)
文件 - 05 下载文件:根据文件Id下载文件
Thread 类的基本用法——一网打尽
Navicat new database
2022.07.18_每日一题
2022.07.20_Daily Question
中断及pendSV
链表实现及任务调度
Zabbix6.2 Surprise Release!Especially optimize the performance of medium and large environment deployment!
【Go语言入门教程】Go语言简介
DAY18:Xss 靶场通关手册