Image-to-Image
retir commited on
Commit
ebe0623
1 Parent(s): f66d8b8

add models and assets

Browse files
Files changed (41) hide show
  1. .gitattributes +26 -0
  2. README.md +26 -0
  3. assets/dicaprio.png +3 -0
  4. assets/graph.png +3 -0
  5. assets/images_preview.webp +3 -0
  6. assets/keanu.jpeg +3 -0
  7. assets/mask.jpg +3 -0
  8. assets/phase1.png +3 -0
  9. assets/phase2.png +3 -0
  10. assets/potter.jpg +3 -0
  11. assets/preview.webp +3 -0
  12. assets/preview_horizontal.webp +3 -0
  13. pretrained_models/79999_iter.pth +3 -0
  14. pretrained_models/CurricularFace_Backbone.pth +3 -0
  15. pretrained_models/e4e_ffhq_encode.pt +3 -0
  16. pretrained_models/face_parsing.farl.lapa.main_ema_136500_jit191.pt +3 -0
  17. pretrained_models/iresnet50-7f187506.pth +3 -0
  18. pretrained_models/mobilenet0.25_Final.pth +3 -0
  19. pretrained_models/moco_v2_800ep_pretrain.pt +3 -0
  20. pretrained_models/model_ir_se50.pth +3 -0
  21. pretrained_models/mtcnn/onet.npy +3 -0
  22. pretrained_models/mtcnn/pnet.npy +3 -0
  23. pretrained_models/mtcnn/rnet.npy +3 -0
  24. pretrained_models/sfe_editor.pt +3 -0
  25. pretrained_models/sfe_inverter.pt +3 -0
  26. pretrained_models/styleclip_mappers/afro.pt +3 -0
  27. pretrained_models/styleclip_mappers/angry.pt +3 -0
  28. pretrained_models/styleclip_mappers/beyonce.pt +3 -0
  29. pretrained_models/styleclip_mappers/bobcut.pt +3 -0
  30. pretrained_models/styleclip_mappers/bowlcut.pt +3 -0
  31. pretrained_models/styleclip_mappers/curly_hair.pt +3 -0
  32. pretrained_models/styleclip_mappers/depp.pt +3 -0
  33. pretrained_models/styleclip_mappers/hilary_clinton.pt +3 -0
  34. pretrained_models/styleclip_mappers/mohawk.pt +3 -0
  35. pretrained_models/styleclip_mappers/purple_hair.pt +3 -0
  36. pretrained_models/styleclip_mappers/surprised.pt +3 -0
  37. pretrained_models/styleclip_mappers/taylor_swift.pt +3 -0
  38. pretrained_models/styleclip_mappers/trump.pt +3 -0
  39. pretrained_models/styleclip_mappers/zuckerberg.pt +3 -0
  40. pretrained_models/stylegan2-ffhq-config-f.pkl +3 -0
  41. pretrained_models/stylegan2-ffhq-config-f.pt +3 -0
