{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/encoding-in-style-a-stylegan-encoder-for","title":"Encoding in Style: a StyleGAN Encoder for Image-to-Image Translation","arxiv_id":"2008.00951","date":"2020-08-03","proceeding":"CVPR 2021 1","authors":["Elad Richardson","Yuval Alaluf","Or Patashnik","Yotam Nitzan","Yaniv Azar","Stav Shapiro","Daniel Cohen-Or"],"abstract":"We present a generic image-to-image translation framework, pixel2style2pixel (pSp). Our pSp framework is based on a novel encoder network that directly generates a series of style vectors which are fed into a pretrained StyleGAN generator, forming the extended W+ latent space. We first show that our encoder can directly embed real images into W+, with no additional optimization. Next, we propose utilizing our encoder to directly solve image-to-image translation tasks, defining them as encoding problems from some input domain into the latent domain. By deviating from the standard invert first, edit later methodology used with previous StyleGAN encoders, our approach can handle a variety of tasks even when the input image is not represented in the StyleGAN domain. We show that solving translation tasks through StyleGAN significantly simplifies the training process, as no adversary is required, has better support for solving tasks without pixel-to-pixel correspondence, and inherently supports multi-modal synthesis via the resampling of styles. Finally, we demonstrate the potential of our framework on a variety of facial image-to-image translation tasks, even when compared to state-of-the-art solutions designed specifically for a single task, and further show that it can be extended beyond the human facial domain.","url_abs":"https://arxiv.org/abs/2008.00951v2","url_pdf":"https://arxiv.org/pdf/2008.00951v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"encoding-in-style-a-stylegan-encoder-for","repo_url":"https://github.com/eladrich/pixel2style2pixel","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"encoding-in-style-a-stylegan-encoder-for","repo_url":"https://github.com/InterDigitalInc/Latent-Transformer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"encoding-in-style-a-stylegan-encoder-for","repo_url":"https://github.com/adldotori/pSp","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"encoding-in-style-a-stylegan-encoder-for","repo_url":"https://github.com/hcholab/k-salsa","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"encoding-in-style-a-stylegan-encoder-for","repo_url":"https://github.com/interdigitalinc/featurestyleencoder","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"encoding-in-style-a-stylegan-encoder-for","repo_url":"https://github.com/liuliuliu11/pixel2style2pixel-liu","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"encoding-in-style-a-stylegan-encoder-for","repo_url":"https://github.com/mikelasz/fair-psp","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"encoding-in-style-a-stylegan-encoder-for","repo_url":"https://github.com/rahuls02/Image-Noise-Reduction","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"encoding-in-style-a-stylegan-encoder-for","repo_url":"https://github.com/yuval-alaluf/restyle-encoder","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"encoding-in-style-a-stylegan-encoder-for","repo_url":"https://github.com/771979972/Paddle_pSp","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"paddle","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"conditional-image-generation","task_name":"Conditional Image Generation"},{"task_slug":"face-generation","task_name":"Face Generation"},{"task_slug":"image-to-image-translation","task_name":"Image-to-Image Translation"},{"task_slug":"translation","task_name":"Translation"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"adaptive-instance-normalization","method_name":"Adaptive Instance Normalization"},{"method_slug":"average-pooling","method_name":"Average Pooling"},{"method_slug":"batch-normalization","method_name":"Batch Normalization"},{"method_slug":"bottleneck-residual-block","method_name":"Bottleneck Residual Block"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"feedforward-network","method_name":"Feedforward Network"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"kaiming-initialization","method_name":"Kaiming Initialization"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"r1-regularization","method_name":"R1 Regularization"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"residual-block","method_name":"Residual Block"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"stylegan","method_name":"StyleGAN"},{"method_slug":"pixel2style2pixel","method_name":"pixel2style2pixel"}],"datasets_introduced":[],"methods_introduced":[{"slug":"pixel2style2pixel","name":"pixel2style2pixel","full_name":"pixel2style2pixel"}],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2008.00951","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2008.00951"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/eladrich/pixel2style2pixel","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hcholab/k-salsa","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mikelasz/fair-psp","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yuval-alaluf/restyle-encoder","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/771979972/Paddle_pSp","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/interdigitalinc/featurestyleencoder","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/adldotori/pSp","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/InterDigitalInc/Latent-Transformer","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/rahuls02/Image-Noise-Reduction","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/liuliuliu11/pixel2style2pixel-liu","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":3,"ran":2,"ran_honours":1,"unverified":10},"by_repo_kind":{"listed":{"samples":15,"ran":5,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":1,"samples":[{"code_sha256_prefix":"dbb756dcd778f52f","entry":"data_sampler","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"dbb756dcd778f52f"}},{"code_sha256_prefix":"b7f364dbce963974","entry":"get_affine_transform_matrix","repo":"771979972/Paddle_pSp","repo_kind":"listed","path":"models/mtcnn/mtcnn_paddle/src/align_trans.py","file_url":"https://github.com/771979972/Paddle_pSp/blob/HEAD/models/mtcnn/mtcnn_paddle/src/align_trans.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b7f364dbce963974"}},{"code_sha256_prefix":"ad5dbf57f3ea2633","entry":"get_block","repo":"rahuls02/Image-Noise-Reduction","repo_kind":"listed","path":"models/encoders/helpers.py","file_url":"https://github.com/rahuls02/Image-Noise-Reduction/blob/HEAD/models/encoders/helpers.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ad5dbf57f3ea2633"}},{"code_sha256_prefix":"29b9a890f149a3a6","entry":"get_keys","repo":"rahuls02/Image-Noise-Reduction","repo_kind":"listed","path":"models/psp.py","file_url":"https://github.com/rahuls02/Image-Noise-Reduction/blob/HEAD/models/psp.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"29b9a890f149a3a6"}},{"code_sha256_prefix":"c54fea429589425d","entry":"l2_norm","repo":"rahuls02/Image-Noise-Reduction","repo_kind":"listed","path":"models/encoders/helpers.py","file_url":"https://github.com/rahuls02/Image-Noise-Reduction/blob/HEAD/models/encoders/helpers.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c54fea429589425d"}},{"code_sha256_prefix":"b4e2f92e3ce5abc6","entry":"tformfwd","repo":"771979972/Paddle_pSp","repo_kind":"listed","path":"models/mtcnn/mtcnn_paddle/src/matlab_cp2tform.py","file_url":"https://github.com/771979972/Paddle_pSp/blob/HEAD/models/mtcnn/mtcnn_paddle/src/matlab_cp2tform.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b4e2f92e3ce5abc6"}},{"code_sha256_prefix":"6b0e6100d2ca104e","entry":"calibrate_box","repo":"771979972/Paddle_pSp","repo_kind":"listed","path":"models/mtcnn/mtcnn_paddle/src/box_utils.py","file_url":"https://github.com/771979972/Paddle_pSp/blob/HEAD/models/mtcnn/mtcnn_paddle/src/box_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6b0e6100d2ca104e"}},{"code_sha256_prefix":"c4e1ca09fcca76fc","entry":"convert_to_square","repo":"771979972/Paddle_pSp","repo_kind":"listed","path":"models/mtcnn/mtcnn_paddle/src/box_utils.py","file_url":"https://github.com/771979972/Paddle_pSp/blob/HEAD/models/mtcnn/mtcnn_paddle/src/box_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c4e1ca09fcca76fc"}},{"code_sha256_prefix":"994b933b974c2110","entry":"findNonreflectiveSimilarity","repo":"771979972/Paddle_pSp","repo_kind":"listed","path":"models/mtcnn/mtcnn_paddle/src/matlab_cp2tform.py","file_url":"https://github.com/771979972/Paddle_pSp/blob/HEAD/models/mtcnn/mtcnn_paddle/src/matlab_cp2tform.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"994b933b974c2110"}},{"code_sha256_prefix":"1a9c4f8ff0843e6a","entry":"get_blocks","repo":"rahuls02/Image-Noise-Reduction","repo_kind":"listed","path":"models/encoders/helpers.py","file_url":"https://github.com/rahuls02/Image-Noise-Reduction/blob/HEAD/models/encoders/helpers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1a9c4f8ff0843e6a"}},{"code_sha256_prefix":"dcaaadc325192fde","entry":"get_keys","repo":"771979972/Paddle_pSp","repo_kind":"listed","path":"models/psp.py","file_url":"https://github.com/771979972/Paddle_pSp/blob/HEAD/models/psp.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"dcaaadc325192fde"}},{"code_sha256_prefix":"a88ec2b4b2ac122c","entry":"get_reference_facial_points","repo":"771979972/Paddle_pSp","repo_kind":"listed","path":"models/mtcnn/mtcnn_paddle/src/align_trans.py","file_url":"https://github.com/771979972/Paddle_pSp/blob/HEAD/models/mtcnn/mtcnn_paddle/src/align_trans.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a88ec2b4b2ac122c"}},{"code_sha256_prefix":"166f27e7c172ead7","entry":"get_white_noise_image","repo":"rahuls02/Image-Noise-Reduction","repo_kind":"listed","path":"datasets/images_dataset.py","file_url":"https://github.com/rahuls02/Image-Noise-Reduction/blob/HEAD/datasets/images_dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"166f27e7c172ead7"}},{"code_sha256_prefix":"522ee6c31c17d845","entry":"nms","repo":"771979972/Paddle_pSp","repo_kind":"listed","path":"models/mtcnn/mtcnn_paddle/src/box_utils.py","file_url":"https://github.com/771979972/Paddle_pSp/blob/HEAD/models/mtcnn/mtcnn_paddle/src/box_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"522ee6c31c17d845"}},{"code_sha256_prefix":"1a075d92bb280328","entry":"show_bboxes","repo":"771979972/Paddle_pSp","repo_kind":"listed","path":"models/mtcnn/mtcnn_paddle/src/visualization_utils.py","file_url":"https://github.com/771979972/Paddle_pSp/blob/HEAD/models/mtcnn/mtcnn_paddle/src/visualization_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1a075d92bb280328"}},{"code_sha256_prefix":"6661cdf22fccc11e","entry":"tforminv","repo":"771979972/Paddle_pSp","repo_kind":"listed","path":"models/mtcnn/mtcnn_paddle/src/matlab_cp2tform.py","file_url":"https://github.com/771979972/Paddle_pSp/blob/HEAD/models/mtcnn/mtcnn_paddle/src/matlab_cp2tform.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6661cdf22fccc11e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}