AnishaNaik03 commited on
Commit
f9d3afa
·
1 Parent(s): a80b1fe

Upload 259 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +16 -0
  2. fashion-gan/.DS_Store +0 -0
  3. fashion-gan/.gitattributes +1 -0
  4. fashion-gan/.gitignore +6 -0
  5. fashion-gan/.gradio/certificate.pem +31 -0
  6. fashion-gan/.idea/.gitignore +3 -0
  7. fashion-gan/.idea/fashion-gan.iml +12 -0
  8. fashion-gan/.idea/inspectionProfiles/profiles_settings.xml +6 -0
  9. fashion-gan/.idea/misc.xml +4 -0
  10. fashion-gan/.idea/modules.xml +8 -0
  11. fashion-gan/.idea/vcs.xml +7 -0
  12. fashion-gan/APP.ipynb +0 -0
  13. fashion-gan/Dockerfile +22 -0
  14. fashion-gan/Explore_Latent_Space.ipynb +0 -0
  15. fashion-gan/README.MD +114 -0
  16. fashion-gan/app/static/css/style.css +157 -0
  17. fashion-gan/app/static/dic +10 -0
  18. fashion-gan/app/static/image_interaction/query400_400.jpg +0 -0
  19. fashion-gan/app/static/image_interaction/query422_191.jpg +0 -0
  20. fashion-gan/app/static/image_interaction/w_interaction.pt +3 -0
  21. fashion-gan/app/static/image_interaction/w_interaction422_191.pt +3 -0
  22. fashion-gan/app/static/output/dim_dic.npy +3 -0
  23. fashion-gan/app/static/output/dim_dic.txt +8 -0
  24. fashion-gan/app/static/output/poli.pt +3 -0
  25. fashion-gan/app/static/output/result_img.png +0 -0
  26. fashion-gan/app/static/output/schi.pt +3 -0
  27. fashion-gan/app/static/output/w_1.pt +3 -0
  28. fashion-gan/app/static/output/w_2.pt +3 -0
  29. fashion-gan/app/static/output/w_3.pt +3 -0
  30. fashion-gan/app/static/output/w_4.pt +3 -0
  31. fashion-gan/app/static/output/w_6.pt +3 -0
  32. fashion-gan/app/static/script.js +9 -0
  33. fashion-gan/app/static/textimg/0.jpg +0 -0
  34. fashion-gan/app/static/textimg/1.jpg +0 -0
  35. fashion-gan/app/static/textimg/10.jpg +0 -0
  36. fashion-gan/app/static/textimg/11.jpg +0 -0
  37. fashion-gan/app/static/textimg/12.jpg +0 -0
  38. fashion-gan/app/static/textimg/13.jpg +0 -0
  39. fashion-gan/app/static/textimg/14.jpg +0 -0
  40. fashion-gan/app/static/textimg/15.jpg +0 -0
  41. fashion-gan/app/static/textimg/16.jpg +0 -0
  42. fashion-gan/app/static/textimg/17.jpg +0 -0
  43. fashion-gan/app/static/textimg/18.jpg +0 -0
  44. fashion-gan/app/static/textimg/19.jpg +0 -0
  45. fashion-gan/app/static/textimg/2.jpg +0 -0
  46. fashion-gan/app/static/textimg/20.jpg +0 -0
  47. fashion-gan/app/static/textimg/21.jpg +0 -0
  48. fashion-gan/app/static/textimg/22.jpg +0 -0
  49. fashion-gan/app/static/textimg/23.jpg +0 -0
  50. fashion-gan/app/static/textimg/24.jpg +0 -0
