NAV
Salesvision API
shell python

Salesvision API

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

It includes free public methods and python API client global access link

We also provide engine for recommendation system that works out of the box with mongo db

Fashion analysis

Fashion analysis includes recognition of items:

Result of service

Public methods

Curl HTTP Request

Public endpoint for fashion analysis with time measurement

Parameter Default Description
url true fashion image url.

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

Visual analysis method

The above command returns JSON structured like this:

{
  "result": [
    {
      "category": "pants",
      "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": [
        "#1a2d3f",
        ...
      "color_names": [
        "Blue",
        ...
      ],
      "color_embedding": [
        -0.45397675037384033,
        ...
      ],
      "color_cover_rates": [
        0.03515000268816948,
        ...
      ],
      "bounding_box": [
        0.35333333333333333,
        ...
      ]
    },
    {
      "category": "top, t-shirt, sweatshirt",
      "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": [
        "#36211c",
        ...
      ],
      "color_embedding": [
        -0.42154210805892944,
        ...
      ],
      "color_cover_rates": [
        0.03737499937415123,
        ...
      ],
      "bounding_box": [
        0.31222222222222223,
        ...
      ]
    },
    {
      "category": "shoe",
      "colors": [
        "#585752",
        ...
      ],
      "color_embedding": [
        -0.5064569115638733,
        ...
      ],
      "color_cover_rates": [
        0.0011500000255182385,
        ...
      ],
      "bounding_box": [
        0.5477777777777778,
        ...
      ]
    }
  ],
  "status": "0"
}

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

Client API

Setup

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

Install pip package

Fashion analysis

from salesvision.server_estimation import ServerEstimator

# Calling a class of server estimator
estimator = ServerEstimator(server_ip='api.salesvision.ai', server_port=0)

img_path = '/your_image_path/clothes1.jpg'

# Image description in json format
image_description = estimator(img_path)

Jupyter notebook demonstration

In jupyter notebook we provide demonstration of work for our service and database connection for MongoDB

jupyter notebook

Fashion Analysis Description

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

Errors

The Salesvision API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The methods requested is hidden for administrators only.
404 Not Found -- The specified method could not be found.
405 Method Not Allowed
429 Too Many Requests -- You're requesting too many fashion items! Slowing things down
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.