iPERDance / iPERCore

Liquid Warping GAN with Attention: A Unified Framework for Human Image Synthesis
https://iperdance.github.io/work/impersonator-plus-plus.html
Apache License 2.0
2.42k stars 311 forks source link

Which files to be delted when I want to re-run colab with different input images or video? #43

Open bigboss97 opened 3 years ago

bigboss97 commented 3 years ago

I noticed if I simply upload new images with the same video and re-run the "Run the xyz case" cell it doesn't seem to change anything. I tried to delete the vid_info.pkl and use a new model_id. It still doesn't seem to refresh every time. My questions: What to I have to delete if I replace: 1) source images or background image. 2) Reference video.

StevenLiuWen commented 3 years ago

Hi,@bigboss97, As this script for an instance,

python demo/motion_imitate.py --gpu_ids 0 \
   --image_size 512 \
   --num_source 2   \
   --output_dir "./results" \
   --assets_dir "./assets"  \
   --model_id   "donald_trump_2" \
   --src_path   "path?=./assets/samples/sources/donald_trump_2/00000.PNG,name?=donald_trump_2" \
   --ref_path   "path?=./assets/samples/references/akun_2.mp4,name?=akun_2,pose_fc?=300"

All results (final results and middle-level results) are saved in ./results.

--results: ----| models: ---------| donald_trump_2: (this is the model_id, and it contains the personalized model) -------------------| personalized.pth .....

----| primitives: ---------| akun_2:(this is the reference result, name?=akun_2) -------------------| processed: ----------------------------| vid_info.pkl: (this is the file contains middle-level results, such as the pose) ----------------------------| images: (cropped images) ----------------------------| orig_images: (original images)

---------| donald_trump_2:(this is the source result, name?=donald_trump_2) -------------------| processed: ----------------------------| vid_info.pkl: (this is the file contains middle-level results, such as the pose) ----------------------------| images: (cropped images) ----------------------------| orig_images: (original images) ----------------------------| parse: (segmentation masks) -------------------| synthesis: (this folder contains the final synthesized results)

  1. If you want to refresh everything, delete './results';
  2. If you want to refresh the source inputs, you need to delete './results/models/donald_trump_2' and './results/primitives/donald_trump_2';
  3. If you want to refresh the reference poses, you need to delete './results/primitives/akun_2' because, for reference videos, they do not have the personalized model.
bigboss97 commented 3 years ago

Thank you, that's very helpful. How do I delete a folder with its contents? Currently, I can only rename it instead.

ghost commented 3 years ago

Try executing this cell: !rm -r /content/iPERCore/results/