.gitattributes CHANGED
@@ -33,3 +33,29 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ assets/images_preview.webp filter=lfs diff=lfs merge=lfs -text
37
+ assets/keanu.jpeg filter=lfs diff=lfs merge=lfs -text
38
+ assets/potter.jpg filter=lfs diff=lfs merge=lfs -text
39
+ assets/preview_horizontal.webp filter=lfs diff=lfs merge=lfs -text
40
+ assets/dicaprio.png filter=lfs diff=lfs merge=lfs -text
41
+ assets/graph.png filter=lfs diff=lfs merge=lfs -text
42
+ assets/mask.jpg filter=lfs diff=lfs merge=lfs -text
43
+ assets/phase1.png filter=lfs diff=lfs merge=lfs -text
44
+ assets/phase2.png filter=lfs diff=lfs merge=lfs -text
45
+ assets/preview.webp filter=lfs diff=lfs merge=lfs -text
46
+ pretrained_models/moco_v2_800ep_pretrain.pt filter=lfs diff=lfs merge=lfs -text
47
+ pretrained_models/model_ir_se50.pth filter=lfs diff=lfs merge=lfs -text
48
+ pretrained_models/sfe_editor.pt filter=lfs diff=lfs merge=lfs -text
49
+ pretrained_models/79999_iter.pth filter=lfs diff=lfs merge=lfs -text
50
+ pretrained_models/face_parsing.farl.lapa.main_ema_136500_jit191.pt filter=lfs diff=lfs merge=lfs -text
51
+ pretrained_models/mobilenet0.25_Final.pth filter=lfs diff=lfs merge=lfs -text
52
+ pretrained_models/stylegan2-ffhq-config-f.pkl filter=lfs diff=lfs merge=lfs -text
53
+ pretrained_models/stylegan2-ffhq-config-f.pt filter=lfs diff=lfs merge=lfs -text
54
+ pretrained_models/CurricularFace_Backbone.pth filter=lfs diff=lfs merge=lfs -text
55
+ pretrained_models/e4e_ffhq_encode.pt filter=lfs diff=lfs merge=lfs -text
56
+ pretrained_models/iresnet50-7f187506.pth filter=lfs diff=lfs merge=lfs -text
57
+ pretrained_models/mtcnn filter=lfs diff=lfs merge=lfs -text
58
+ pretrained_models/sfe_inverter.pt filter=lfs diff=lfs merge=lfs -text
59
+ pretrained_models/styleclip_mappers filter=lfs diff=lfs merge=lfs -text
60
+ pretrained_models/ filter=lfs diff=lfs merge=lfs -text
61
+ assets/ filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,29 @@
1
  ---
2
  license: mit
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ pipeline_tag: image-to-image
4
  ---
