diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..576b126 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,27 @@ +# Installation + +## 1. Create A Conda Environment +```shell +conda create -n catvton python==3.9.0 +conda activate catvton +``` + +## 2. Install Requirments +```shell +cd CatVTON-main # or your path to CatVTON project dir +pip install -r requirements.txt +``` +**For inference only, the above packages are enough**. + +## 3. Detectron2 & DensePose +If you want to deploy the gradio app with automatic mask generation, you need to install **Detectron2 & DensePose** by following commands: +```shell +# Detectron2 +git clone https://github.com/facebookresearch/detectron2.git +python -m pip install -e detectron2 +# DensePose +pip install git+https://github.com/facebookresearch/detectron2@main#subdirectory=projects/DensePose +``` +When installing, ensure that the runtime CUDA version for PyTorch aligns with the CUDA version of your system; otherwise, errors may occur. + +If there is a misalignment, the solution is to reinstall PyTorch with a CUDA version that matches your system's version. For more information on installing PyTorch with the correct CUDA version, you can visit the [PyTorch Get Started page for previous versions](https://pytorch.org/get-started/previous-versions/). \ No newline at end of file diff --git a/README.md b/README.md index e3a3b76..be00033 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,11 @@ - **`2024/7/21`**: Our [**Inference Code**](https://github.com/Zheng-Chong/CatVTON/blob/main/inference.py) and [**Weights** 🤗](https://huggingface.co/zhengchong/CatVTON) are released. - **`2024/7/11`**: Our [**Online Demo**](http://120.76.142.206:8888) is released 😁. +## Installation +An [Installation Guide](https://github.com/Zheng-Chong/CatVTON/INSTALL.md) is provided to help build the conda environment for CatVTON. When deploying the app, you will need Detectron2 & DensePose, but these are not required for inference on datasets. Install the packages according to your needs. ## Deployment (Gradio App) + To deploy the Gradio App for CatVTON on your own mechine, just run the following command, and checkpoints will be automaticly download from HuggingFace. ```PowerShell diff --git a/requirements.txt b/requirements.txt index 62007c5..311d96a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,38 +1,18 @@ accelerate==0.31.0 -asposestorage==1.0.2 -caffe2==0.8.1 -cityscapesscripts==2.2.3 -cloudpickle==3.0.0 diffusers==0.29.2 -docutils==0.21.2 -fvcore==0.1.5.post20221221 -gradio==4.38.1 +gradio==4.39.0 huggingface_hub==0.23.4 -joblib==1.4.2 matplotlib==3.9.1 -mock==5.1.0 -numexpr==2.10.1 -numpy==2.0.1 -onnx==1.16.1 -opencv_contrib_python==4.10.0.84 +numpy==1.26.4 opencv_python==4.10.0.84 -opencv_python_headless==4.10.0.84 -Pillow==10.4.0 -psutil==6.0.0 -pycocotools==2.0.8 +pillow==10.3.0 PyYAML==6.0.1 -PyYAML==6.0.1 -recommonmark==0.7.1 -scipy==1.14.0 +scipy==1.13.1 setuptools==51.0.0 -Shapely==2.0.5 -skimage==0.0 -Sphinx==7.4.7 -sphinx_rtd_theme==2.0.0 -tabulate==0.9.0 -termcolor==2.4.0 +scikit-image==0.24.0 torch==2.1.2 torchvision==0.16.2 tqdm==4.66.4 transformers==4.27.3 xformers==0.0.23.post1 +Ninja==1.11.1.1