Fashion Tagging
The Fashion Tagging service provides categories, sub-categories and various tags for fashion product images. Our Fashion Tagging service can return results (tags) translated in your language if needed, simply contact us at care@ximilar.com for more information. For getting the whole taxonomy in PDF with sample images, please write us at care@ximilar.com
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 endpoint /detect_tags or /detect_tags_all. This service API has two endpoints running at URLs:
https://api.ximilar.com/tagging/fashion/v2/top_categories
https://api.ximilar.com/tagging/fashion/v2/detect_tags (main endpoint)
https://api.ximilar.com/tagging/fashion/v2/detect
https://api.ximilar.com/tagging/fashion/v2/tags
https://api.ximilar.com/tagging/fashion/v2/detect_tags_all
https://api.ximilar.com/tagging/fashion/v2/meta
https://api.ximilar.com/tagging/fashion/v2/region
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. Fashion Tagging is available only in Business and Professional pricing plans.
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
What is 'Top Category', 'Category', '_tags', '_objects'?
The workflow for identifying tags for fashion tagging service works in this way:
- a) If you are working with
detect_tags
endpoint then first we detect all possible fashion objects (exact location defined by bounding box) on images. This result is stored in the '_objects' field of each record. These objects are named after one of the Top Category. The Top Category can be 'Footwear', 'Clothing', 'Jewellery', ... Then the object with largest area is further analyzed for getting sub-category (stored in the field of Category). - b) If you are working with simple
tags
endpont (without object detection) then first we recognize main fashion category (one of the Top Categories) on the image (result is stored inTop Category
field). Then based onTop Category
we recognize sub-category of the product (stored in the field of Category). - Based on this knowledge (Top Category and Category) we decide which taggers we use for generating appropriate features with tags into the _tags field of json result.
- If you already know to which
Top Category
orCategory
given image belongs then we highly recommend that you should specify it in the record inside of request. You can specify just eitherTop Category
orCategory
. If you fill these fields then they must be filled with correct values from our taxonomy. This improves the overall precision of the returned results.
Language Translations - Tags
This service can return results (tags) translated in your language if needed, simply contact us at care@ximilar.com for more information and available translations. If some translation is not available than our team can build it for you.
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": []
}
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 largest object or picked one.
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. If you know these two fields, please specify it in each of the record.
- All the tags are stored in field "_tags", only tags with probability > 30 % are returned
- The field "_tags_simple" contains just list of strings (tag names) and is simpler than "_tags"
- The field "_tags" and "_tags_simple" are stored in the first detected object
- The field "_tags_map" is simple dictionary (Feature: Top tag)
- Maximum number of records/images that can be send to API in one request is 10.
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
andCategory
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" - if you want to get tags for specific object, then send the request with
_objects
field (list) with only this object
- must contain either of
-
aggregate_labels
: (optional) aggregate tags for the whole batchtrue
orfalse
(defaultfalse
)- 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, ...) language
: (optional) (language code). For more info please contact us atcare@ximilar.com
skip_empty
: (optional)true
orfalse
(defaultfalse
)- if
true
and no_objects
are detect, then skip tagging of whole image. By default, if no fashion object is detected, this endpoint creates artificiall object with full image size (the top category, and category is set by tagging of whole image). If theskip_empty
is true then this processing is skipped and empty list of_objects
is returned.
- if
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]["_objects"])
# send the request again and get tags result fort second object
result = fashion_client.detect_tags([{"_url": "__URL_PATH_TO_IMAGE__", "_objects": result["records"][0]["_objects"][1]}])
$ curl https://api.ximilar.com/tagging/fashion/v2/detect_tags -H "Content-Type: application/json" -H "Authorization: Token __API_TOKEN__" -d '{
"records": [
{ "_url": "https://images.ximilar.com/examples/fashion_real/5_Unsplash.jpg" }
]
}'
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_objects
, this endpoint always return at least one object (if none was detected then it is created artificially with size of whole image).language
: (optional) (language code). For more info please contact us atcare@ximilar.com
CLICK TO SHOW JSON RESULT
{
"records": [
{
"_url": "https://images.ximilar.com/examples/fashion_real/5_Unsplash.jpg",
"_status": {
"code": 200,
"text": "OK",
"request_id": "f9aaa4e4-740e-4668-b481-5f968d196a0d"
},
"_id": "abda24bb-5117-4f10-ba79-5f5483a42aa0",
"_width": 1461,
"_height": 2048,
"_objects": [
{
"name": "Clothing",
"id": "8e6cf45d-d416-4560-a89a-1b83b80e003b",
"bound_box": [
562,
172,
1152,
1812
],
"prob": 0.9680776000022888,
"area": 0.32338188740588636,
"Top Category": "Clothing",
"_tags": {
"Category": [
{
"prob": 0.99792,
"name": "Clothing/Pants",
"id": "7e3a6f68-f13a-417c-9613-16e6045b4020"
}
],
"Color": [
{
"prob": 0.99758,
"name": "grey",
"id": "a4ed4e28-3280-47cc-89c5-8928bf62d266"
}
],
"Style": [
{
"prob": 0.97983,
"name": "casual",
"id": "404554c5-61bc-4f9f-a314-ebfc67607b96"
}
],
"Subcategory": [
{
"prob": 0.98955,
"name": "sweat pants",
"id": "d0e5d8b3-cf4c-477f-b780-38d96575679c"
},
{
"name": "casual trousers",
"prob": 0.97983
}
],
"Gender": [
{
"prob": 0.95374,
"name": "women",
"id": "cc58c8ea-17a1-4caf-871b-3953a5ff4c3e"
}
],
"Material": [
{
"prob": 0.64668,
"name": "linen",
"id": "2638aa3c-c9cc-4964-b58b-6caffeaa4590"
}
],
"Length": [
{
"prob": 0.98977,
"name": "long",
"id": "19a29ff1-7691-4bbd-a2ab-430b642ef11e"
}
],
"Fit": [
{
"prob": 0.65968,
"name": "straight",
"id": "56baba63-0cad-4a5a-a97b-d09be37b99de"
}
],
"Age": [
{
"prob": 0.99849,
"name": "adult",
"id": "464f18b8-e61b-4f95-afe6-48b3a8db26ab"
}
],
"Design": [
{
"prob": 0.97059,
"name": "melange",
"id": "72a54b33-3e30-4a1c-bbaa-d05f45d0f381"
}
],
"Top Category": [
{
"id": "13052be8-2cc7-48e4-a782-a00d658f997c",
"name": "Clothing",
"prob": 1.0
}
]
},
"_tags_map": {
"Top Category": "Clothing",
"Category": "Clothing/Pants",
"Color": "grey",
"Style": "casual",
"Subcategory": "sweat pants",
"Gender": "women",
"Material": "linen",
"Length": "long",
"Fit": "straight",
"Age": "adult",
"Design": "melange"
},
"_tags_simple": [
"grey",
"sweat pants",
"melange",
"straight",
"women",
"long",
"Clothing/Pants",
"adult",
"casual trousers",
"Clothing",
"linen",
"casual"
],
"Category": "Clothing/Pants"
},
{
"name": "Footwear",
"id": "6833ca50-9c57-4c33-b8fa-d740a08f4cff",
"bound_box": [
707,
1756,
1149,
1952
],
"prob": 0.7639346718788147,
"area": 0.028953306810403832,
"Top Category": "Footwear",
"Category": "Footwear/Sneakers"
},
{
"name": "Footwear",
"id": "6833ca50-9c57-4c33-b8fa-d740a08f4cff",
"bound_box": [
445,
1484,
684,
2000
],
"prob": 0.745168924331665,
"area": 0.04121615118069815,
"Top Category": "Footwear",
"Category": "Footwear/Sneakers"
}
]
}
],
"version": "2021-06-11 10:57:41.777300+00:00",
"status": {
"code": 200,
"text": "OK",
"request_id": "f9aaa4e4-740e-4668-b481-5f968d196a0d",
"proc_id": "b98fa409-37b3-4eab-ac56-e01bea3f2fbf"
},
"statistics": {
"processing time": 1.0212260818481445
}
}
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
- must contain either of
language
: (optional) (language code). For more info please contact us atcare@ximilar.com
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.
Things to note
- For getting best results, use this endpoint if there are multiple fashion items, or person with fashion items on image.
- Please, note that the "_base64" data is not returned. Use "_id" or any other field to identify your image.
- Fashion objects, with exact location (bounding box) are stored in the '_objects' field.
- Each of the tag and object contains probability of presence on the image.
- All the tags are stored in field "_tags" within the first (largest) '_object', only tags with probability > 30 % are returned
- The '_tags' field is returned only for the object with largest area, not probability!
- 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.
- If you know the Top Category or Category, then please specify them in each of the record. This can improve the overall precision of returned results.
- You can also send the object, simple create field '_objects' with one object (you will need to specify bound_box and Top Category)
- This endpoint cannot aggregate results from multiple records.
Parameters:
records
: list of photos to predict the tags for- must contain either of
_url
or_base64
field - see section image data for details
- must contain either of
from ximilar.client import FashionTaggingClient
fashion_client = FashionTaggingClient(token="__API_TOKEN__")
result = fashion_client.detect([{"_url": "__URL_PATH_TO_IMAGE__"}])
print(result["records"][0]["_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 "_objects"language
: (optional) (language code). For more info please contact us atcare@ximilar.com
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,
"_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"
}
]
}
],
"status": {
"code": 200,
"text": "OK",
"request_id": "7a2a8436-eb21-4f7d-b09c-a942d5abdd1e",
"proc_id": "55669f4d-79f8-4957-aaf5-0be301252708"
},
"statistics": {
"processing time": 1.3688881397247314
}
}
Product Image Tagging: /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
- For getting best results, use this endpoint if there is visible only one whole fashion product on the image.
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!
Parameters:
records
: list of photos to predict the tags for- must contain either of
_url
or_base64
field - see section image data for details - if you already know what is on the image, please specify
Top Category
andCategory
in record
- must contain either of
aggregate_labels
: (optional) aggregate tags for the whole batchtrue
orfalse
(defaultfalse
)- 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.
language
: (optional) (language code). For more info please contact us atcare@ximilar.com
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'])
$ 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"}
]
}'
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
ifaggregate_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_map": {
"Top Category": "Clothing",
"Category": "Clothing/Pants",
"Color": "dark blue and navy",
"Length": "long",
"Style": "casual",
"Subcategory": "jeans",
"Pattern & Material": "denim",
},
"_tags_simple": [
"casual",
"dark blue and navy",
"long",
"denim",
"Clothing/Pants",
"jeans",
"Clothing"
]
}
],
"status": {
"code": 200,
"text": "OK",
},
"statistics": {
"processing time": 0.8858194351196289
}
}
Fashion detection and tags for all objects endpoint: /v2/detect_tags_all
https://api.ximilar.com/tagging/fashion/v2/detect_tags_all
Given a list of image records, this method returns detected fashion objects on image with all the possible tags (similar to /detect_tags endpoint) for all objects.
Parameters:
records
: list of photos to predict the tags for- must contain either of
_url
or_base64
field - see section image data for details - if you already know what is on the image, please specify
Top Category
andCategory
in record
- must contain either of
language
: (optional) (language code). For more info please contact us atcare@ximilar.com
$ curl https://api.ximilar.com/tagging/fashion/v2/detect_tags_all -H "Content-Type: application/json" -H "Authorization: Token __API_TOKEN__" -d '{
"records": [
{ "_url": "https://images.ximilar.com/examples/fashion_real/5_Unsplash.jpg" }
]
}'
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 "_objects". If no objects are detected then this is empty list.
CLICK TO SHOW JSON RESULT
{
"records": [
{
"_url": "https://images.ximilar.com/examples/fashion_real/5_Unsplash.jpg",
"_status": {
"code": 200,
"text": "OK",
"request_id": "f9aaa4e4-740e-4668-b481-5f968d196a0d"
},
"_id": "abda24bb-5117-4f10-ba79-5f5483a42aa0",
"_width": 1461,
"_height": 2048,
"_objects": [
{
"name": "Clothing",
"id": "8e6cf45d-d416-4560-a89a-1b83b80e003b",
"bound_box": [
562,
172,
1152,
1812
],
"prob": 0.9680776000022888,
"area": 0.32338188740588636,
"Top Category": "Clothing",
"_tags": {
"Category": [
{
"prob": 0.99792,
"name": "Clothing/Pants",
"id": "7e3a6f68-f13a-417c-9613-16e6045b4020"
}
],
"Color": [
{
"prob": 0.99758,
"name": "grey",
"id": "a4ed4e28-3280-47cc-89c5-8928bf62d266"
}
],
"Style": [
{
"prob": 0.97983,
"name": "casual",
"id": "404554c5-61bc-4f9f-a314-ebfc67607b96"
}
],
"Subcategory": [
{
"prob": 0.98955,
"name": "sweat pants",
"id": "d0e5d8b3-cf4c-477f-b780-38d96575679c"
},
{
"name": "casual trousers",
"prob": 0.97983
}
],
"Gender": [
{
"prob": 0.95374,
"name": "women",
"id": "cc58c8ea-17a1-4caf-871b-3953a5ff4c3e"
}
],
"Material": [
{
"prob": 0.64668,
"name": "linen",
"id": "2638aa3c-c9cc-4964-b58b-6caffeaa4590"
}
],
"Length": [
{
"prob": 0.98977,
"name": "long",
"id": "19a29ff1-7691-4bbd-a2ab-430b642ef11e"
}
],
"Fit": [
{
"prob": 0.65968,
"name": "straight",
"id": "56baba63-0cad-4a5a-a97b-d09be37b99de"
}
],
"Age": [
{
"prob": 0.99849,
"name": "adult",
"id": "464f18b8-e61b-4f95-afe6-48b3a8db26ab"
}
],
"Design": [
{
"prob": 0.97059,
"name": "melange",
"id": "72a54b33-3e30-4a1c-bbaa-d05f45d0f381"
}
],
"Top Category": [
{
"id": "13052be8-2cc7-48e4-a782-a00d658f997c",
"name": "Clothing",
"prob": 1.0
}
]
},
"_tags_map": {
"Top Category": "Clothing",
"Category": "Clothing/Pants",
"Color": "grey",
"Length": "long",
"Style": "casual",
"Subcategory": "sweat pants",
"Gender": "women",
"Material": "linen",
"Length": "long",
"Fit": "straight",
"Age": "adult",
"Design": "melange"
},
"_tags_simple": [
"grey",
"sweat pants",
"melange",
"straight",
"women",
"long",
"Clothing/Pants",
"adult",
"casual trousers",
"Clothing",
"linen",
"casual"
],
"Category": "Clothing/Pants"
},
{
"name": "Footwear",
"id": "6833ca50-9c57-4c33-b8fa-d740a08f4cff",
"bound_box": [
707,
1756,
1149,
1952
],
"prob": 0.7639346718788147,
"area": 0.028953306810403832,
"Top Category": "Footwear",
"_tags": {
"Category": [
{
"prob": 0.99408,
"name": "Footwear/Sneakers",
"id": "5af6a3c3-c204-4b5d-a996-3d797598a012"
}
],
"Color": [
{
"prob": 0.70317,
"name": "red",
"id": "9a250080-1570-4ba4-a507-b237af7dc6ea"
}
],
"Gender": [
{
"prob": 0.9699,
"name": "unisex",
"id": "72a31f58-9e26-4263-b609-6040835c7dbc"
}
],
"Material": [
{
"prob": 0.90603,
"name": "textile shoes",
"id": "ae2cd700-7fa2-4b87-b9ae-ce994d3bfcf1"
}
],
"Style": [
{
"prob": 0.99842,
"name": "casual",
"id": "524ddb1c-4aef-4170-adb8-9adf4dd07bba"
}
],
"Height": [
{
"prob": 0.99495,
"name": "low shoes",
"id": "99dfe0ed-9f04-482e-b3d6-3d13f77635a8"
}
],
"Heel shape": [
{
"prob": 0.99598,
"name": "flatform",
"id": "cb385bb3-94d4-435f-a994-01b415e5e0c7"
}
],
"Heel height": [
{
"prob": 0.99291,
"name": "no heels",
"id": "2ca1dd12-65cf-46b0-8bc5-c06c6e821312"
}
],
"Top Category": [
{
"id": "1e3653aa-ce56-4341-ae88-8984d14963e8",
"name": "Footwear",
"prob": 1.0
}
]
},
"_tags_map": {
"Top Category": "Footwear",
"Category": "Footwear/Sneakers",
"Color": "red",
"Gender": "unisex",
"Material": "textile shoes",
"Style": "casual",
"Height": "low shoes",
"Heel shape": "flatform",
"Heel height": "no heels"
},
"_tags_simple": [
"flatform",
"textile shoes",
"low shoes",
"no heels",
"unisex",
"Footwear/Sneakers",
"Footwear",
"red",
"casual"
],
"Category": "Footwear/Sneakers"
},
{
"name": "Footwear",
"id": "6833ca50-9c57-4c33-b8fa-d740a08f4cff",
"bound_box": [
445,
1484,
684,
2000
],
"prob": 0.745168924331665,
"area": 0.04121615118069815,
"Top Category": "Footwear",
"_tags": {
"Category": [
{
"prob": 0.87255,
"name": "Footwear/Sneakers",
"id": "5af6a3c3-c204-4b5d-a996-3d797598a012"
}
],
"Color": [
{
"prob": 0.93825,
"name": "multicolor",
"id": "6d2aa3ee-25e7-4958-8e81-410d76da1efe"
}
],
"Gender": [
{
"prob": 0.96218,
"name": "women",
"id": "2b5cf6fa-304c-4808-8164-b81fc6b3bd48"
}
],
"Material": [
{
"prob": 0.71297,
"name": "textile shoes",
"id": "ae2cd700-7fa2-4b87-b9ae-ce994d3bfcf1"
},
{
"prob": 0.3062,
"name": "leather/faux leather shoes",
"id": "52a840f8-4d25-4984-90bb-65fa0532be4b"
}
],
"Style": [
{
"prob": 0.75199,
"name": "casual",
"id": "524ddb1c-4aef-4170-adb8-9adf4dd07bba"
}
],
"Height": [
{
"prob": 0.97608,
"name": "low shoes",
"id": "99dfe0ed-9f04-482e-b3d6-3d13f77635a8"
}
],
"Heel shape": [
{
"prob": 0.74825,
"name": "flatform",
"id": "cb385bb3-94d4-435f-a994-01b415e5e0c7"
}
],
"Heel height": [
{
"prob": 0.63406,
"name": "middle",
"id": "c97ff610-d2fc-4907-83f8-0ce1d3d1a80d"
}
],
"Top Category": [
{
"id": "1e3653aa-ce56-4341-ae88-8984d14963e8",
"name": "Footwear",
"prob": 1.0
}
]
},
"_tags_map": {
"Top Category": "Footwear",
"Category": "Footwear/Sneakers",
"Color": "multicolor",
"Gender": "women",
"Material": "textile shoes",
"Style": "casual",
"Height": "low shoes",
"Heel shape": "flatform",
"Heel height": "middle"
},
"_tags_simple": [
"multicolor",
"flatform",
"textile shoes",
"low shoes",
"Footwear/Sneakers",
"women",
"Footwear",
"casual",
"middle"
],
"Category": "Footwear/Sneakers"
}
]
}
],
"version": "2021-06-11 10:57:41.777300+00:00",
"status": {
"code": 200,
"text": "OK",
"request_id": "f9aaa4e4-740e-4668-b481-5f968d196a0d",
"proc_id": "b98fa409-37b3-4eab-ac56-e01bea3f2fbf"
},
"statistics": {
"processing time": 1.6112260818481445
}
}
Feedback endpoint: /v2/feedback
https://api.ximilar.com/tagging/fashion/v2/feedback
If you get some result from prediction endpoints (detect, detect_tags, tags, ...) and you see some mistakes in assigned tags, feel free to send us an image via this endpoint. Please include in message field textual description what was wrong with analyzed result.
Parameters:
- must contain either of
url
orbase64
with url path of image or base64 data of image message
as textual description of what was wrongly analyzed
curl --request POST \
--url https://api.ximilar.com/tagging/fashion/v2/feedback \
--header 'Authorization: Token __API_TOKEN__' \
--header 'Content-Type: application/json' \
--data '{
"message": "__THE_MESSAGE__",
"base64": "__BASE64_IMAGE__"
}'
Returns:
- HTTP error code 200, 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
- with message
CLICK TO SHOW JSON RESULT
{
"status": "Your feedback has been submitted. Thank you!"
}
Region identification /v2/region
https://api.ximilar.com/tagging/fashion/v2/region
Given a list of image records, this method returns region for images. Right now it identifies indian
or generic
for apparel. This method can be used as the first step before calling /v2/detect_tags
with regions
param.
Parameters:
records
: list of photos to predict the tags for- must contain either of
_url
or_base64
field - see section image data for details
- must contain either of
$ curl https://api.ximilar.com/tagging/fashion/v2/region -H "Content-Type: application/json" -H "Authorization: Token __API_TOKEN__" -d '{
"records": [
{ "_url": "__IMG_URL__" }
]
}'
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 "_objects". If no objects are detected then this is empty list.
CLICK TO SHOW JSON RESULT
{
"records": [
{
"_url": "__IMG_URL__",
"_status": {
"code": 200,
"text": "OK",
"request_id": "54ecf161-691d-4aed-8971-7a48b59e09c2"
},
"_id": "0bc4a76c-5cb0-476e-8a37-7f7ad45312d7",
"_width": 800,
"_height": 1100,
"region": [
{
"prob": 0.99968,
"name": "indian",
"id": "651367ac-4124-42ef-982f-fcb2de7dc090"
},
{
"prob": 0.00032,
"name": "generic",
"id": "f4768aab-3241-4c6c-94b2-171e8179de02"
}
]
}
],
"status": {
"code": 200,
"text": "OK",
"request_id": "54ecf161-691d-4aed-8971-7a48b59e09c2",
"proc_id": "c7c344f7-a330-4469-bf72-7c1ac847133f"
},
"statistics": {
"processing time": 1.7442286014556885
}
}