Skip to content

Fashion Tagging

PRICING DEMO TAXONOMY

The Fashion Tagging service provides categories, sub-categories and various tags for fashion product images.

We are also providing endpoint service for getting meta-tags for photo of a fashion product about scene, background and view information. This meta tags are good for example if you want to show your users just photos with specific view (for example only photos where the person is present or not).

If you would like to detect all possible fashion items on image and then get tags for all detected items use endpoin /detect or /detect_tags .

Please, see page API Calls and Credits for exact prices for individual API calls. The Fashion Tagging uses a flow of complex recognition models to tag each image, that's why the cost is higher than a simple image classification.

See it in action ...

  • You can test your fashion images and see the result on Ximilar Fashion Demo for free!
  • We provide a detailed presentation (PDF) of our Fashion Taxonomy (top categories, categories, features and tags) with examples!
  • We are constantly improving this service. We are open to add more features/tags on you request! (depends on your budget)
  • Our fashion tagging is easily customizable (rename the tags for your needs, creating new tags from other, ...) through your custom profile (contact us at sales@ximilar.com)
  • You can detect fashion apparel objects and do the tagging on individual objects with /detect and /detect_tags endpoint
  • Contact us at sales@ximilar.com for more information

Active the service in Ximilar App

In order to get access to the Fashion Tagging service, please register at https://app.ximilar.com, upgrade your account to Business Plan and then click on the Fashion Tagging tile on the main panel to make it accessible for your Ximilar account.

What is 'Top Category', 'Category' and '_tags'?

The workflow for identifying tags for fashion tagging service works in this way:

  1. First we detect the main fashion type of the product (one of the Top Categories) on the image (result is stored in Top Category field). Then based on Top Category we recognize sub-category of the product (stored in the field of Category).
  2. Based on this knowledge we decide which taggers we use for generating appropriate features with tags into the _tags field of json result.
  3. If you already know to which Top Category or Category given image belongs then you should specify it in the record. You can specify just either Top Category or Category. If you fill these fields then they must be filled with correct values from our taxonomy.

Screenshot

Python Library

If you are using Python programming language in your project you can query our API with our library. Our library is available on gitlab and through the pypi.

Taxonomy

Here we provide our fashion taxonomy pdf document with example images and full taxonomy tree with all possible tags.

FASHION TAXONOMY

API reference

The API follows the general rules of Ximilar API as described in Section First steps.

List of Top Categories: /v2/top_categories

https://api.ximilar.com/tagging/fashion/v2/top_categories

curl --request GET \
  --url https://api.ximilar.com/tagging/fashion/v2/top_categories \
  --header 'content-type: application/json'

CLICK TO SHOW JSON RESULT

{
  "Clothing": [
    "Clothing/Baby Clothes",
    "Clothing/Bathrobes",
    "Clothing/Dresses",
    "Clothing/Jackets and Coats",
    "Clothing/Nightwear",
    "Clothing/Overalls and Dungarees",
    "Clothing/Pants",
    "Clothing/Skirts",
    "Clothing/Upper"
  ],
  "Footwear": [
    "Footwear/Ballerinas",
    "Footwear/Chelsea and Ankle boots",
    "Footwear/Crocs",
    "Footwear/Flip-Flops",
    "Footwear/Formal Shoes",
    "Footwear/Free Time Shoes",
    "Footwear/Hiking",
    "Footwear/Ladies High Boots",
    "Footwear/Mules",
    "Footwear/Pumps",
    "Footwear/Rubber Boots",
    "Footwear/Sandals",
    "Footwear/Ski Boots",
    "Footwear/Slippers",
    "Footwear/Sneakers",
    "Footwear/Snow Boots",
    "Footwear/Trainers"
  ],
  "Jewellery": [
    "Jewellery/Bracelets",
    "Jewellery/Brooches, Badges and Pins",
    "Jewellery/Cufflinks",
    "Jewellery/Earrings and Earcuffs",
    "Jewellery/Necklaces, Pendants and Chains",
    "Jewellery/Rings",
    "Jewellery/Pins and Clips"
  ],
  "Bags": [
    "Bags/Backpacks",
    "Bags/Bum Bags",
    "Bags/Luggage",
    "Bags/Men's Bags",
    "Bags/Purses and Wallets",
    "Bags/Women's Bags"
  ],
  "Accessories": [
    "Accessories/Belts",
    "Accessories/Eyewear",
    "Accessories/Gloves",
    "Accessories/Hats and Caps",
    "Accessories/Scarves",
    "Accessories/Ties"
  ],
  "Underwear": [
    "Underwear/Bodies",
    "Underwear/Bras",
    "Underwear/Panties and Underpants",
    "Underwear/Sets",
    "Underwear/Socks",
    "Underwear/Tights"
  ],
  "Watch": []
}