.gitattributes CHANGED
@@ -33,3 +33,19 @@ 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
+ fashion-gan/images/interface_part1.png filter=lfs diff=lfs merge=lfs -text
37
+ fashion-gan/images/interface_part2.png filter=lfs diff=lfs merge=lfs -text
38
+ fashion-gan/images/PCA_result_example.jpg filter=lfs diff=lfs merge=lfs -text
39
+ fashion-gan/images/pca.png filter=lfs diff=lfs merge=lfs -text
40
+ fashion-gan/images/text-to-image.png filter=lfs diff=lfs merge=lfs -text
41
+ fashion-gan/result/pca/pca_direction_in_0_0_20250214-040309.png filter=lfs diff=lfs merge=lfs -text
42
+ fashion-gan/result/pca/pca_direction_in_0_0_20250214-041108.png filter=lfs diff=lfs merge=lfs -text
43
+ fashion-gan/result/pca/pca_direction_in_0_0_20250214-041811.png filter=lfs diff=lfs merge=lfs -text
44
+ fashion-gan/result/pca/pca_direction_in_2_0_20250214-051344.png filter=lfs diff=lfs merge=lfs -text
45
+ fashion-gan/result/pca/pca_direction_in_2_0_20250214-051347.png filter=lfs diff=lfs merge=lfs -text
46
+ fashion-gan/result/pca/pca_direction_in_2_0_20250214-051350.png filter=lfs diff=lfs merge=lfs -text
47
+ fashion-gan/result/pca/pca_direction_in_2_0_20250214-051358.png filter=lfs diff=lfs merge=lfs -text
48
+ fashion-gan/result/pca/pca_direction_in_2_0_20250214-051456.png filter=lfs diff=lfs merge=lfs -text
49
+ fashion-gan/result/pca/pca_direction_in_2_0_20250214-051458.png filter=lfs diff=lfs merge=lfs -text
50
+ fashion-gan/result/pca/pca_direction_in_2_0_20250214-051501.png filter=lfs diff=lfs merge=lfs -text
51
+ fashion-gan/result/pca/pca_direction_in_2_0_20250214-054921.png filter=lfs diff=lfs merge=lfs -text
fashion-gan/.DS_Store ADDED
Binary file (6.15 kB). View file
 
