Skip to content

RobertSamoilescu/Inpaint-PConv-UPB

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inpaint PConv - UPB

sample 0

sample 1

sample 2

sample 3

=======

Pre-requisite

mkdir -p snapshots/ckpt/
cd snapshots/ckpt/

Download a pre-trained module on nuScenes from here.

mkdir -p pipeline/models/monodepth
cd pipeline/models/monodepth

Download monodepth pre-treained module from here.

Create dataset

mkdir raw_dataset
  • Download the UBP dataset into the "raw_dataset" directory. A sample of the UPB dataset is available here. Those video are 3FPS. Consider downloding the original dataset and downsample to 10FPS.
mkdir scene_splits
  • Download the scene splits into the "scene_splits" directory. The train-validation split is available here. In the "scene_splits" directory you should have: "train_scenes.txt" and "test_scenes.txt".

  • Create images, masks, depth maps

python3 scripts/dataset_constructor.py \
	--src_folder raw_dataset \
	--dst_folder dataset \
  • Split dataset
python3 scripts/split_dataset.py

Train model

python3 train.py \
	--resume snapshots/ckpt/1000000.pth \
	--max_iter 1500000 \
	--lr 2e-5

Freez layers

python3 train.py \
	--finetune \
	--max_iter 2000000 \
	--resume snapshots/ckpt/1500000.pth \
	--lr_finetune 5e-6

Test model

Compute L1, PSNR, SSIM

python3 scores.py --model 2000000.pth

View inpainting results

python3 scripts/test_model.py --model 2000000.pth

Pre-trained model on UPB

A pretrained model is available here.

About

Unofficial pytorch implementation of 'Image Inpainting for Irregular Holes Using Partial Convolutions' [Liu+, ECCV2018]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 68.6%
  • Python 31.4%