Training iPER dataset
October 24, 2019 · View on GitHub
1. Donwload the dataset
-
Download all files listed in OneDrive, including
iPER_256_video_release.zip,smpls.zip,train.txt, andval.txt. Saving them into one folder, such asroot_dir=/p300/data. -
Extract the
smpls.zipandiPER_256_video_release.zip. -
Convert the video file into frames by the script. Replace the path firstly,
dataset_video_root_path = '/p300/data/iPER_256_video_release' save_images_root_path = '/p300/data/images'then, run the script
python tools/unzip_iPER.zip -
Format the folder tree as follows:
|-- images | |-- 001 | |-- 002 | ....... | |-- 029 | `-- 030 |-- smpls | |-- 001 | |-- 002 | ....... | |-- 029 | `-- 030 |-- train.txt |-- val.txt `train.txt`: the splits of the training set. `val.txt`: the splits of the validation set. `images`: contains the images (frames) of each video. `smpls`: contains the smpls of each video.
2. Run the training script
-
Replace the
gpu_ids,data_dirandcheckpoints_dirin training script.#gpu_ids=0,1 # if using multi-gpus gpu_ids=1 # dataset configs data_dir=xxxxxxxx # the folder path that saves the iPER dataset (formated as above). dataset_model=iPER # use iPER dataset # saving configs checkpoints_dir=xxxxxxxxx # directory to save models, to be replaced!!!!! name=exp_iPER # the directory is ${checkpoints_dir}/name, which is used to save the checkpoints. -
Run the training script.
chmod a+x scripts/train_iPER.sh ./scripts/train_iPER.sh -
Tensorboard visualization
tensorboard --logdir=${checkpoints_dir}/exp_iPER --port=10086
Training iPER + Place2 dataset
While for the background, the background network is trained in a self-supervised way, which seems to overfit the background from the training set. One way to improve the ability of background generalization is to use additional images, such as Place2 dataset, as the auxiliary loss in the training phase. Specifically, in each training iteration, we sample mini-batch images from Place2 dataset, denoted as , add human body silhouettes to them, and denote the mask images as . We use the paired (, ) images with a perceptual loss to update parameters in the network. The loss indeed improves the generalization of background inpainting. It is worth noting that for a fair comparison, we do not use this trick in experiments when comparing our method with other baselines.
-
Download iPER and format the folder like above.
-
Download Place2 and extract the data.
-
Replace the
gpu_ids,data_dir,place_dir, andcheckpoints_dirin training script.#gpu_ids=0,1 # if using multi-gpus gpu_ids=1 # dataset configs data_dir=/p300/iccv/iPER_examples # need to be replaced!!!!! place_dir=/p300/iccv/places365_standard # need to be replaced!!!!! # saving configs checkpoints_dir=xxxxxxxxx # directory to save models, to be replaced!!!!! name=exp_iPER_place # the directory is ${checkpoints_dir}/name, which is used to save the checkpoints. -
Run the training script.
chmod a+x scripts/train_iPER_Place2.sh ./scripts/train_iPER_Place2.sh -
Tensorboard visualization
tensorboard --logdir=${checkpoints_dir}/exp_iPER_place --port=10086
Training on other datasets
TODO