Tagging endpoint: /v2/tags

https://api.ximilar.com/tagging/fashion/v2/tags

Given a list of image records, this method returns tags as predicted by the Fashion Tagging services, together with probabilities (the level of certainty) for each of these tags.

Things to note

  • Please, note that the "_base64" data is not returned. Use "_id" or any other field to identify your image.
  • Each of the tag contains probability of tag present on the image. All the tags are based on the main product type which is present in "Top category" and "Category" field.
  • All the tags are stored in field "_tags", only tags with probability > 30 % are returne
  • The field "_tags_simple" contains just list of strings (tag names) and is simpler than "_tags"
  • Maximum number of records/images that can be send to API in one request is 10.

Multiple images for one fashion product'?

Do you have multiple images for one fashion product?

  • You can send 'aggregate_labels': true in the request and the labels will be aggregated for entire batch! Your results is then based on several images and not only one and it is stored _aggregation_simple and _aggregation fields!

Screenshot

Parameters:

  • records: list of photos to predict the tags for

    • must contain either of _url or _base64 field - see section image data for details
    • each record can contain Top Category and Category field which defines the main-category and sub-category of the product on the photo; for some images, it's not clear what object is the main (e.g. a model with a t-shirt and pants) and thus it's recommended to send over this information about Top category and Category (if known). For example: t-shirt "Top Category": "Clothing" and "Category": "Clothing/Upper"
  • aggregate_labels: (optional) aggregate tags for the whole batch

    • true or false (default false)
    • if true, the records is considered as a batch of several photos of one object and after tagging the images separately, the tagger aggregates their tags into one output list of tags for the whole batch. Tags of individual images are not modified by this aggregation.
  • profile: (optional) if you know the id of your custom tagging profile, then this profile will apply on the _tags and transform it (rename tags/features, add tags, remove tags, ...)

$ curl https://api.ximilar.com/tagging/fashion/v2/tags -H "Content-Type: application/json" -H "Authorization: Token __API_TOKEN__" -d '{
    "records": [
        { "_url": "https://bit.ly/2IymQJv" },
        {"_base64": "/9j/4AAQSkZJR...", "_id": "image_id"}
    ]
}'
from ximilar.client import FashionTaggingClient

fashion_client = FashionTaggingClient(token="__API_TOKEN__")

result = fashion_client.tags([{"_url": "__URL_PATH_TO_IMAGE__"}])
print(result['records'][0]['_tags'])

Returns:

  • HTTP error code 2XX, if the method was OK and other HTTP error code, if the method failed.
  • Body of the response is a JSON object (map) with the following fields:
    • status - a JSON map with a status of the method processing. It contains these subfields:
      • code - a numeric code of the operation status; it follows the concept of HTTP status codes (2XX, 4XX). Specific codes are described for each type of answer (or operation) (see below).
      • text - a text describing the status code
    • records - JSON array with the input records, each record enriched by field "_tags" and "category"
    • _aggregation and _aggregation_simple if aggregate_labels set to true in request
CLICK TO SHOW JSON RESULT

{
  "records": [
    {
      "Top Category": "Clothing",
      "Category": "Clothing/Pants",
      "_status": {
        "code": 200,
        "text": "OK",
        "request_id": "29b97e82-b45e-41e1-aeba-a55d9cb353a5"
      },
      "_width": 425,
      "_height": 1000,
      "_tags": {
        "Category": [
          {
            "prob": 1.0,
            "name": "Clothing/Pants",
            "id": "7e3a6f68-f13a-417c-9613-16e6045b4020"
          }
        ],
        "Color": [
          {
            "prob": 0.99992,
            "name": "dark blue and navy",
            "id": "85c3a833-a910-46b7-aac3-c8cb46cd66e6"
          }
        ],
        "Length": [
          {
            "prob": 0.98506,
            "name": "long",
            "id": "bfca0daa-2ef7-4eff-892d-2021087064a9"
          }
        ],
        "Style": [
          {
            "prob": 0.99995,
            "name": "casual",
            "id": "404554c5-61bc-4f9f-a314-ebfc67607b96"
          }
        ],
        "Subcategory": [
          {
            "prob": 1.0,
            "name": "jeans",
            "id": "e2596296-b0e3-4e33-8016-bf1158f0499c"
          }
        ],
        "Pattern & Material": [
          {
            "prob": 0.99999,
            "name": "denim",
            "id": "bf5fda8c-d819-4f77-9231-80665d01474f"
          }
        ],
        "Gender": [],
        "Top Category": [
          {
            "prob": 0.99909,
            "name": "Clothing",
            "id": "13052be8-2cc7-48e4-a782-a00d658f997c"
          }
        ]
      },
      "_tags_simple": [
        "casual",
        "dark blue and navy",
        "long",
        "denim",
        "Clothing/Pants",
        "jeans",
        "Clothing"
      ]
    }
  ],
  "status": {
    "code": 200,
    "text": "OK",
  },
  "statistics": {
    "processing time": 0.8858194351196289
  }
}

Meta Tagging endpoint: /v2/meta

https://api.ximilar.com/tagging/fashion/v2/meta

Given a list of image records, this method returns meta tags for identification of Background (Meta/Background), Scene (Meta/Scene), View (Meta/View) and Person part (Meta/Person part).

CLICK TO SHOW META TAXONOMY
Feature Tags
Meta/Background studio background, real-life background
Meta/View (Footwear) back view, shoe sole view, full view, top view
Meta/View (Clothing) back view, side view, front view
Meta/Person part feet, hand, head/face, lower body, upper body
Meta/Scene package, partial person, partial product, whole person, whole product

Parameters:

  • records: list of photos to predict the tags for
    • must contain either of _url or _base64 field - see section image data for details
from ximilar.client import FashionTaggingClient

fashion_client = FashionTaggingClient(token="__API_TOKEN__")

result = fashion_client.meta_tags([{"_url": "__URL_PATH_TO_IMAGE__"}])
print(result["records"][0]["_tags_meta_simple"])
$ curl https://api.ximilar.com/tagging/fashion/v2/meta -H "Content-Type: application/json" -H "Authorization: Token __API_TOKEN__" -d '{
    "records": [
        { "_url": "https://bit.ly/2IymQJv" },
        {"_base64": "/9j/4AAQSkZJR...", "_id": "image_id"}
    ]
}'

Returns:

  • HTTP error code 2XX, if the method was OK and other HTTP error code, if the method failed.
  • Body of the response is a JSON object (map) with the following fields:
    • status - a JSON map with a status of the method processing. It contains these subfields:
      • code - a numeric code of the operation status; it follows the concept of HTTP status codes (2XX, 4XX). Specific codes are described for each type of answer (or operation) (see below).
      • text - a text describing the status code
    • records - JSON array with the input records, each record enriched by field "_tags_meta_simple" and "_tags_meta"
CLICK TO SHOW JSON RESULT

