Skip to content

luoxuan-cs/PAMA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PAMA

​ This is the Pytorch implementation of Progressive Attentional Manifold Alignment.

​ 1/14/2022 Thanks to github user AK391 for making a web demo for PAMA.

​ 1/18/2022 New checkpoints are available. (w/o color loss, 1.5x color loss weight, 1.5x content loss weight)

​ 11/15/2022 Our paper is accepted by ACCV 2022. We also updated our code, here is the new version of PAMA: https://drive.google.com/drive/folders/1At5XYHW153Pe8A1TgmAbOfwTv3fH7YK1?usp=share_link

Requirements

  • python 3.6
  • pytorch 1.2.0+
  • PIL, numpy, matplotlib

Checkpoints

Please download the pre-trained checkpoints at google drive and put them in ./checkpoints.

Here we also provide some other pre-trained results with different loss weights:

Type Loss Download
high consistency w/o color loss PAMA_without_color.zip
high color 1.5x color loss weight PAMA_1.5x_color.zip
high content 1.5x content loss weight PAMA_1.5x_content.zip

The checkpionts will be uploaded recently.

Training

The training set consists of two parts, the content images from COCO2014 and style images from Wikiart.

python main.py train --lr 1e-4 --content_folder ./COCO2014 --style_folder ./Wikiart

Testing

To test the code, you need to specify the path of the content image and the style image.

python main.py eval --content ./content/1.jpg --style ./style/1.jpg

If you want to do a batch operation for all pictures under the folder at one time, please execute the following code.

python main.py eval --run_folder True --content ./content/ --style ./style/

Results Presentation

​ The results prove the quality of PAMA from three dimensions: Regional Consistency, Content Proservation, Style Quality.

Regional Consistency

39-13-content

8-35-content

Content preservation

18-4-content

27-8-consistency

Style Quality

4-29-style

13-32-style

Other Results

other

About

An arbitrary style transfer algorithm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages