vton-002 / README.md
noumanjavaid's picture
Update README.md
dfd7185 verified
---
license: apache-2.0
title: VTON DEMO
sdk: streamlit
colorFrom: blue
colorTo: blue
pinned: true
short_description: Virtual TryON Demo
sdk_version: 1.42.2
---
# Virtual Try-On Application
This application uses the IDM-VTON model via Replicate API to perform virtual try-on of garments on human images.
## Requirements
- Python 3.6+
- `replicate` Python package
## Installation
1. Install the required package:
```bash
pip install replicate
```
2. Set up your Replicate API token as an environment variable:
```bash
export REPLICATE_API_TOKEN='your_token_here'
```
You can get your API token from [Replicate](https://replicate.com/account/api-tokens) after creating an account.
## Usage
Run the script with:
```bash
python vton.py
```
By default, the script uses example images. To use your own images, modify the `garm_img`, `human_img`, and `garment_des` variables in the script.
### Function Usage
You can also import the function in your own Python code:
```python
from vton import virtual_try_on
output_path = virtual_try_on(
garm_img_url="URL_TO_GARMENT_IMAGE",
human_img_url="URL_TO_HUMAN_IMAGE",
garment_des="Description of the garment"
)
```
## Output
The script will save the generated try-on image as `output.jpg` in the current directory.
## Model Information
This application uses the IDM-VTON model created by cuuupid on Replicate. The model performs virtual try-on by overlaying garments onto human images based on the provided description.