{
  "records": [
    {
      "_url": "https://images.ximilar.com/examples/fashion_products/040c944a07f9762c0f16212743c30882.jpg",
      "_status": {
        "code": 200,
        "text": "OK",
        "request_id": "41f474bb-08c5-4a8c-8c63-a0dd7cd3d198"
      },
      "_id": "67a6a13e-da3c-4c06-ac7b-ff2c5f18d231",
      "_width": 415,
      "_height": 1024,
      "Meta/Scene": "whole product",
      "_tags_meta": {
        "Top Category": [
          {
            "prob": 0.99942,
            "name": "Clothing",
            "id": "13052be8-2cc7-48e4-a782-a00d658f997c"
          }
        ],
        "Meta/View": [
          {
            "prob": 0.96136,
            "name": "front view",
            "id": "fe4b3dc0-80de-4b7e-a47f-7f87afc5b705"
          }
        ],
        "Meta/Background": [
          {
            "prob": 0.95783,
            "name": "studio background",
            "id": "09a446ba-a8c3-4177-b8d9-92582a44274b"
          }
        ],
        "Meta/Scene": [
          {
            "prob": 0.79654,
            "name": "whole product",
            "id": "ea071eca-d308-445f-b992-874f7e9daf49"
          }
        ]
      },
      "_tags_meta_simple": [
        "whole product",
        "Clothing",
        "front view",
        "studio background"
      ]
    }
  ],
  "status": {
    "code": 200,
    "text": "OK",
    "request_id": "41f474bb-08c5-4a8c-8c63-a0dd7cd3d198",
    "proc_id": "57550b16-f3ae-42e4-831e-3149781f9be7"
  },
  "statistics": {
    "processing time": 1.7702245712280273
  }
}

Apparel detection endpoint: /v2/detect

https://api.ximilar.com/tagging/fashion/v2/detect

Given a list of image records, this method returns detected fashion objects on image with their category.

Parameters:

  • records: list of photos to predict the tags for
    • must contain either of _url or _base64 field - see section image data for details
from ximilar.client import FashionTaggingClient

fashion_client = FashionTaggingClient(token="__API_TOKEN__")

result = fashion_client.detect([{"_url": "__URL_PATH_TO_IMAGE__"}])
print(result["records"][0]["_fashion_objects"])
$ curl https://api.ximilar.com/tagging/fashion/v2/detect -H "Content-Type: application/json" -H "Authorization: Token __API_TOKEN__" -d '{
    "records": [
        { "_url": "https://bit.ly/2IymQJv" },
        {"_base64": "/9j/4AAQSkZJR...", "_id": "image_id"}
    ]
}'

Returns:

  • HTTP error code 2XX, if the method was OK and other HTTP error code, if the method failed.
  • Body of the response is a JSON object (map) with the following fields:
    • status - a JSON map with a status of the method processing. It contains these subfields:
      • code - a numeric code of the operation status; it follows the concept of HTTP status codes (2XX, 4XX). Specific codes are described for each type of answer (or operation) (see below).
      • text - a text describing the status code
    • records - JSON array with the input records, each record enriched by field "_fashion_objects"
CLICK TO SHOW JSON RESULT

{
  "records": [
    {
      "_url": "__URL_PATH__",
      "_status": {
        "code": 200,
        "text": "OK",
        "request_id": "7a2a8436-eb21-4f7d-b09c-a942d5abdd1e"
      },
      "_id": "8a146c46-2efb-4217-991c-5820a37ea897",
      "_width": 682,
      "_height": 1024,
      "_fashion_objects": [
        {
          "name": "Clothing",
          "id": "8e6cf45d-d416-4560-a89a-1b83b80e003b",
          "bound_box": [
            266,
            281,
            544,
            707
          ],
          "prob": 0.9437555074691772,
          "area": 0.20078531901041666,
          "Top Category": "Clothing",
          "Category": "Clothing/Pants"
        },
        {
          "name": "Clothing",
          "id": "8e6cf45d-d416-4560-a89a-1b83b80e003b",
          "bound_box": [
            208,
            33,
            588,
            356
          ],
          "prob": 0.886322557926178,
          "area": 0.2080959743923611,
          "Top Category": "Clothing",
          "Category": "Clothing/Jackets and Coats"
        },
        {
          "name": "Other/Person",
          "id": "bca06e48-a1e1-48d5-94c2-40b57f3fcff2",
          "bound_box": [
            217,
            0,
            578,
            743
          ],
          "prob": 0.6219701766967773,
          "area": 0.4547509087456597
        }
      ]
    }
  ],
  "status": {
    "code": 200,
    "text": "OK",
    "request_id": "7a2a8436-eb21-4f7d-b09c-a942d5abdd1e",
    "proc_id": "55669f4d-79f8-4957-aaf5-0be301252708"
  },
  "statistics": {
    "processing time": 1.3688881397247314
  }
}

Fashion detection and tags endpoint: /v2/detect_tags

https://api.ximilar.com/tagging/fashion/v2/detect_tags

Given a list of image records, this method returns detected fashion objects on image with all the possible tags (similar to /tags endpoint) for every object.

Parameters:

  • records: list of photos to predict the tags for
    • must contain either of _url or _base64 field - see section image data for details
from ximilar.client import FashionTaggingClient

fashion_client = FashionTaggingClient(token="__API_TOKEN__")

result = fashion_client.detect_tags([{"_url": "__URL_PATH_TO_IMAGE__"}])
print(result["records"][0]["_fashion_objects"])
$ curl https://api.ximilar.com/tagging/fashion/v2/detect_tags -H "Content-Type: application/json" -H "Authorization: Token __API_TOKEN__" -d '{
    "records": [
        { "_url": "https://bit.ly/2IymQJv" },
        {"_base64": "/9j/4AAQSkZJR...", "_id": "image_id"}
    ]
}'

Returns:

  • HTTP error code 2XX, if the method was OK and other HTTP error code, if the method failed.
  • Body of the response is a JSON object (map) with the following fields:
    • status - a JSON map with a status of the method processing. It contains these subfields:
      • code - a numeric code of the operation status; it follows the concept of HTTP status codes (2XX, 4XX). Specific codes are described for each type of answer (or operation) (see below).
      • text - a text describing the status code
    • records - JSON array with the input records, each record enriched by field "_fashion_objects"
CLICK TO SHOW JSON RESULT

{
  "records": [
    {
      "_url": "__URL_PATH__",
      "_status": {
        "code": 200,
        "text": "OK",
        "request_id": "fd114fb0-dff9-4851-842c-bf9bc4ce856d"
      },
      "_id": "2d146c00-1609-4d44-bc34-77d39c6bf752",
      "_width": 682,
      "_height": 1024,
      "_fashion_objects": [
        {
          "name": "Clothing",
          "id": "8e6cf45d-d416-4560-a89a-1b83b80e003b",
          "bound_box": [
            266,
            281,
            544,
            707
          ],
          "prob": 0.9437555074691772,
          "area": 0.20078531901041666,
          "Top Category": "Clothing",
          "_tags": {
            "Category": [
              {
                "prob": 0.99295,
                "name": "Clothing/Pants",
                "id": "7e3a6f68-f13a-417c-9613-16e6045b4020"
              }
            ],
            "Color": [
              {
                "prob": 0.53784,
                "name": "black",
                "id": "ca5a002b-d206-45a3-b586-820539845a5e"
              },
              {
                "prob": 0.46087,
                "name": "dark blue and navy",
                "id": "848d99a2-0f52-4ecf-8ca4-947ee55e1c36"
              }
            ],
            "Style": [
              {
                "prob": 1.0,
                "name": "elegant",
                "id": "8ec36318-6a71-41f6-90e6-6f8eba3dad2a"
              }
            ],
            "Subcategory": [
              {
                "prob": 0.99998,
                "name": "suit trousers",
                "id": "87ea03a2-040f-4b21-8b12-33e3b5f04261"
              },
              {
                "name": "formal trousers",
                "prob": 0.99295
              }
            ],
            "Pattern": [
              {
                "prob": 0.95253,
                "name": "plain",
                "id": "5065ee09-6fa1-48f3-834f-eced387f46a8"
              }
            ],
            "Gender": [
              {
                "prob": 0.38094,
                "name": "men",
                "id": "724afe83-bfb7-4f18-aeeb-a7511feeb9b1"
              },
              {
                "prob": 0.32215,
                "name": "women",
                "id": "6d310c15-258f-40e7-9ced-d8be7059b3e9"
              }
            ],
            "Length": [
              {
                "prob": 0.97548,
                "name": "long",
                "id": "bfca0daa-2ef7-4eff-892d-2021087064a9"
              }
            ],
            "Fit": [
              {
                "prob": 0.74897,
                "name": "slim",
                "id": "ebb81e52-8a41-450e-988c-58003a714286"
              }
            ],
            "Top Category": [
              {
                "id": "13052be8-2cc7-48e4-a782-a00d658f997c",
                "name": "Clothing",
                "prob": 1.0
              }
            ]
          },
          "_tags_simple": [
            "elegant",
            "long",
            "Clothing/Pants",
            "plain",
            "slim",
            "Clothing",
            "formal trousers",
            "suit trousers",
            "black"
          ],
          "Category": "Clothing/Pants"
        },
        {
          "name": "Clothing",
          "id": "8e6cf45d-d416-4560-a89a-1b83b80e003b",
          "bound_box": [
            208,
            33,
            588,
            356
          ],
          "prob": 0.886322557926178,
          "area": 0.2080959743923611,
          "Top Category": "Clothing",
          "_tags": {
            "Category": [
              {
                "prob": 0.99487,
                "name": "Clothing/Jackets and Coats",
                "id": "8197f0fa-4944-4f53-ac72-527a6247d80c"
              }
            ],
            "Color": [
              {
                "prob": 0.98718,
                "name": "dark blue and navy",
                "id": "bc0d83a6-98ce-4e20-8660-c44beafbc70d"
              }
            ],
            "Gender": [
              {
                "prob": 0.99848,
                "name": "men",
                "id": "724afe83-bfb7-4f18-aeeb-a7511feeb9b1"
              }
            ],
            "Hood": [
              {
                "prob": 0.99904,
                "name": "no hood",
                "id": "7cf7ca06-a79f-4cea-b86b-f82d73e38669"
              }
            ],
            "Length": [
              {
                "prob": 0.73404,
                "name": "middle",
                "id": "c75f6f59-8088-419f-9245-c06d76c8dd12"
              }
            ],
            "Material": [
              {
                "prob": 0.9851,
                "name": "textile",
                "id": "fb371b00-b9ed-423b-8883-ce8df964160d"
              }
            ],
            "Style": [
              {
                "prob": 0.99994,
                "name": "elegant",
                "id": "e4f67dcd-9a4d-463a-840e-47f6a5715c1b"
              }
            ],
            "Subcategory": [
              {
                "prob": 0.99981,
                "name": "suit jackets and tuxedos",
                "id": "9f3deb62-a4ea-4da3-a67f-6518ff81f537"
              }
            ],
            "Pattern": [
              {
                "prob": 0.97486,
                "name": "plain",
                "id": "5065ee09-6fa1-48f3-834f-eced387f46a8"
              }
            ],
            "Top Category": [
              {
                "id": "13052be8-2cc7-48e4-a782-a00d658f997c",
                "name": "Clothing",
                "prob": 1.0
              }
            ]
          },
          "_tags_simple": [
            "no hood",
            "elegant",
            "suit jackets and tuxedos",
            "plain",
            "Clothing/Jackets and Coats",
            "Clothing",
            "textile",
            "dark blue and navy",
            "men",
            "middle"
          ],
          "Category": "Clothing/Jackets and Coats"
        },
        {
          "name": "Other/Person",
          "id": "bca06e48-a1e1-48d5-94c2-40b57f3fcff2",
          "bound_box": [
            217,
            0,
            578,
            743
          ],
          "prob": 0.6219701766967773,
          "area": 0.4547509087456597
        }
      ]
    }
  ],
  "status": {
    "code": 200,
    "text": "OK",
    "request_id": "fd114fb0-dff9-4851-842c-bf9bc4ce856d",
    "proc_id": "55669f4d-79f8-4957-aaf5-0be301252708"
  },
  "statistics": {
    "processing time": 3.2415950298309326
  }
}