Fashion API

The Coqnitics Fashion API can be integrated easily into your system, a json format result will be returned. The details and sample response of the API are as below.

Check out the online demo: https://recoqnitics.com/demo/fashion-api

Overview

Fashion API can be integrated into the system to analyze the fashion sense (color, style, and type) of the person in an image. Bounding box coordinates of the detected person, color and style of the outfit, and the bounding box coordinates of the garments worn by the detected person will be returned. If image consists of multiple persons, only the largest person will be analyzed.

Request Method

POST

Return Values

Key Description
person A key-value pair consisting of the analyzed person (largest person detected in the picture) with his/her position (bounding boxes) and fashion sense (color, style, garments) as described below.
boundingBox The rectangular box posiiton of the analyzed person. The returned variables are the (x,y) coordinates of the left corner and the (width, height) of the box.
colors The top colors of the garments worn by the analyzed person. Colors are returned in exact hex code with the nearest color name and color category based on the Hollasch categorization. Only colors (up to max of five) with distribution ratio higher than 0.15 are returned.
styles The top-3 styles of the analyzed person based on his/her garments. All the available styles are listed in the Style section.
garments The garments worn by the analyzed person. The type (our model supports 29 types of garments), bounding box and confidence score of each detected garment are returned.

Style

Style Name Description
Casual A style that embodies streetwear with fashion. These are clothes that won’t cause a stir for trendsetters but are ideal for everyday trips where durability and fit are key.
Bohemian A style popularized during 1960s and 1970s, also known as Boho Chic. The essence of the style focuses on free and flowy fabrics with exotic patterns, where scarves, vests, and skirts are often worn on top of each other.
Business Your formal business outfit, typically shirts and slacks/skirts. Occassionally topped with suit and ties to sharpen your appeal.
Elegant As fashion icon Coco Chanel once said, “elegance is refusal”. An elegant piece skips the big jewelry and flashy clothes in favor of simple styles made from luxurious fabrics that one could wear forever.
Romantic A romantic style brings out the feminine and youthful side of women while not losing their glamor. The style is characterized by soft, flowing fabrics, ruffles, lace and often a bit of blings.
Vintage The Retro style imitating that of the previous era. Vintage clothings usually refer to those made before 1990s.
Eclectic A fashion sense that draws out the essence of contrasting styles, putting together fashion pieces that usually wouldn’t go together.
Rocker A style commonly associated to rock fans, where one dons decorated motorcycle jackets, often adorned with metals studs and badges. A rocker outfit is not complete without ripped denim, vintage tees and leather jacket.
Sexy Sexy, exotic, revealing, and everything in between.
Denim A classic style that puts your favorite blues to work. Seriously, what can go wrong with jeans and denim jacket?
Outdoor A rugged, multi-purpose look suitable for all kind of outdoor activities and adventures. Sweatpants, tanks, cardigans and maybe even a cowboy hat?
90s Fashion sense at the 90’s was known to be rebellious, as compared to their more glamorous predecessors. Flared jeans, crop tops, corsets, gothic dresses, You name it.

Sample Response

The JSON response when the request is successful:

{
  "person": {
      "boundingBox": {
          "x": 2,
          "y": 5,
          "w": 161,
          "h": 499
      },
      "colors": [
          {
              "hex": "#898e8b",
              "colorName": "cold_grey",
              "colorGeneralCategory": "Grey",
              "ratio": 0.20588235294117646
          },
          {
              "hex": "#742e21",
              "colorName": "brown",
              "colorGeneralCategory": "Brown",
              "ratio": 0.16176470588235295
          },
          {
              "hex": "#626a68",
              "colorName": "dim_grey",
              "colorGeneralCategory": "Grey",
              "ratio": 0.29411764705882354
          },
          {
              "hex": "#312b26",
              "colorName": "ivory_black",
              "colorGeneralCategory": "Black",
              "ratio": 0.20588235294117646
          }
      ],
      "styles": [
          {
              "styleName": "Bohemian",
              "confidence": 0.7196930198847986
          },
          {
              "styleName": "Outdoor",
              "confidence": 0.1495919478232279
          },
          {
              "styleName": "Denim",
              "confidence": 0.06744781427341613
          }
      ],
      "garments": [
          {
              "typeName": "Tee",
              "boundingBox": {
                  "x": 6,
                  "y": 77,
                  "w": 157,
                  "h": 332
              },
              "confidence": 0.5391368865966797
          }
      ]
  }
}