fashion-gan/.gitattributes ADDED
@@ -0,0 +1 @@
 
 
1
+ *.ipynb linguist-vendored
fashion-gan/.gitignore ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ app.ipynb
2
+ Explore_latent_space.ipynb
3
+ Prepare Data and Train.ipynb
4
+ app/templates/.ipynb_checkpoints
5
+ model/*
6
+ stylegan-ada-pytorch
fashion-gan/.gradio/certificate.pem ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -----BEGIN CERTIFICATE-----
2
+ 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
31
+ -----END CERTIFICATE-----
fashion-gan/.idea/.gitignore ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
fashion-gan/.idea/fashion-gan.iml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="PYTHON_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$" />
5
+ <orderEntry type="inheritedJdk" />
6
+ <orderEntry type="sourceFolder" forTests="false" />
7
+ </component>
8
+ <component name="PyDocumentationSettings">
9
+ <option name="format" value="GOOGLE" />
10
+ <option name="myDocStringFormat" value="Google" />
11
+ </component>
12
+ </module>
fashion-gan/.idea/inspectionProfiles/profiles_settings.xml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ <component name="InspectionProjectProfileManager">
2
+ <settings>
3
+ <option name="USE_PROJECT_PROFILE" value="false" />
4
+ <version value="1.0" />
5
+ </settings>
6
+ </component>
fashion-gan/.idea/misc.xml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="$USER_HOME$/anaconda3" project-jdk-type="Python SDK" />
4
+ </project>
fashion-gan/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/fashion-gan.iml" filepath="$PROJECT_DIR$/.idea/fashion-gan.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
fashion-gan/.idea/vcs.xml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ <mapping directory="$PROJECT_DIR$/stylegan-ada-pytorch" vcs="Git" />
6
+ </component>
7
+ </project>
fashion-gan/APP.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
fashion-gan/Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
2
+ #
3
+ # NVIDIA CORPORATION and its licensors retain all intellectual property
4
+ # and proprietary rights in and to this software, related documentation
5
+ # and any modifications thereto. Any use, reproduction, disclosure or
6
+ # distribution of this software and related documentation without an express
7
+ # license agreement from NVIDIA CORPORATION is strictly prohibited.
8
+
9
+ FROM nvcr.io/nvidia/pytorch:20.12-py3
10
+
11
+ ENV PYTHONDONTWRITEBYTECODE 1
12
+ ENV PYTHONUNBUFFERED 1
13
+
14
+ RUN pip install imageio-ffmpeg==0.4.3 pyspng==0.1.0
15
+
16
+ WORKDIR /workspace
17
+
18
+ # Unset TORCH_CUDA_ARCH_LIST and exec. This makes pytorch run-time
19
+ # extension builds significantly faster as we only compile for the
20
+ # currently active GPU configuration.
21
+ RUN (printf '#!/bin/bash\nunset TORCH_CUDA_ARCH_LIST\nexec \"$@\"\n' >> /entry.sh) && chmod a+x /entry.sh
22
+ ENTRYPOINT ["/entry.sh"]
fashion-gan/Explore_Latent_Space.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
fashion-gan/README.MD ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Fashion Generation through Controllable StyleGAN
2
+ <img src="images/PCA_result_example.jpg" alt="pca"/>
3
+ GANs for All: Supporting Fun and Intuitive Exploration of GAN Latent Spaces
4
+
5
+ Author: Wei Jiang, Richard Lee Davis, Kevin Gonyop Kim, Pierre Dillenbourg
6
+
7
+ https://proceedings.mlr.press/v176/jiang22a.html
8
+
9
+ Abstract:
10
+ _We have developed a new tool that makes it possible for people with zero programming experience to intentionally and meaningfully explore the latent space of a GAN.
11
+ We combine a number of methods from the literature into a single system that includes multiple functionalities:
12
+ uploading and locating images in the latent space, image generation with text, visual style mixing,
13
+ and intentional and intuitive latent space exploration.
14
+ This tool was developed to provide a means for designers to explore the "design space" of their domains.
15
+ Our goal was to create a system to support novices in gaining a more complete, expert understanding of their domain's
16
+ design space by lowering the barrier of entry to using deep generative models in creative practice._
17
+
18
+ ## Dataset
19
+ We use [Zalando dataset](https://github.com/zalandoresearch/feidegger)
20
+ which can also be downloaded from [Zalando images](https://drive.google.com/file/d/1vmBHGiqoICdaLaUqFUy6YiXMBLPuhTCy/view?usp=drive_link) and [Zalando Text Image Pairs](https://drive.google.com/drive/folders/1-i9y8dhKjRX36152dBTEPmL_7ers2mr4?usp=drive_link).
21
+ The dataset itself consists of 8732 high-resolution images,
22
+ each depicting a dress from the available on the Zalando shop against a white-background.
23
+ ## Models
24
+ #### Train StyleGAN Model from scratch
25
+ ```commandline
26
+ !python train.py --outdir "training_runs" --snap 20 --metrics "none" --data "data/square_256_imgs.zip"
27
+ ```
28
+ If the resume the model from a checkpoint, we can --resume
29
+ ```commandline
30
+ !python train.py --outdir "training_runs" --snap 20 --metrics "none" --data "data/square_256_imgs.zip" --resume "training_runs/00015-square_256_imgs-auto1-resumecustom/network-snapshot-000400.pkl"
31
+ ```
32
+
33
+ #### Finetune DALL-E Model
34
+ ```commandline
35
+ !python "DALLE-pytorch/train_dalle.py" --vae_path "DALLE-pytorch/wandb/vae-final.pt" --image_text_folder "data/text_images"
36
+ ```
37
+
38
+ Download the models in the following links and save them in your Google Drive.
39
+
40
+ | Model | Download |
41
+ |:----------------------:|:-------------------------------------------------------------------------------------------------------------------:|
42
+ | Pretrained fashion GAN | [fashion-gan-pretrained.pkl](https://drive.google.com/file/d/1wjMtDejgj1GZmf0AqKY6LzKld3Rirbuo/view?usp=drive_link) |
43
+ | Finetuned DALL-E model | [DALLE-finetuend.pkl](https://drive.google.com/file/d/1yhtBeFMc-kTW3nOsxYgwJb6CffFe-V_e/view?usp=drive_link) |
44
+
45
+ ## Explore Latent Space
46
+ We applied PCA analysis to identify the semantically meaningful directions in latent space.
47
+ By exploring the first 10 principle components, we found sleeve, pattern, etc.
48
+
49
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/1S-iiGj6f4PgWsQJVfFduLv1XUskxniZT/view?usp=sharing)
50
+
51
+ To project the image into latent space, we employ SGD with perceptual loss + pixel-by-pixel MSE loss between two images.
52
+ This loss noticeably improved our tool’s ability to embed out-of-sample examples in the latent space of the GAN.
53
+
54
+ $$ w^{*} = \min_{w} L(w) = \min_{w} \lVert f(G(w)) - f(I) \rVert_2^2 + \lambda_{pix} \lVert G(w) - I \rVert_2^2 $$
55
+
56
+ [//]: # (Examples of interpolating images simultaneously along two meaningful directions)
57
+
58
+ [//]: # (in the latent space &#40;sleeve and pattern&#41; found using PCA. The image in the green)
59
+
60
+ [//]: # (box shows the original image with 0 magnitude.)
61
+
62
+ [//]: # (<img src="images/pca.png" alt="pca"/>)
63
+
64
+ ## Text-to-image Generation
65
+ We implemented two
66
+ methods to locate the design. The first method was to randomly sample images from the
67
+ latent space, then to pass these along with the text description through a CLIP. model to find a small number of images which most closely matched the
68
+ text. The second method was to fine-tune a DALL-E model on the
69
+ Feidegger dataset, and then to pass the text descriptions to DALL-E and let it generate
70
+ designs. We compare it with other models:
71
+ - FahionGAN: realistic, diverse but low resolution.
72
+ - DALLE: diverse, creative but less accurate.
73
+ - Stable Diffusion: accurate, high resolution but not diverse (when given specific text with only changing background and models).
74
+
75
+ <img src="images/text-to-image.png" alt="text-to-image"/>
76
+
77
+ ## WebApp
78
+ We have built a website for user testing: generarive.fashion
79
+
80
+ https://generative.fashion
81
+
82
+ [![YouTube Demo](https://img.shields.io/badge/YouTube-%23FF0000.svg?style=for-the-badge&logo=YouTube&logoColor=white)](https://www.youtube.com/watch?v=dcC7G2zBuL8&t=42s)
83
+
84
+ To run it in Google Colab: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1VY3-9zvnXqjYNxNzGqZgF0pRfafdGpJm#scrollTo=JFgsJTee-EnO)
85
+
86
+ The interface of our neural design space exploration tool. Users can upload images
87
+ in the workplace on the left or generate random image through random button.
88
+ Also, they can generate examples via text descriptions using the text box. Users
89
+ can drag these examples to the style-mixing region or save them in the workplace. Users can selectively combine elements from three designs using the visual
90
+ style-mixing panel. The output image is shown in the center of the canvas on the
91
+ right. The 2D-dimensional canvas represents the design space for two attributes
92
+ in the horizontal and vertical axes, and these attributes can be changed by using
93
+ a drop-down menu for each axis. Dragging the image within the canvas is equivalent to moving through the latent space of the GAN in semantically meaningful
94
+ directions.
95
+ <table><tr>
96
+ <td> <img src="images/interface_part1.png" alt="interface_part1" /> </td>
97
+ <td> <img src="images/interface_part2.png" alt="interface_part2" /> </td>
98
+ </tr></table>
99
+
100
+ ## Citation
101
+ ```
102
+ @InProceedings{pmlr-v176-jiang22a,
103
+ title = {GANs for All: Supporting Fun and Intuitive Exploration of GAN Latent Spaces},
104
+ author = {Jiang, Wei and Davis, Richard Lee and Kim, Kevin Gonyop and Dillenbourg, Pierre},
105
+ booktitle = {Proceedings of the NeurIPS 2021 Competitions and Demonstrations Track},
106
+ pages = {292--296},
107
+ year = {2022}
108
+ }
109
+ ```
110
+
111
+ ## Acknowledgements
112
+ This project and application is a semester project at [EPFL CHILI Lab](https://www.epfl.ch/labs/chili/)
113
+
114
+
fashion-gan/app/static/css/style.css ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .upload{
2
+ width:900px;
3
+ float:left;
4
+ height = 250px;
5
+ padding:5px;
6
+ }
7
+ #style-mixing-region{
8
+ position:absolute;
9
+ left:250px;
10
+ top:0px;
11
+ margin-left:30px;
12
+ width:780px;
13
+ }
14
+ #result {
15
+ margin-left:20px;
16
+ width:780px;
17
+ float:left;
18
+ padding:5px;
19
+ }
20
+
21
+ .imgshow{
22
+ width:180px;
23
+ height: 180px;
24
+ float:left;
25
+ border: 1px solid black;
26
+ }
27
+ .drop{
28
+ height:180px;
29
+ width:180px;
30
+ float:left;
31
+ }
32
+ .block{
33
+ float:left;
34
+ width:210px;
35
+ height:210px;
36
+ margin-right:15px;
37
+ margin-left:15px;
38
+ }
39
+ .center{
40
+ margin-left: 20px;
41
+ margin-right: 20px;
42
+ }
43
+ .title{
44
+ float:center;
45
+ padding-top:50px;
46
+ padding-left:150px;
47
+ }
48
+
49
+ #canvas-container{
50
+ position:absolute;
51
+ top:30px;
52
+ left:1050px;
53
+ width: 900px;
54
+ height: 900px;
55
+ }
56
+ #canvas{
57
+ podition:absolute;
58
+ background-color: #fff;
59
+ border-radius:20px;
60
+ box-shadow:0 0 10px rgba(0,0,0,0.05);
61
+ top:20px;
62
+ width: 800px;
63
+ height: 800px;
64
+ }
65
+
66
+ #xaxix{
67
+ position:absolute;
68
+ left:1050px;
69
+ top:0px;
70
+ }
71
+ #yaxis{
72
+ position:absolute;
73
+ left:580px;
74
+ top:830px;
75
+ }
76
+
77
+
78
+ .tag:first-of-type {
79
+ border-radius: 50px 0px 0px 50px;
80
+ }
81
+ .tag:last-of-type {
82
+ border-radius: 0px 50px 50px 0px;
83
+ }
84
+
85
+ .tag:last-of-type>.slider-button {
86
+ display:none !important;
87
+ }
88
+
89
+ span{
90
+ font-family:sans-serif !important;
91
+ }
92
+
93
+
94
+
95
+
96
+ #drop-region {
97
+ background-color: #fff;
98
+ border-radius:20px;
99
+ box-shadow:0 0 35px rgba(0,0,0,0.05);
100
+ width:230px;
101
+ height:800px;
102
+ margin-top:50px;
103
+
104
+ text-align: center;
105
+ cursor:pointer;
106
+ transition:.3s;
107
+ }
108
+ #drop-region:hover {
109
+ box-shadow:0 0 45px rgba(0,0,0,0.1);
110
+ }
111
+
112
+ #image-preview {
113
+ margin-top:20px;
114
+ }
115
+ #image-preview .image-view {
116
+ display: inline-block;
117
+ position:relative;
118
+ margin-right: 13px;
119
+ margin-bottom: 13px;
120
+ }
121
+ #image-preview .image-view img {
122
+ max-width: 100px;
123
+ max-height: 100px;
124
+ }
125
+ #image-preview .overlay {
126
+ position: absolute;
127
+ width: 100%;
128
+ height: 100%;
129
+ top: 0;
130
+ right: 0;
131
+ z-index: 2;
132
+ background: rgba(255,255,255,0.5);
133
+ }
134
+
135
+ .imggenerate {
136
+ float:left;
137
+ height:180px;
138
+ width:180px;
139
+ }
140
+ #textbox{
141
+ position:absolute;
142
+ left:300px;
143
+ top:450px;
144
+ margin-top:30px;
145
+ height:200px;
146
+ width:800px;
147
+ }
148
+
149
+ #image-region{
150
+ margin-top:10px;
151
+ float:left;
152
+ height:360;
153
+ width:640;
154
+ }
155
+ #clear{
156
+ margin-left:30px;
157
+ }
fashion-gan/app/static/dic ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ 0: ["layers":[0, 4], "mag":[-5, 10], "effect": "sleeve"],
3
+ 4: ["layers": [3, 9], "mag":[-5, 10], "effect": "pattern"]
4
+ 10: ["layers":[0, 7], "mag": [-10, 10], effect": "collar, hemline, width"],
5
+ 6: ["layers":[10, 14], "mag": [-20, 20], effect": "orange, blue"],
6
+ 0: ["layers":[10, 44], "mag":[-30, 0], "effect": "Green, red"],
7
+ 7: ["layers":[10, 14], "mag":[-40, 30], "effect": "dark, light"],
8
+ 9: ["layers":[0, 4], "mag":[-10, 10], "effect": "hemline, collar"],
9
+ 8: ["layers":[3, 4], "mag":[-10, 20], "effect": "waistline"],
10
+ }
fashion-gan/app/static/image_interaction/query400_400.jpg ADDED
fashion-gan/app/static/image_interaction/query422_191.jpg ADDED
fashion-gan/app/static/image_interaction/w_interaction.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85f9692ecf88ba94c31285f4e3b554e990486f7a42c59173c6017054e98267de
3
+ size 29432
fashion-gan/app/static/image_interaction/w_interaction422_191.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b17d2067696a19073ea6a77d6150f700f1fc18d05f644838fcc2d19557dd0211
3
+ size 29432
fashion-gan/app/static/output/dim_dic.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ecf7189ffb76318dd4a39b55f2c123cb83076f960d8faf216cd766eb5d1c7e4e
3
+ size 771
fashion-gan/app/static/output/dim_dic.txt ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {"0": {"id": 0, "layers": [0, 4], "mag": [-10, 10], "effect": "sleeve"},
2
+ "1": {"id": 4, "layers": [3, 9], "mag": [-10, 10], "effect": "pattern"},
3
+ "2": {"id": 2, "layers": [0, 7], "mag": [-10, 10], "effect": "collar, hemline, width"},
4
+ "3": {"id": 6, "layers": [10, 14], "mag": [-20, 20], "effect": "orange, blue"},
5
+ "4": {"id": 0, "layers": [10, 14], "mag": [-30, 30], "effect": "Green, red"},
6
+ "5": {"id": 7, "layers": [10, 14], "mag": [-40, 40], "effect": "dark, light"},
7
+ "6": {"id": 9, "layers": [0, 4], "mag": [-10, 10], "effect": "hemline, collar"},
8
+ "7": {"id": 8, "layers": [3, 4], "mag": [-20, 20], "effect": "waistline"}}
fashion-gan/app/static/output/poli.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b34266e0d1d84a9eba570d21d982ccef818391c1efd60fab0917595c65a16578
3
+ size 29432
fashion-gan/app/static/output/result_img.png ADDED
fashion-gan/app/static/output/schi.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:220cec12e99f5f97d6795782469ecf7336ab472ed1ab06e213f851340cb81899
3
+ size 29432
fashion-gan/app/static/output/w_1.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0eaaa06aaa6d464e86b5403d6e8e64d81ae6c9b1cc0588f365f36c4d0b443b21
3
+ size 29432
fashion-gan/app/static/output/w_2.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b94e688ad668d6c99848c8f83457ff0363c285a37ebbdcb515afd3cf794d2f69
3
+ size 29432
fashion-gan/app/static/output/w_3.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cba38154add7abae8c1b5b9634feb310f8171666005bf50e85ba23de39720df1
3
+ size 29432
fashion-gan/app/static/output/w_4.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:14864c041ebbe83bc8a3da42214d63564d6015608b12ca10f2060d4b1100d11b
3
+ size 29432
fashion-gan/app/static/output/w_6.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4339f80ee0202e9492a04f27bf2e4c7e04e6238f7dc2611110a4ae83354d0bc8
3
+ size 29432
fashion-gan/app/static/script.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+
2
+ let imgShape = document.getElementById("imgShape");
3
+ let imgPattern = document.getElementById("imgPattern");
4
+ let resultImg = document.getElementById("resultImg");
5
+
6
+
7
+
8
+
9
+
fashion-gan/app/static/textimg/0.jpg ADDED
fashion-gan/app/static/textimg/1.jpg ADDED
fashion-gan/app/static/textimg/10.jpg ADDED
fashion-gan/app/static/textimg/11.jpg ADDED
fashion-gan/app/static/textimg/12.jpg ADDED
fashion-gan/app/static/textimg/13.jpg ADDED
fashion-gan/app/static/textimg/14.jpg ADDED
fashion-gan/app/static/textimg/15.jpg ADDED
fashion-gan/app/static/textimg/16.jpg ADDED
fashion-gan/app/static/textimg/17.jpg ADDED
fashion-gan/app/static/textimg/18.jpg ADDED
fashion-gan/app/static/textimg/19.jpg ADDED
fashion-gan/app/static/textimg/2.jpg ADDED
fashion-gan/app/static/textimg/20.jpg ADDED
fashion-gan/app/static/textimg/21.jpg ADDED
fashion-gan/app/static/textimg/22.jpg ADDED
fashion-gan/app/static/textimg/23.jpg ADDED
fashion-gan/app/static/textimg/24.jpg ADDED