⚠️ The following tools are optional or will be installed later in the guide:
git clone https://csprojects.nottingham.edu.cn/grp-team07-gitlab/grp-team07-gitlab-work.git
cd grp-team07-gitlab-work
conda create -n OVDR python=3.10 -y
conda activate OVDR
pip install -r requirements.txt
conda create -n StableViton python=3.10 -y
conda activate StableVITON
pip install -r requirements.txt
conda activate StableVITON
cd backend
mkdir models
cd models
# Install Triton (for Windows)
git clone https://github.com/PrashantSaikia/Triton-for-Windows
cd Triton-for-Windows
pip install triton-2.0.0-cp310-cp310-win_amd64.whl
cd ..
# Download clip-vit-large-patch14
git clone https://huggingface.co/openai/clip-vit-large-patch14
# Download StableVITON (ensure Git LFS is installed)
git lfs install
git clone https://huggingface.co/spaces/rlawjdghek/StableVITON
# Download StavleVITON models
go to https://huggingface.co/spaces/rlawjdghek/StableVITON/tree/main
to download the checkpoints dir alone
https://huggingface.co/spaces/rlawjdghek/StableVITON/tree/main
download the checkpoints dir alone
To install detectron2
and DensePose
on Windows, make sure Visual Studio Build Tools are installed:
detectron2
and DensePose
:💡 Important: Use x64 Native Tools Command Prompt for VS 2019, not regular cmd
or PowerShell
# Clone detectron2 repository
git clone https://github.com/facebookresearch/detectron2.git
# Activate your environment
conda activate StableViton
# Navigate to Detectron2 repo
cd your_store_project_path/backend/models/detectron2/
# Install detectron2
set DISTUTILS_USE_SDK=1 && pip install .
# Install DensePose
cd ./projects/DensePose
set DISTUTILS_USE_SDK=1 && pip install .
cd frontend
npm install
npm install concurrently wait-on --save-dev
CREATE DATABASE ovdr CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
mysql -u root -p ovdr < backend/database/ovdr_structure.sql
mysql -u root -p ovdr < backend/database/ovdr_data_only.sql
Edit your .env
file in ./backend
:
USER_NAME=root
PASSWORD=yourpassword
HOSTNAME=127.0.0.1
PORT=3306
DATABASE=ovdr
cd frontend
conda activate OVDR
npm run dev
If you encounter the error:
[0] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
[0] - options.allowedHosts[0] should be a non-empty string.
Solution: Please modify the /frontend/node_modules/react-scripts/config/webpackDevServer.config.js file and change the allowedHosts configuration on line 46 to:
allowedHosts: "all",
Try running the following command again:
pip install -r requirements.txt
If you see an error like:
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. torch==2.0.1+cu117 from https://download.pytorch.org/... Expected sha256 ... Got ...
Solution 1 – Manually download and install the correct PyTorch wheels:
cp310
for Python 3.10):
torch-2.0.1+cu117-cp310-cp310-win_amd64.whl
torchvision-0.15.2+cu117-cp310-cp310-win_amd64.whl
torchaudio-2.0.2-cp310-cp310-win_amd64.whl
pip install torch-*.whl torchvision-*.whl torchaudio-*.whl
The backend runs at http://localhost:5000
, and the frontend at http://localhost:3000
.