Salesvision提供准确、可靠和可扩展的时尚形象分析
salesvision的Python项目详细描述
Salesvision API
Salesvision API通过端点提供准确、可靠和可伸缩的时尚图像分析。在
它包括免费的公共方法和pythonapi客户端
时尚分析
时尚分析包括物品识别:
- 类别
- 标签/属性
- 面具
- 颜色
类别检测
以下解决方案将检测27个类别:
标签/属性识别
解决方案将指定7个主要类别和样式的标记,如下所述:
在现实世界中,不同时尚商品的图像会有这样的输出:
颜色提取
以下是如何从时装单遮罩覆盖区域提取颜色的示例:
公共方法
Curl HTTP请求
Public endpoint for fashion analysis with time measurement
`IMG_URL=https%3A%2F%2Fis4.revolveassets.com%2Fimages%2Fp4%2Fn%2Fd%2FCAME-WD114_V1.jpg;time curl -X GET "http://87.117.25.190:5015/fashion_analysis/?url=$IMG_URL"`
^{pr2}$From office local network
你自己试试看:
office local network access link
Parameter | Default | Description |
---|---|---|
url | true | fashion image url. |
json
输出将包含结果列表,其中每个对象都是可识别的时尚项
每个对象将包括:
- 27个时装班中的1个
- 7大类标签说明
- 已识别项的掩码
- 从项目遮罩覆盖区域提取5种主要颜色
- 颜色嵌入,可用于以后的时尚项目搜索按颜色
目视分析法
The above command returns JSON structured like this:
{"result":[{"category":"pants","description":{"tags":{"length":"maxi (length)","nickname":"jeans","opening type":"fly (opening)","silhouette":"regular (fit)","textile finishing, manufacturing techniques":"washed","textile pattern":"plain (pattern)","waistline":"low waist"},"colors":["172839",...]},"color_embedding":[-0.45759817957878113,...]},{"category":"top, t-shirt, sweatshirt","description":{"tags":{"length":"above-the-hip (length)","nickname":"classic (t-shirt)","opening type":"no opening","silhouette":"symmetrical","textile finishing, manufacturing techniques":"printed","textile pattern":"plain (pattern)","waistline":"no waistline"},"colors":["321d1a",...]},"color_embedding":[-0.5404209494590759,...]},{"category":"shoe","description":{"colors":["161615",...]},"color_embedding":[-0.5041476488113403,...]},{"category":"headband, head covering, hair accessory","description":{"colors":["35261b",...]},"color_embedding":[-0.5759932398796082,...]}]}
该方法允许我们通过给定图像检查给定遮罩和边界框识别的准确性:
为已识别的"category": "pants"
提供的属性:
^{tb2}$
你自己试试看:
office local network access link
客户端API
设置
您可以使用python3.x语言轻松地设置我们的SDK
Install pip package (under development)
pip install salesvision
身份验证
Example of authentification process: will be replaced with fastapi oauth2
fromsalesvisionimportSalesvision# connect to Salesvision module to work with its APIapi=Salesvision(api_url='https://salesvision.com/api',api_key='Your_API_key',secret)
Make sure to replace
v
with your API key.
SalesvisionAPI可能会使用oAuth2进行身份验证过程
Authorization: Your_API_key
时尚分析
fromsalesvisionimportSalesvision# connect to Salesvision module to work with its APIapi=Salesvision(api_url='https://salesvision.com/api',api_key='Your_API_key',secret)# image can be rather url or local stored fileresults=api.fashion_analysis(image)
The above command returns JSON structured like this:
{"result":[{"category":"pants","description":{"tags":{"length":"maxi (length)","nickname":"jeans","opening type":"fly (opening)","silhouette":"regular (fit)","textile finishing, manufacturing techniques":"washed","textile pattern":"plain (pattern)","waistline":"low waist"},"colors":["172839",...]},"color_embedding":[-0.45759817957878113,...]},{"category":"top, t-shirt, sweatshirt","description":{"tags":{"length":"above-the-hip (length)","nickname":"classic (t-shirt)","opening type":"no opening","silhouette":"symmetrical","textile finishing, manufacturing techniques":"printed","textile pattern":"plain (pattern)","waistline":"no waistline"},"colors":["321d1a",...]},"color_embedding":[-0.5404209494590759,...]},{"category":"shoe","description":{"colors":["161615",...]},"color_embedding":[-0.5041476488113403,...]},{"category":"headband, head covering, hair accessory","description":{"colors":["35261b",...]},"color_embedding":[-0.5759932398796082,...]}]}
使用发动机舱盖下立柱请求
查询参数
Parameter | Default | Description |
---|---|---|
file: | false | file in binary format. |
此方法的输出将包含结果列表,其中每个对象都是可识别的时尚项
每个对象将包括:
- 27个时装班中的1个
- 7大类标签说明
- 已识别项的掩码
- 从项目遮罩覆盖区域提取5种主要颜色
- 颜色嵌入,可用于以后的时尚项目搜索按颜色
- 项目
标签: