-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
445 lines (444 loc) · 35.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
<!DOCTYPE html>
<html style="font-size: 16px;" lang="en"><head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<meta name="keywords" content="INTUITIVE">
<meta name="description" content="">
<title>CS 180 Final Project</title>
<link rel="stylesheet" href="nicepage.css" media="screen">
<link rel="stylesheet" href="style.css" media="screen">
<script class="u-script" type="text/javascript" src="jquery.js" defer=""></script>
<script class="u-script" type="text/javascript" src="nicepage.js" defer=""></script>
<meta name="generator" content="Nicepage 5.17.1, nicepage.com">
<link id="u-theme-google-font" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i|Open+Sans:300,300i,400,400i,500,500i,600,600i,700,700i,800,800i">
<script type="application/ld+json">{
"@context": "http://schema.org",
"@type": "Organization",
"name": "Site1"
}</script>
<meta name="theme-color" content="#478ac9">
<meta property="og:title" content="CS 180 Final Project">
<meta property="og:description" content="">
<meta property="og:type" content="website">
<meta name="viewport" content="width=device-width, initial-scale=1.0"><meta data-intl-tel-input-cdn-path="intlTelInput/"></head>
<body class="u-body u-overlap u-xl-mode" data-lang="en"><header class="u-clearfix u-header u-header" id="sec-6cb0"><div class="u-clearfix u-sheet u-valign-middle-lg u-valign-middle-xl u-sheet-1">
<nav class="u-menu u-menu-one-level u-offcanvas u-menu-1" data-responsive-from="MD">
<div class="menu-collapse">
<a class="u-button-style u-nav-link" href="#">
<svg class="u-svg-link" viewBox="0 0 24 24"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#svg-5a15"></use></svg>
<svg class="u-svg-content" version="1.1" id="svg-5a15" viewBox="0 0 16 16" x="0px" y="0px" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"><g><rect y="1" width="16" height="2"></rect><rect y="7" width="16" height="2"></rect><rect y="13" width="16" height="2"></rect>
</g></svg>
</a>
</div>
<div class="u-custom-menu u-nav-container">
<ul class="u-nav u-unstyled"><li class="u-nav-item"><a class="u-button-style u-nav-link" href="https://inst.eecs.berkeley.edu/~cs180/fa23/upload/files/proj1/aayush.gupta/site/" target="_blank">CS 180 Proj 1</a>
</li><li class="u-nav-item"><a class="u-button-style u-nav-link" href="https://inst.eecs.berkeley.edu/~cs180/fa23/upload/files/proj2/aayush.gupta/site/" target="_blank">CS 180 Proj 2</a>
</li><li class="u-nav-item"><a class="u-button-style u-nav-link" href="https://inst.eecs.berkeley.edu/~cs180/fa23/upload/files/proj3/aayush.gupta/">CS 180 Proj 3</a>
</li><li class="u-nav-item"><a class="u-button-style u-nav-link" href="https://inst.eecs.berkeley.edu/~cs180/fa23/upload/files/proj4B/aayush.gupta/" target="_blank">CS 180 Proj 4</a>
</li><li class="u-nav-item"><a class="u-button-style u-nav-link" href="https://inst.eecs.berkeley.edu/~cs180/fa23/upload/files/proj5/aayush.gupta/" target="_blank">CS 180 Proj 5</a>
</li></ul>
</div>
<div class="u-custom-menu u-nav-container-collapse">
<div class="u-black u-container-style u-inner-container-layout u-opacity u-opacity-95 u-sidenav">
<div class="u-inner-container-layout u-sidenav-overflow">
<div class="u-menu-close"></div>
<ul class="u-align-center u-nav u-popupmenu-items u-unstyled u-nav-2"><li class="u-nav-item"><a class="u-button-style u-nav-link" href="https://inst.eecs.berkeley.edu/~cs180/fa23/upload/files/proj1/aayush.gupta/site/" target="_blank">CS 180 Proj 1</a>
</li><li class="u-nav-item"><a class="u-button-style u-nav-link" href="https://inst.eecs.berkeley.edu/~cs180/fa23/upload/files/proj2/aayush.gupta/site/" target="_blank">CS 180 Proj 2</a>
</li><li class="u-nav-item"><a class="u-button-style u-nav-link" href="https://inst.eecs.berkeley.edu/~cs180/fa23/upload/files/proj3/aayush.gupta/">CS 180 Proj 3</a>
</li><li class="u-nav-item"><a class="u-button-style u-nav-link" href="https://inst.eecs.berkeley.edu/~cs180/fa23/upload/files/proj4B/aayush.gupta/" target="_blank">CS 180 Proj 4</a>
</li><li class="u-nav-item"><a class="u-button-style u-nav-link" href="https://inst.eecs.berkeley.edu/~cs180/fa23/upload/files/proj5/aayush.gupta/" target="_blank">CS 180 Proj 5</a>
</li></ul>
</div>
</div>
<div class="u-black u-menu-overlay u-opacity u-opacity-70"></div>
</div>
</nav>
</div></header>
<section class="u-align-center u-clearfix u-gradient u-section-1" src="" id="sec-4bf2">
<div class="u-clearfix u-sheet u-sheet-1">
<h1 class="u-align-center u-text u-text-default-lg u-text-default-md u-text-default-sm u-text-default-xl u-title u-text-1"> CS 180 Final Project</h1>
<p class="u-large-text u-text u-text-default u-text-variant u-text-2">Aayush Gupta</p>
</div>
</section>
<section class="u-clearfix u-section-2" id="sec-9125">
<div class="u-clearfix u-sheet u-valign-middle u-sheet-1">
<div class="fr-view u-align-center u-clearfix u-rich-text u-text u-text-1">
<h3 style="text-align: left;">Project 1: Poor Man's Augmented Reality</h3>
<p style="text-align: left;">In this project, I captured a video and inserted a synthetic object into the scene. The basic idea is to use 2D points in the image whose 3D coordinates are known to calibrate the camera for every video frame and then use the camera projection matrix to project the 3D coordinates of a cube onto the image.</p>
</div>
<div class="fr-view u-align-center u-clearfix u-rich-text u-text u-text-2">
<h4 style="text-align: left;">Setup:</h4>
<p style="text-align: left;">I first drew a regular pattern on a rectangular box to get a set of known 3D points. I labeled 67 points and chose them so that they were not all planar. I then labeled all of the keypoints on the image manually.</p>
</div>
<div class="u-list u-list-1">
<div class="u-repeater u-repeater-1">
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-1">
<img class="u-image u-image-contain u-image-default u-image-1" src="AR/img_in/downscaled.gif" alt="" data-image-width="227" data-image-height="389">
<p class="u-text u-text-default u-text-3">Input video</p>
</div>
</div>
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-2">
<img class="u-image u-image-contain u-image-default u-image-2" src="AR/img_out/keypoints.png" alt="" data-image-width="227" data-image-height="389">
<p class="u-text u-text-default u-text-4">Labeled Keypoints</p>
</div>
</div>
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-3">
<img class="u-image u-image-contain u-image-default u-image-3" src="AR/img_out/3d_plot.png" alt="" data-image-width="402" data-image-height="389">
<p class="u-text u-text-default u-text-5">Keypoints in 3D space</p>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="u-clearfix u-section-3" id="carousel_415d">
<div class="u-clearfix u-sheet u-sheet-1">
<div class="fr-view u-align-center u-clearfix u-rich-text u-text u-text-1">
<h4 style="text-align: left;">Propogating Keypoints to other Frames</h4>
<p style="text-align: left;">I created my own keypoint detector using the harris corner detector. </p>
<p style="text-align: left;">Given keypoints in some frame i, to detect keypoints in frame i+1, I first detected corners using the harris corner detector, keeping only the 200 points with the highest response. Since the points do not move by a large amount in consecutive frames, I found the closest keypoint (in pixel space) to each of the new keypoints from the previous keypoints. I further thresholded the matches so that only matches with a small distance were kept. This detector critically depends on small motions in the video, and no spurious corners within the threshold radius. This procedure was done for all consecutive pairs of frames i, i+1 starting from frame 0. While the keypoints appeared to slightly wiggle over frames, they are relatively stable and do not drop out.</p>
</div>
<div class="u-list u-list-1">
<div class="u-repeater u-repeater-1">
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-1">
<img class="u-image u-image-contain u-image-default u-image-1" src="AR/img_out/keypoints_tracking.gif" alt="" data-image-width="227" data-image-height="389">
<p class="u-text u-text-default u-text-2">Tracked Keypoints</p>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="u-align-center u-clearfix u-section-4" id="sec-69ff">
<div class="u-clearfix u-sheet u-sheet-1">
<div class="fr-view u-align-center u-clearfix u-rich-text u-text u-text-1">
<h4 id="isPasted" style="text-align: left;">Calibrating the Camera</h4>
<p style="text-align: left;">Now that I had the 2D image coordinates of marked points and their corresponding 3D coordinates, I had an overdetermined system of equations relating world coordinates to pixel coordinates. As such, I used least squares to solve for the projection matrix to project the 3D world coordinates to pixel space. This was done separately for each frame in the video, since the camera has a different pose in each frame.</p>
<p style="text-align: left;">
<br>
</p>
<h4 id="isPasted" style="text-align: left;">Projecting a cube in the Scene</h4>
<p style="text-align: left;">Using the camera projection matrix for each frame, I now projected the corners of a cube to insert it into the scene. The cube was projected independently for each image, and then all the frames were combined to get the following:</p>
</div>
<div class="u-list u-list-1">
<div class="u-repeater u-repeater-1">
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-1">
<img class="u-image u-image-contain u-image-default u-image-1" src="AR/img_out/box_tracking.gif" alt="" data-image-width="227" data-image-height="389">
<p class="u-text u-text-default u-text-2">AR Cube</p>
</div>
</div>
</div>
</div>
<div class="fr-view u-align-center u-clearfix u-rich-text u-text u-text-3">
<h4 style="text-align: left;">Bells and Whistles: Mesh</h4>
<p style="text-align: left;">I also attempted to place an arbitrary mesh onto the scene using pyrender. To do this, I first needed to further decompose the camera projection matrix into camera intrinsics and extrinsics matrices, as they are required by the renderer. I first used <span style="font-style: italic;">cv2.calibrateCamera</span> to get an approximate intrinsics matrix, and then solved for the extrinsics matrices with the fixed intrinsic matrix using <span style="font-style: italic;">cv2.solvePnP </span> as the results of <span style="font-style: italic;">cv2.calibrateCamera </span>were unstable<span style="font-style: italic;">. </span>Additionally, due to the way in which pyrender defines the axes compared to openCV, the y and z axes needed to be negated. Finally, the camera pose required by the renderer needed to be the inverse of the extrinsics matrix, effectively the camera to world matrix.
</p>
</div>
<div class="u-list u-list-2">
<div class="u-repeater u-repeater-2">
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-2">
<img class="u-image u-image-contain u-image-default u-image-2" src="AR/img_in/pinhole_camera_model.png" alt="" data-image-width="620" data-image-height="437">
<p class="u-text u-text-default u-text-4">OpenCV camera model</p>
</div>
</div>
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-3">
<img class="u-image u-image-contain u-image-default u-image-3" src="AR/img_in/pyrender.jpg" alt="" data-image-width="465" data-image-height="464">
<p class="u-text u-text-default u-text-5">Pyrender Camera Axes</p>
</div>
</div>
</div>
</div>
<div class="fr-view u-align-center u-clearfix u-rich-text u-text u-text-6">
<p style="text-align: left;">However, this did not work too well as the rendered sphere changed significantly in size as the camera moved towards or away from it.</p>
</div>
<div class="u-list u-list-3">
<div class="u-repeater u-repeater-3">
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-4">
<img class="u-image u-image-contain u-image-default u-image-4" src="AR/img_out/mesh_video.gif" alt="" data-image-width="146" data-image-height="260">
<p class="u-text u-text-default u-text-7">Mesh rendering</p>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="u-clearfix u-section-5" id="sec-584b">
<div class="u-clearfix u-sheet u-sheet-1">
<div class="u-border-3 u-border-grey-dark-1 u-line u-line-horizontal u-line-1"></div>
<div class="fr-view u-align-left u-clearfix u-rich-text u-text u-text-1">
<h3 style="text-align: left;">Project 2: Neural Algorithm for Artistic Style</h3>
<p>In this project, I re-implemented Neural Algorithm for Artistic Style, described in Gatys et al. (2015). It leverages deep neural networks to combine the content of one image and the style of another to create a new artistic image. This is achieved by using a pre-trained CNN to compare the features of the generated image with the style and content images.</p>
<h4>Approach</h4>
<p>As suggested by the Gatys paper, I utilized the pre-trained VGG-19 network, which consists of 16 convolutional layers and 5 pooling layers trained on ImageNet. I changed the max pooling layers to average pooling to allow for a better flow of gradients.</p>
</div>
<div class="u-list u-list-1">
<div class="u-repeater u-repeater-1">
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-1">
<img class="u-image u-image-contain u-image-default u-image-1" src="NS/in_dir/vgg_arch.png" alt="" data-image-width="600" data-image-height="344">
<p class="u-text u-text-default u-text-2">VGG-19 Network</p>
</div>
</div>
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-2">
<img class="u-image u-image-contain u-image-default u-image-2" src="NS/in_dir/style_transfer.png" alt="" data-image-width="582" data-image-height="471">
<p class="u-text u-text-default u-text-3">Style Transfer Process</p>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="u-clearfix u-section-6" id="carousel_5cfc">
<div class="u-clearfix u-sheet u-valign-middle u-sheet-1">
<div class="fr-view u-align-left u-clearfix u-rich-text u-text u-text-1"></div>
<div class="fr-view u-align-left u-clearfix u-rich-text u-text u-text-2">
<p>The intuition of this process is that different layers of the network can act as filters to extract various levels of features, ranging from high to low-level features. First, the content and style images are passed through the network to generate their responses at each level of the network. To get a mixture of the style and content information, the goal is for the generated image to match the responses of both the style and content images at different layers of the network. In particular, style is matched at the [conv1_1, conv2_1, conv3_1, conv4_1, conv5_1] layers and content is matched at the [conv4_2] layer, as described in the paper. For content, the responses are directly matched, while for style, the Gram matrices of the responses are matched. The following loss is minimized by changing the weights of the generated image:</p>
<p>
<img src="NS/in_dir/full_loss.jpg" width="480" style="width: 480px;" class="fr-dib fr-fic">
</p>
<p id="isPasted">The LBFGS optimizer was used.</p>
</div>
</div>
</section>
<section class="u-clearfix u-section-7" id="sec-f378">
<div class="u-clearfix u-sheet u-sheet-1">
<div class="fr-view u-align-left u-clearfix u-rich-text u-text u-text-1">
<h4>Results:</h4>
<p>The Neckarfront images were trained for 500 iterations using an α/β ratio of 10^-3, and the rest for 250 iterations with an α/β ratio of 10^-5. The additional images were trained for fewer iterations as I found that the training process led to few noticeable changes after 200+ iterations.</p>
</div>
<div class="u-list u-list-1">
<div class="u-repeater u-repeater-1">
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-1">
<!-- <img class="u-expanded-width u-image u-image-contain u-image-default u-image-1" src="" alt="" data-image-width="1200" data-image-height="1093"> -->
<!-- <p class="u-text u-text-default u-text-2">.</p> -->
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-2">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-2" src="NS/in_dir/content/Tuebingen_Neckarfront_medium.jpg" alt="" data-image-width="640" data-image-height="480">
<p class="u-text u-text-default u-text-3">Neckarfront</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-3">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-3" src="NS/in_dir/content/nyc_medium.jpg" alt="" data-image-width="730" data-image-height="495">
<p class="u-text u-text-default u-text-4">NYC Bryant Park</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-4">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-4" src="NS/in_dir/content/japan_rz_medium.jpg" alt="" data-image-width="1000" data-image-height="667">
<p class="u-text u-text-default u-text-5"> Byodo-in Buddhist temple</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-5">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-5" src="NS/in_dir/style/starry_night_medium.jpg" alt="" data-image-width="757" data-image-height="599">
<p class="u-text u-text-default u-text-6">The Starry Night</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-6">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-6" src="NS/out_dir/neckarfront/neckarfront_medium_starry_night_1_1000_26-11-2023_14-48-57.jpg" alt="" data-image-width="640" data-image-height="480">
<p class="u-text u-text-default u-text-7">Iter 9600</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-7">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-7" src="NS/out_dir/nyc/nyc_medium_starry_night_1_100000_ss10-12-2023_21-28-28.jpg" alt="" data-image-width="730" data-image-height="495">
<p class="u-text u-text-default u-text-8">Iter 9600</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-8">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-8" src="NS/out_dir/japan/japan_rz_medium_starry_night_1_10000010-12-2023_22-57-04.jpg" alt="" data-image-width="1000" data-image-height="667">
<p class="u-text u-text-default u-text-9">Iter 9600</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-9">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-9" src="NS/in_dir/style/femme_medium.jpg" alt="" data-image-width="589" data-image-height="767">
<p class="u-text u-text-default u-text-10"> Femme nue assise </p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-10">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-10" src="NS/out_dir/neckarfront/neckarfront_medium_femme_1_1000_26-11-2023_14-57-45.jpg" alt="" data-image-width="640" data-image-height="480">
<p class="u-text u-text-default u-text-11">Iter 9600</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-11">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-11" src="NS/out_dir/nyc/nyc_medium_femme_1_100000_ss10-12-2023_21-34-12.jpg" alt="" data-image-width="730" data-image-height="495">
<p class="u-text u-text-default u-text-12">Iter 9600</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-12">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-12" src="NS/out_dir/japan/japan_rz_medium_femme_1_10000010-12-2023_23-00-25.jpg" alt="" data-image-width="1000" data-image-height="667">
<p class="u-text u-text-default u-text-13">Iter 9600</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-13">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-13" src="NS/in_dir/style/scream_medium.jpg" alt="" data-image-width="603" data-image-height="768">
<p class="u-text u-text-default u-text-14"> The Scream</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-14">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-14" src="NS/out_dir/neckarfront/neckarfront_medium_scream_1_1000_26-11-2023_15-24-12.jpg" alt="" data-image-width="640" data-image-height="480">
<p class="u-text u-text-default u-text-15">Iter 9600</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-15">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-15" src="NS/out_dir/nyc/nyc_medium_scream_1_100000_ss10-12-2023_21-51-15.jpg" alt="" data-image-width="730" data-image-height="495">
<p class="u-text u-text-default u-text-16">Iter 9600</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-16">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-16" src="NS/out_dir/japan/japan_rz_medium_scream_1_10000010-12-2023_23-10-25.jpg" alt="" data-image-width="1000" data-image-height="667">
<p class="u-text u-text-default u-text-17">Iter 9600</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-17">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-17" src="NS/in_dir/style/composition_medium.jpg" alt="" data-image-width="639" data-image-height="420">
<p class="u-text u-text-default u-text-18"> Composition</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-18">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-18" src="NS/out_dir/neckarfront/neckarfront_medium_composition_1_1000_26-11-2023_15-15-18.jpg" alt="" data-image-width="640" data-image-height="480">
<p class="u-text u-text-default u-text-19">Iter 9600</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-19">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-19" src="NS/out_dir/nyc/nyc_medium_composition_1_100000_ss10-12-2023_21-45-35.jpg" alt="" data-image-width="730" data-image-height="495">
<p class="u-text u-text-default u-text-20">Iter 9600</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-20">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-20" src="NS/out_dir/japan/japan_rz_medium_composition_1_10000010-12-2023_23-07-02.jpg" alt="" data-image-width="1000" data-image-height="667">
<p class="u-text u-text-default u-text-21">Iter 9600</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-21">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-21" src="NS/in_dir/style/shipwreck_medium.jpg" alt="" data-image-width="800" data-image-height="552">
<p class="u-text u-text-default u-text-22"> The Shipwreck of the Minotaur</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-22">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-22" src="NS/out_dir/neckarfront/neckarfront_medium_shipwreck_1_1000_26-11-2023_15-06-26.jpg" alt="" data-image-width="640" data-image-height="480">
<p class="u-text u-text-default u-text-23">Iter 9600</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-23">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-23" src="NS/out_dir/nyc/nyc_medium_shipwreck_1_100000_ss10-12-2023_21-39-56.jpg" alt="" data-image-width="730" data-image-height="495">
<p class="u-text u-text-default u-text-24">Iter 9600</p>
</div>
</div>
<div class="u-container-style u-custom-item u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-24">
<img class="u-expanded-width u-image u-image-contain u-image-default u-image-24" src="NS/out_dir/japan/japan_rz_medium_shipwreck_1_10000010-12-2023_23-03-42.jpg" alt="" data-image-width="1000" data-image-height="667">
<p class="u-text u-text-default u-text-25">Iter 9600</p>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="u-clearfix u-section-8" id="sec-ff6a">
<div class="u-clearfix u-sheet u-sheet-1">
<div class="fr-view u-align-left u-clearfix u-rich-text u-text u-text-1">
<p>
<br>
</p>
<p>One interesting finding was that the larger the content/style images were used, the less the style transferred. No matter how large the style weight was set when using large images, the same amount of style seemed to transfer. While the image quality is significantly improved, the generated image has both low and high-level features from the content image and only captures some high level features of the style, like color and contrast. This might be due to how the Gram matrix is constructed and normalized. As such, I ended up using medium-resolution images (~640x480) when possible since they struck a good balance.</p>
</div>
<div class="u-list u-list-1">
<div class="u-repeater u-repeater-1">
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-1">
<img class="u-image u-image-contain u-image-default u-image-1" src="NS/out_dir/neckarfront/neckarfront_starry_night_100.jpg" alt="" data-image-width="320" data-image-height="240">
<p class="u-text u-text-default u-text-2">Small, α/β=10^-3 </p>
</div>
</div>
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-2">
<img class="u-image u-image-contain u-image-default u-image-2" src="NS/out_dir/neckarfront/neckarfront_medium_starry_night_1_1000_26-11-2023_14-48-57.jpg" alt="" data-image-width="640" data-image-height="480">
<p class="u-text u-text-default u-text-3"> Medium, α/β=10^-3 </p>
</div>
</div>
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-3">
<img class="u-image u-image-contain u-image-default u-image-3" src="NS/out_dir/neckarfront/neckarfront_large_starry_night_1_final_1_10000.jpg" alt="" data-image-width="1024" data-image-height="768">
<p class="u-text u-text-default u-text-4"> Large, α/β=10^-5 </p>
</div>
</div>
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-4">
<img class="u-image u-image-contain u-image-default u-image-4" src="NS/out_dir/neckarfront/neckarfront_large_starry_night_1_final_10000000000_26-11-2023_13-34-10.jpg" alt="" data-image-width="1024" data-image-height="768">
<p class="u-text u-text-default u-text-5"> Large, α/β=10^-10 </p>
</div>
</div>
</div>
</div>
<div class="fr-view u-align-left u-clearfix u-rich-text u-text u-text-6">
<p>
<br>
</p>
<p>
<span style="font-weight: 700;">α/β Ratio Ablation:</span>
</p>
<p>I varied the ratio of α/β to find what the best weighting was. A α/β ratio less than or equal to 10^-3 was found to work well to capture a good amount of style. The following is the result of varying this ratio on the small version of the <span style="font-style: italic;">Shipwreck</span> painting.
</p>
</div>
<div class="u-list u-list-2">
<div class="u-repeater u-repeater-2">
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-5">
<img class="u-image u-image-contain u-image-default u-image-5" src="NS/out_dir/neckarfront/neckarfront_shipwreck_1.jpg" alt="" data-image-width="320" data-image-height="240">
<p class="u-text u-text-default u-text-7">α/β=1 </p>
</div>
</div>
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-6">
<img class="u-image u-image-contain u-image-default u-image-6" src="NS/out_dir/neckarfront/neckarfront_shipwreck_10.jpg" alt="" data-image-width="320" data-image-height="240">
<p class="u-text u-text-default u-text-8"> α/β=10^-1</p>
</div>
</div>
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-7">
<img class="u-image u-image-contain u-image-default u-image-7" src="NS/out_dir/neckarfront/neckarfront_shipwreck_100.jpg" alt="" data-image-width="320" data-image-height="240">
<p class="u-text u-text-default u-text-9"> α/β=10^-2</p>
</div>
</div>
<div class="u-container-style u-list-item u-repeater-item">
<div class="u-container-layout u-similar-container u-container-layout-8">
<img class="u-image u-image-contain u-image-default u-image-8" src="NS/out_dir/neckarfront/neckarfront_shipwreck_1000.jpg" alt="" data-image-width="320" data-image-height="240">
<p class="u-text u-text-default u-text-10"> α/β=10^-3</p>
</div>
</div>
</div>
</div>
</div>
</section>
</body></html>