5
+
6
+ # The Devil is in the Details: StyleFeatureEditor for Detail-Rich StyleGAN Inversion and High Quality Image Editing (CVPR 2024)
7
+
8
+ <a href="https://arxiv.org/abs/2406.10601"><img src="https://img.shields.io/badge/arXiv-2404.01094-b31b1b.svg" height=22.5></a>
9
+ <a href="https://colab.research.google.com/#fileId=https://github.com/AIRI-Institute/StyleFeatureEditor/blob/main/notebook/StyleFeatureEditor_inference.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" height=22.5></a>
10
+ <a href="https://github.com/AIRI-Institute/StyleFeatureEditor"><img src="https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white" height=22.5></a>
11
+
12
+
13
+
14
+ > The task of manipulating real image attributes through StyleGAN inversion has been extensively researched. This process involves searching latent variables from a well-trained StyleGAN generator that can synthesize a real image, modifying these latent variables, and then synthesizing an image with the desired edits. A balance must be struck between the quality of the reconstruction and the ability to edit. Earlier studies utilized the low-dimensional W-space for latent search, which facilitated effective editing but struggled with reconstructing intricate details. More recent research has turned to the high-dimensional feature space F, which successfully inverses the input image but loses much of the detail during editing. In this paper, we introduce StyleFeatureEditor -- a novel method that enables editing in both w-latents and F-latents. This technique not only allows for the reconstruction of finer image details but also ensures their preservation during editing. We also present a new training pipeline specifically designed to train our model to accurately edit F-latents. Our method is compared with state-of-the-art encoding approaches, demonstrating that our model excels in terms of reconstruction quality and is capable of editing even challenging out-of-domain examples.
15
+ >
16
+
17
+ <p align="center">
18
+ <img src="assets/preview_horizontal.webp" width="100%" align="center"/>
19
+ <br>
20
+ SFE is able to edit a real face image with the desired editing. It first reconstructs (inverts) the original image and then edits it according to the chosen direction. On the left is an examples of how our method works for several directions with different editing power p. On the right we display a comparison with previous approaches. LPIPS (lower is better) indicates inversion quality, while FID (lower is better) indicates editing ability. The size of markers indicates the inference time of the method, with larger markers indicating a higher time.
21
+ </p>
22
+
23
+ <p align="center">
24
+ <img src="assets/images_preview.webp" width="100%"/>
25
+ <br>
26
+ Examples of how our method works on several real images.
27
+ </p>
28
+
29
+ This repository contains the pretrained weights for our method, the inference and training code can be found on GitHub: ![https://github.com/AIRI-Institute/StyleFeatureEditor](https://github.com/AIRI-Institute/StyleFeatureEditor)
assets/dicaprio.png ADDED

Git LFS Details

  • SHA256: 74aaffe96d783184dd5eadc285b58a810f9d5dfc96196e907678606d8e390d4e
  • Pointer size: 132 Bytes
  • Size of remote file: 5.84 MB
assets/graph.png ADDED

Git LFS Details

  • SHA256: 185116087407621d807558834d16ce378ad45a100e302375052d88d0f050c1ed
  • Pointer size: 130 Bytes
  • Size of remote file: 71.7 kB
assets/images_preview.webp ADDED

Git LFS Details

  • SHA256: 96f179f7fd75221f87cdcd22fa3ca46d10a761e178e57bde8de2e56ec2645353
  • Pointer size: 131 Bytes
  • Size of remote file: 711 kB
assets/keanu.jpeg ADDED

Git LFS Details

  • SHA256: 459178c460e22ef174f20be0346ce93a52f23b1c3ed82c893ce8fcd7f6266f7e
  • Pointer size: 131 Bytes
  • Size of remote file: 128 kB
assets/mask.jpg ADDED

Git LFS Details

  • SHA256: 40fe9e45711358798483ecfee3ad71a6b783611f4c33bab21c45437683b353a6
  • Pointer size: 130 Bytes
  • Size of remote file: 80.5 kB
assets/phase1.png ADDED

Git LFS Details

  • SHA256: 27703fdb16da200b3f8dd224208e00accdf466e6f33b219cc2080b41644d478e
  • Pointer size: 131 Bytes
  • Size of remote file: 294 kB
assets/phase2.png ADDED

Git LFS Details

  • SHA256: cc70796b07cd17de0e73bf062a3fc6c3b95e3d6937f6938ea88afbf61170dc4f
  • Pointer size: 131 Bytes
  • Size of remote file: 483 kB
assets/potter.jpg ADDED

Git LFS Details

  • SHA256: c93d2be143dbd2bc86696fd17e0eb2dc5d4cb4657f91b720a205755e0ac7f92f
  • Pointer size: 132 Bytes
  • Size of remote file: 1.85 MB
assets/preview.webp ADDED

Git LFS Details

  • SHA256: 3c4c6240b3d9eaf53e0284f76f4aaf8d077bff98ad908c433efe45b31d293542
  • Pointer size: 133 Bytes
  • Size of remote file: 18.3 MB
assets/preview_horizontal.webp ADDED

Git LFS Details

  • SHA256: f6d515d9c2c89b6ce997cc5ab63fd75429d6577ce887e1a95d1250ec8c675780
  • Pointer size: 133 Bytes
  • Size of remote file: 16.6 MB
pretrained_models/79999_iter.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:468e13ca13a9b43cc0881a9f99083a430e9c0a38abd935431d1c28ee94b26567
3
+ size 53289463
pretrained_models/CurricularFace_Backbone.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:031ea0f7ba5f46905980cc446f0bbf9539e361246bff95f7077efffe2f110e04
3
+ size 260837256
pretrained_models/e4e_ffhq_encode.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ace1d9a8c05c10a399bcd500b8dda118f759ff1aac89dbdab7435f2136a0999
3
+ size 1201649680
pretrained_models/face_parsing.farl.lapa.main_ema_136500_jit191.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5a874906795ef89fadd7cf3b5b218ed8550fa9dbb383b7c0f95726c3a352914
3
+ size 646604126
pretrained_models/iresnet50-7f187506.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7f187506810d697785b8f0fa3fc22190c003aad3c0782513708efbe1ccd28b35
3
+ size 174586629
pretrained_models/mobilenet0.25_Final.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2979b33ffafda5d74b6948cd7a5b9a7a62f62b949cef24e95fd15d2883a65220
3
+ size 1789735
pretrained_models/moco_v2_800ep_pretrain.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5e4a3fd7178a95837c0ad71c265ed5f477d271e753ba505b6b6a5e86829eeb7e
3
+ size 112133139
pretrained_models/model_ir_se50.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a035c768259b98ab1ce0e646312f48b9e1e218197a0f80ac6765e88f8b6ddf28
3
+ size 175367323
pretrained_models/mtcnn/onet.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:313141c3646bebb73cb8350a2d5fee4c7f044fb96304b46ccc21aeea8b818f83
3
+ size 2345483
pretrained_models/mtcnn/pnet.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03e19e5c473932ab38f5a6308fe6210624006994a687e858d1dcda53c66f18cb
3
+ size 41271
pretrained_models/mtcnn/rnet.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5660aad67688edc9e8a3dd4e47ed120932835e06a8a711a423252a6f2c747083
3
+ size 604651
pretrained_models/sfe_editor.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:677709c837d86c10fc72eacfab1f25c505449daf76b0d0afd5c07ea29a4fd144
3
+ size 2488798612
pretrained_models/sfe_inverter.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:915c62784d8a4d62223dde5a51d7f5c5a5cb512b6bb75255ec1944db00a76cc5
3
+ size 2690573534
pretrained_models/styleclip_mappers/afro.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7fa8d3d23fcff3917ea364a23caf441359d880e29469bc0be0618ed2f9f3231a
3
+ size 141136834
pretrained_models/styleclip_mappers/angry.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe745897812f58fea90f06de2a830b355dcd0e13718b72e6228fad2c262e7b85
3
+ size 141136834
pretrained_models/styleclip_mappers/beyonce.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6be96b2f0ad94fa173214bd0b246278143a89ef50512a8865122fa975a5f8cbe
3
+ size 145342154
pretrained_models/styleclip_mappers/bobcut.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ab5c9d17a12097432044b616816e5de9ecf8410c75fed8d0a1c33f0a1c29693
3
+ size 141136898
pretrained_models/styleclip_mappers/bowlcut.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:769ec6f98e3190bb039cb64df598e9451808d0c649910fdbde2f1e827d056982
3
+ size 141144130
pretrained_models/styleclip_mappers/curly_hair.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4cb06da74be47870d880b82f0263c29516fbf050a4df6e6dcd8296b7896d35ea
3
+ size 141136834
pretrained_models/styleclip_mappers/depp.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:be81211466e8c4e2be217b5e1a64552694a7ca609753e708c71a9d39b14203ea
3
+ size 145342154
pretrained_models/styleclip_mappers/hilary_clinton.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa3f38eef7a1f8f285fae74bf9dbb6c660ccd87d81342147d64b6794255b38f1
3
+ size 145342154
pretrained_models/styleclip_mappers/mohawk.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e52e2cd0a4db4fee5ad64b27370e1bac9cc0f4ed8555390952b386b4c907af6
3
+ size 141136898
pretrained_models/styleclip_mappers/purple_hair.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:87982d0a44cfe1440b7c1ac34a59da9c782f7e60d015fc2b50981849b8686363
3
+ size 145342154
pretrained_models/styleclip_mappers/surprised.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48ed4979673fc1e5a9d57ffae1df919a59a9208577feefefffb2f3da81ae508b
3
+ size 141136834
pretrained_models/styleclip_mappers/taylor_swift.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d1d3f40c52b4684a5aba6908113a08c26dd0dd67401135bd625b8eca088f281b
3
+ size 145342154
pretrained_models/styleclip_mappers/trump.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ae2317421c2599edb2fc7aef7329210ab4973925fd5045be752fe0f2178bd27
3
+ size 145342154
pretrained_models/styleclip_mappers/zuckerberg.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:77ff0161d3e6f5ffe344013d33f4dd97ab258d8d314173542a570d74e9444260
3
+ size 145342154
pretrained_models/stylegan2-ffhq-config-f.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a205a346e86a9ddaae702e118097d014b7b8bd719491396a162cca438f2f524c
3
+ size 381624121
pretrained_models/stylegan2-ffhq-config-f.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bae494ef77e32a9cd1792a81a3c167692a0e64f6bcd8b06592ff42917e2ed46e
3
+ size 381462551