forked from maltseasy/faststyletransfer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
168 lines (155 loc) · 7.19 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
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Fast Style Transfer</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
<link rel="shortcut icon" href="favicon.ico">
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/addons/p5.dom.min.js"></script>
<script src="https://unpkg.com/ml5@0.1.2/dist/ml5.min.js" type="text/javascript"></script>
<style>
img {
width: 240px;
display: inline;
}
#canvasContainer {
display: inline;
}
.social-icons {
margin: 0;
padding: 0;
}
.social-icons li {
display: inline-block;
vertical-align: top;
list-style: none;
}
.social-icons li a {
display: block;
width: 30px;
height: 30px;
text-align: center;
line-height: 30px;
color: #333;
border-radius: 50%;
-webkit-transition: ease all 0.3s;
-moz-transition: ease all 0.3s;
-o-transition: ease all 0.3s;
transition: ease all 0.3s;
}
.social-icons li a:hover {
background: #333;
color: #fff;
}
body {
display: flex;
min-height: 100vh;
flex-direction: column;
}
main {
flex: 1 0 auto;
}
</style>
</head>
<script src="sketch.js"></script>
<body data-spy="scroll" data-target="#navbarKeira" data-offset="98">
<div id="loading">
<div class="load-circle"><span class="one"></span></div>
</div>
<header>
<nav style="background-color: black">
<div class="nav-wrapper">
<a href="https://aryanmisra.com" class="brand-logo center">Aryan Misra</a>
</div>
</nav>
</header>
<main>
<section>
<div class="container">
<div class="row">
<div class="col-12">
<h2 style="text-align: center">Fast Artistic Style Transfer</h2>
</div>
<div class="col s12">
<ul class="collapsible">
<li class="active">
<div class="collapsible-header"><i class="material-icons">details</i>Project Information</div>
<div class="collapsible-body"><span><b>Fast Artistic Style Transfer Web App</b>
<br>Developed through ML5JS (Tensorflow.js)
<br>Creds to <a class="blue-text text-lighten-3" href="https://ml5js.org/docs/StyleTransfer">ML5JS Documentation</a> and the <a class="blue-text text-lighten-3" href="https://arxiv.org/pdf/1603.08155.pdf">Perceptual Losses for Real-Time Style Transfer
and Super-Resolution paper</a> by Johnson et al.
</div>
</li>
</ul>
</div>
<div class="collection">
<div class="col s6">
<p><b>Choose a style</b></p>
<div class="carousel">
<img class="carousel-item" src="images/mathura.jpg" width="30%" height="30%" onclick="selectmathura();">
<img class="carousel-item" src="images/rain_princess.jpg" width="30%" height="30%" onclick="selectrainprincess();">
<img class="carousel-item" src="images/scream.jpg" width="30%" height="30%" onclick="selectscream();">
<img class="carousel-item" src="images/udnie.jpg" width="30%" height="30%" onclick="selectudnie();">
<img class="carousel-item" src="images/wave.jpg" width="30%" height="30%" onclick="selectwave();">
<img class="carousel-item" src="images/wreck.jpg" width="30%" height="30%" onclick="selectwreck();">
<img class="carousel-item" src="images/zhangdaqian.jpg" width="30%" height="30%" onclick="selectzhang();">
</div>
</div>
<div class="col s6">
<p id='status'><b>Loading model...</b></p>
<img id="theimage" src="images/udnie.jpg" />
<div id="canvasContainer"></div>
<br/>
<button class="waves-effect waves-light btn btn-dark float-right" id="startStop">Stylize!</button>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
</div>
</div>
</section>
</div>
</main>
<footer class="page-footer" style="background-color: black">
<div class="container">
<div class="row">
<div>
<ul class="social-icons">
<li><a class="grey-text text-lighten-3" href="aryanmisra.com"><i class="fas fa-home"></i></a></li>
<li><a class="grey-text text-lighten-3" href="https://www.linkedin.com/in/aryan-misra"><i class="fab fa-linkedin-in"></i></a></li>
<li><a class="grey-text text-lighten-3" href="https://medium.com/@aryanmisra"><i class="fab fa-medium-m"></i></a></li>
<li><a class="grey-text text-lighten-3" href="https://github.com/aryanmisra/faststyletransfer"><i class="fab fa-github"></i></a></li>
</ul>
</div>
</div>
</div>
</footer>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@0.13.3/dist/tf.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<script type="text/javascript">
M.AutoInit();
document.addEventListener('DOMContentLoaded', function() {
var elems = document.querySelectorAll('.collapsible');
var instances = M.Collapsible.init(elems, options);
});
$(document).ready(function(){
$('.collapsible').collapsible();
});
document.addEventListener('DOMContentLoaded', function() {
var elems = document.querySelectorAll('select');
var instances = M.FormSelect.init(elems, options);
});
$(document).ready(function(){
$('select').formSelect();
});
</script>
</body>
</html>