-
Notifications
You must be signed in to change notification settings - Fork 965
/
static_image.html
139 lines (122 loc) · 2.92 KB
/
static_image.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
<!DOCTYPE html>
<html>
<head>
<title>PoseNet - Coco Images Demo</title>
<style type='text/css'>
.illustration-canvas {
position: absolute;
left: 600px;
top: 100px;
border: 1px solid #eeeeee;
}
.detection-canvas {
position: absolute;
left: 10px;
top: 100px;
}
h3,
h4,
p {
margin: 10px 0;
}
#main ul {
margin: 10px 0;
padding: 0;
}
#main li {
list-style-type: none;
display: inline-block;
}
#status {
display: inline-block;
}
#results>div {
display: inline-block;
width: 513px
}
.footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
color: black;
}
.footer-text {
max-width: 600px;
margin: auto;
}
/*
* The following loading spinner CSS is from SpinKit project
* https://github.com/tobiasahlin/SpinKit
*/
.sk-spinner-pulse {
width: 20px;
height: 20px;
margin: auto 10px;
float: left;
background-color: #333;
border-radius: 100%;
-webkit-animation: sk-pulseScaleOut 1s infinite ease-in-out;
animation: sk-pulseScaleOut 1s infinite ease-in-out;
}
@-webkit-keyframes sk-pulseScaleOut {
0% {
-webkit-transform: scale(0);
transform: scale(0);
}
100% {
-webkit-transform: scale(1.0);
transform: scale(1.0);
opacity: 0;
}
}
@keyframes sk-pulseScaleOut {
0% {
-webkit-transform: scale(0);
transform: scale(0);
}
100% {
-webkit-transform: scale(1.0);
transform: scale(1.0);
opacity: 0;
}
}
.spinner-text {
float: left;
}
</style>
</head>
<body>
<div id="loading">
<span id="status"></span>
<span class="sk-spinner sk-spinner-pulse"></span>
</div>
<div id='main'>
<div id='results' style='display:none'>
<div id="multi">
<h4>Pose Animator - Static Image Demo</h4>
<video id="video" playsinline style=" -moz-transform: scaleX(-1);
-o-transform: scaleX(-1);
-webkit-transform: scaleX(-1);
transform: scaleX(-1);
display: none;
">
</video>
<canvas class="detection-canvas"></canvas>
<canvas class="illustration-canvas"></cavnas>
</div>
</div>
</div>
<div class="footer">
<div class="footer-text">
<p>
Pose Animator runs TF.js <strong>FaceMesh</strong> and <strong>PoseNet</strong> models to animate SVG illustrations with camera feed / static images.<br>
It currently supports <strong>single-pose</strong>, <strong>single-face</strong> detection, and has been tested on Destkop Chrome & iOS Safari.
<br>
(PoseNet model config - MobileNet V1, output stride 16, quant bytes 2)
</p>
</div>
</div>
<script src="static_image.js"></script>
</body>
</html>