Skip to main content

Salesvision API

Salesvision API provides accurate, reliable and scalable fashion image analysis by endpoints.

It includes free public methods and python API client

Fashion analysis

Fashion analysis includes recognition of items:

  • Category
  • Tags/attributes
  • Mask
  • Color

Category detection

The following solution will detect 27 categories:

Classes

Tag/attribute recognition

The solution will specify tags from 7 main categories and styles such as described below:

Initial tags

On the real world images will have such output for different fashion items:

Tags

Color extraction

Here is example of how color is been extracted from the fashion item mask covered area:

Mask and color item

Public methods

Curl HTTP Request

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"`

From office local network

`IMG_URL=https%3A%2F%2Fis4.revolveassets.com%2Fimages%2Fp4%2Fn%2Fd%2FCAME-WD114_V1.jpg;
time curl -X GET "http://192.168.0.125:5015/fashion_analysis/?url=$IMG_URL"`

Try it yourself at:

office local network access link

global network access link

Parameter Default Description
url true fashion image url.

The json output will contain result list where each object is a recognized fashion item

Each object will include:

  • 1 of 27 fashion classes
  • Tags description in 7 main categories
  • Mask of the recognized item
  • 5 main colors extracted from item mask covered area
  • Color embedding which can be used later on with fashion item search by color

Visual analysis method

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,
        ...
      ]
    }
  ]
}

That method allows us to check accuracy of given masks and bounding boxes recognition by the given image:

Result of execution

Provided attributes for the recognized "category": "pants":

Attribute Predicted tag
length maxi
nickname jeans
opening type fly
silhouette regular (fit)
textile finishing, manufacturing techniques washed
textile pattern plain
waistline low waist

Try it yourself at:

office local network access link

global network access link

Client API

Setup

You can easily setup our SDK with python 3.x language

Install pip package (under development)

pip install salesvision

Authentication

Example of authentification process: will be replaced with fastapi oauth2

from salesvision import Salesvision

# connect to Salesvision module to work with its API

api = Salesvision(api_url='https://salesvision.com/api', api_key='Your_API_key', secret)

Make sure to replace v with your API key.

Salesvision API will be probably using oAuth2 for authentification process

Authorization: Your_API_key

Fashion analysis

from salesvision import Salesvision

# connect to Salesvision module to work with its API
api = Salesvision(api_url='https://salesvision.com/api', api_key='Your_API_key', secret)


# image can be rather url or local stored file
results = 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,
        ...
      ]
    }
  ]
}

Under the hood POST request is used

Query Parameters

Parameter Default Description
file: false file in binary format.

The output of this method will contain result list where each object is a recognized fashion item

Each object will include:

  • 1 of 27 fashion classes
  • Tags description in 7 main categories
  • Mask of the recognized item
  • 5 main colors extracted from item mask covered area
  • Color embedding which can be used later on with fashion item search by color

Release files for salesvision 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for salesvision 0.1.6
File Size Uploaded
salesvision-0.1.6.tar.gz 11.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for salesvision 0.1.6
File Interpreter ABI Platform
salesvision-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 21.0 kB

Release files / salesvision-0.1.6.tar.gz

Download URL salesvision-0.1.6.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
276f758a3c1eb10755a87eb6b56a218d13633b6a1e7cf14c0c55aabc618c48cb
BLAKE2b-256 checksum
How to use checksums
0019bde10d39cedc5968ee6afcbdacfdd90b9bc98bc94db65d82d51a8a70751c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.5

Release files / salesvision-0.1.6-py3-none-any.whl

Download URL salesvision-0.1.6-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f3a86c83a1440ef2a828dd2c8c94cabd056c7a6fab6e320b1ce5c31ab1f7ef6
BLAKE2b-256 checksum
How to use checksums
5dba36ba104f61e10d4ef7d1f28cad093d3af7cd5a1c353751d034ca4e28546d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page