Virtual TryOn

Introduction

Virtual Try-On allows for the quick creation of images displaying clothing on models, using just flat garment photos. This innovative solution can replace the need for real model photoshoots, significantly reducing associated costs while effectively enhancing the visual presentation of apparel products.

Use Cases

  1. Quickly Generate High-Quality Model Images to Efficiently Launch New Products

Merchants can upload flat garment photos and select the desired model and pose to quickly generate high-quality images of clothing on models. This reduces product launch cycles and photography costs.

  1. Batch Optimize Existing Product Images to Enhance Visual Appeal and Store Attractiveness

For existing products, an API can be used to quickly generate large quantities of model images, replacing the original product images. This lifelike representation of the clothing improves click-through rates and conversion rates.

  1. Personalize Model Images Based on Regional and User Style Preferences to Increase Purchase Intent.

By leveraging regional and preference survey results, users can select different styles of models and scenes to generate personalized model images. This meets diverse user needs and enhances purchase intent.

Key Features

1. Product Advantages

  • Intelligent Apparel Recognition and Extraction: Supports input images with complex backgrounds from e-commerce scenarios, accurately and automatically extracting the clothing items to be displayed on models.

Original ImageSegmentation Result
  • High-Fidelity and high resolution Apparel Rendering: Utilizes advanced algorithms to generate high resolution (2048*1536) images of clothing on models with texture and detail same to that of real-life photography, ensuring a high degree of fidelity to the actual garment. Supports adaptive cropping based on the user's uploaded proportions.

Garment ImageTry-On Result
  • Extensive Model Library: Offers massive model images featuring diverse faces, skin tones, and poses. Additionally, supports personalized model customization.

Integration Methods

Method TypeSupported FeaturesApplicable ScenariosAdvantagesLimitations

General API

1. Selects suitable models from the general model library based on request parameters such as gender, ethnicity, background, style, and pose.

1. No requirement for unique models.

2. Requires easy integration.

3. Requires rapid batch generation.

1. Simpler integration compared to the editor.

1. High repetition of model faces.

Customized API

1. Generates customized models based on business requirements, including gender, faces, ethnicity, background, and poses, and uses an exclusive model library for virtual try-on.

1. Requires unique models.

2. Requires easy integration.

3. Requires rapid batch generation.

1. Customizable based on business needs compared to the general API.

1. Involves costs for customized models and API configuration.

Editor Integration

1. Provides a user-side interactive interface.

2. Users can select models and corresponding poses in the editor for virtual try-on.

3. Supports AI-generated virtual models for virtual try-on.

1. Requires easy user interaction.

2. Requires customization for each garment.

1. Easier to use for end-users.

2. More intuitive and flexible model selection.

1. Higher development costs compared to API integration.

2. Cannot support rapid batch generation.

Pricing

To use the API, you are required to choose and purchase an API resource pack from us on a subscription basis.

  • Each resource pack is valid for one calendar year upon successful purchase, and enables you to access the API up to the number of requests specified in the pack. No refunds can be provided.

  • If you need to purchase more QPS due to business requirements, please contact us via navigation bar or email us (aidge_support@service.alibaba.com).

  • Resource packs cannot be used across different products. For example, if you need to use both product text translation and image translation, you must purchase separate resource packs for each.

The prices are as follows:

CapacityPrice (USD)Unit Price(USD)Maximum QPS

100 images

8

$0.08 /image

1

1,000 images

80

$0.08 /image

1

10,000 images

800

$0.08 /image

1

Quick Start

1. API Integration Process Description

This interface is asynchronous.

Step 1: Call the "Virtual Try-On" API. Input the garment image, garment category, model gender, and other relevant information to initiate the request (additional model-related parameters will be available in future updates) and obtain a task ID.

Step 2: Call the "Virtual Try-On Query" API. Pass in the task ID to get the generated result for the corresponding garment.

Please refer to the API reference for detailed request and response examples.

2. Sample request

Currently, only virtual try-on generation for single items such as short outerwears, tops, and dresses is accepted. More categories of clothing will be gradually added, and integration with the editor will also be supported soon. Call this API and input the URL of the garment image and the garment type. The request example is as follows:

IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("/ai/virtual/tryon");
request.addApiParameter("requestParams", "[{\"gender\":\"female\",\"clothesList\":[{\"imageUrl\":\"https://ai-business-algo-pai.oss-ap-southeast-1.aliyuncs.com/pengxin.zpx/8683046691566_200.jpg?OSSAccessKeyId\\u003dLTAI5tAGoBnm5eYsnZ5E1zMr\\u0026Expires\\u003d360001710758584\\u0026Signature\\u003dEfIJzSJXuS1OJTe4KLz2S7eXhBs\\u003d\",\"type\":\"tops\"},{\"imageUrl\":\"https://ai-business-algo-pai.oss-ap-southeast-1.aliyuncs.com/pengxin.zpx/8683046691566_200.jpg?OSSAccessKeyId\\u003dLTAI5tAGoBnm5eYsnZ5E1zMr\\u0026Expires\\u003d360001710758584\\u0026Signature\\u003dEfIJzSJXuS1OJTe4KLz2S7eXhBs\\u003d\",\"type\":\"tops\"}]}]");
IopResponse response = client.execute(request);
System.out.println(response.getBody());
Thread.sleep(10);

3. Sample Response

{
  "data": {
    "result": {
      "taskId": "440ce248-de8a-4c2f-8eb3-ff0d7d853404"
    },
    "usage": 0,
    "class": "com.aidc.service.api.client.gateway.dto.PlatformGatewayResponse"
  },
  "requestId": "2141111917193841159118257e17b1",
  "success": true,
  "resCode": 200,
  "resMessage": "success",
  "code": "0",
  "request_id": "212a714317193841159121686",
  "_trace_id_": "2141111917193841159118257e17b1"
}

FAQ

  1. What's the requirements for garment images?

Based on our tests, the model achieves the best try-on effect with flat-laid images on a white background. Therefore, please ensure the images meet the following criteria:

  1. The image should contain only one garment.

  2. The garment should be complete and intact.

  3. No text or patterns should obscure the garment.

  4. No human body should be present in the image.

We will select the garment body to be worn based on the model.

RecommendedNot Recommended
  1. I have various garment images, but I can't determine which ones meet the quality requirements for virtual try-on. What should I do?

Don't worry. We can provide the pre garment image detect ability to help you find the garments images needed for virtual try-on and reduce invalid calls.

  1. How to choose the model images for virtual try-on to improve the generation effect?

To achieve a better result, you can enhance the try-on effect by using a front-facing or <45-degree side-facing model image, dressed in clothes with similar characteristics (such as sleeve length and garment length) to the apparel being virtually tried on.

Last updated