-
Clone the Repository
git clone https://github.com/ariannaliu/metahuman-demo.git cd metahuman-demo
-
Download the models from Google Drive
# unzip the files, put the folders of models under ./checkpoints # remove the files generated by mac zip (optional) metahuman-demo | ---checkpoints | |---camera | | | ---cctv1 | | | ---cctv2 | ---human | ---ip-adapter-faceid_sdxl.bin
-
Clone the Repository
git clone https://github.com/ariannaliu/metahuman-demo.git cd metahuman-demo # Download the model mention in the preparation part
-
Create a Conda Environment
Create a new conda environment and install the required packages:
conda create -n metahuman python=3.10 conda activate metahuman pip install accelerate transformers safetensors diffusers datasets numpy scipy
Navigate to the src
directory and run the inference script with a prompt:
cd src
python3 inference.py --prompt "a photo of camera PE204 in pink color"
The prompt must contain one of the following cameras:
Camera Models |
---|
PE204 |
Tapo C225 |
TSC-433P |
CCTV-TC70 |
CCTV-RS PRO 146-4648 |
CCTV-TVCC40011 |
CCTV-TFT-22053D1H |
CCTV-PNM-9000VD |
CCTV-ASRIH686-025-22 |
CCTV-PNM-9320VQP |
CCTV-PNM-9000VQ |
CCTV-DS-2CE56C0T-IRMMF |
CCTV-CD75-310-6527 |
ADT CCTV |
PTZ q6125le |
PTZ-B51N_800 |
PTZ-TC-A3555 |
PTZ-HD20A |
Tapo C110 |
This project generates images of metahumans wearing safety equipment based on a given input image and text prompt.
-
Clone the Repository
git clone https://github.com/ariannaliu/metahuman-demo.git cd metahuman-demo # Download the model mention in the preparation part
-
Create a Conda Environment
conda create -n ip python=3.10 conda activate ip
-
Install Required Packages
pip install diffusers==0.22.1 accelerate transformers safetensors datasets numpy scipy insightface pip install git+https://github.com/tencent-ailab/IP-Adapter.git pip install onnxruntime einops
To generate an image of a metahuman wearing safety equipment, run the following command:
cd src_human
python3 demo.py --image_path "1.png" --prompt "a man wearing yellow working uniform"
--image_path
: Path to the input image.--prompt
: Text prompt describing the desired output.