Skip to content

The official PyTorch Impl of "Deep Flexible Structure Preserving Image Smoothing"

License

Notifications You must be signed in to change notification settings

lime-j/DeepFSPIS

Repository files navigation

DeepFSPIS

This repository contains the official implementation of "Deep Flexible Structure Preserving Image Smoothing" [ACM DL][self-hosted], which appeared in ACM Multimedia 2022.

teasor

Demo is avaliable at here!

Code

The released checkpoints are trained with BSDS500 Train-set and the first 10000 image (in the ascending alphabetical order of their filename) from MS-COCO.

Dependencies

pytorch >= 1.6
torchvision
numpy

Component Drop

The code of our heuristic component drop can be found here.

Please install component drop first.

Training

First, download pre-computed edge maps from link and train adjuster as follows:

python train_adjuster.py --train_dir=<COCO training image dir> --edge_dir=<COCO_edge> --workdir=./train_adjuster

Then train smoother as follows :

python train_smoother.py --train_dataset_path=<COCO train image dir> --val_dataset_path=<COCO val image dir> --workdir=./train_smoother

Inference

Inference is quite simple, as the example below.

python batch_inference.py              \
       --save_dir=./result             \
       --batch_size=1                  \
       --checkpoints_dir=./checkpoints \
       --image_dir=./test_image        \
       --lamb=0.6,0.5,0.4  

You can also use our online demo at here

Results

The results on BSDS500 test/val sets can be found here.

About

The official PyTorch Impl of "Deep Flexible Structure Preserving Image Smoothing"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages