-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
182 lines (165 loc) Β· 5.67 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Mountain vs Beach Classifier | Anh-Thi DINH</title>
<meta name="viewport" content="width=device-width" />
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css">
<link rel="stylesheet" href="src/custom.css">
</head>
<body>
<main role="main" class="container">
<div class="row justify-content-center">
<div class="col-md-8 col-12">
<div class="heading">
<div class="logo">
<img src="img/favicon.png">
</div>
<h1>Mountain vs Beach Classifier</h1>
<p class="intro">
Hello, I'm a classifier. π€<br />
I can tell you whether an image you indicate is <b>a mountain</b> β°οΈ or <b>a beach</b> ποΈ or <b>their
related</b> things π π³ (ocean, sea, forest, mainland,...).
</p>
<div class="buttons text-center">
<a class="btn btn-success btn-sm" target="_blank"
href="https://github.com/dinhanhthi/interview-mountain-vs-beach/tree/main/documentation">
<i class="bi bi-journals"></i> Documentation
</a>
<a class="btn btn-danger btn-sm" target="_blank"
href="https://github.com/dinhanhthi/interview-mountain-vs-beach">
<i class="bi bi-github"></i> Github
</a>
</div>
</div>
<div id="loader">
<p>Loading the trained model, please wait around <b>40 seconds (max)</b>.<br />
Don't worry, you <b>only</b> have to wait <b>once</b>! The next time you load the page, it's quick!</p>
<div class="progress">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="0"
aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>
</div>
</div>
<div id="classifier">
<div id="main-img">
<img onerror="handleErrImg()" />
<div id="img-text-predict">image to be predicted</div>
</div>
<!-- result -->
<div id="predict-loader">
<div class="spinner-border text-success" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<span> predicting...</span>
</div>
<div id="result" class="result">
<p>No result yet!</p>
</div>
<!-- list of buttons -->
<div class="button-row">
<!-- buttons -->
<div class="buttons text-center">
<label class="btn btn-primary btn-sm" for="my-file-selector">
<input id="my-file-selector" type="file" class="d-none" onchange="changeImage()"
accept="image/jpeg, image/png">
<i class="bi bi-upload"></i> Upload your own image
</label>
<label class="btn btn-warning btn-sm" for="predict">
<input id="predict" type="button" class="d-none" onclick="">
<i class="bi bi-cpu"></i> Predict
</label>
<div class="guide">(You may wait 7s for the first time you click on "Predict")</div>
</div>
</div>
</div>
</div>
</div>
<div id="list-imgs" class="row justify-content-center">
<div class="col-12 col-md-8">
<div class="alert alert-warning text-center" role="alert">
I'm a classifier, not a recognizer. <br >
You cannot ask me to classify an image not having any of mountain or beach in it. <br >
Most of "unacceptable" images will be classified as "beach". Don't blame me! π
</div>
</div>
<div class="col-12">
<p class="text-center">You can choose below images for a quick test.</p>
</div>
<div class="col-md-3 col-6">
<div class="item">
<img src="img/list_imgs/b1.jpg" />
</div>
</div>
<div class="col-md-3 col-6">
<div class="item">
<img src="img/list_imgs/b2.jpg" />
</div>
</div>
<div class="col-md-3 col-6">
<div class="item">
<img src="img/list_imgs/b3.jpg" />
</div>
</div>
<div class="col-md-3 col-6">
<div class="item">
<img src="img/list_imgs/b4.jpg" />
</div>
</div>
<div class="col-md-3 col-6">
<div class="item">
<img src="img/list_imgs/b5.jpg" />
</div>
</div>
<div class="col-md-3 col-6">
<div class="item">
<img src="img/list_imgs/b6.jpg" />
</div>
</div>
<div class="col-md-3 col-6">
<div class="item">
<img src="img/list_imgs/m1.jpg" />
</div>
</div>
<div class="col-md-3 col-6">
<div class="item">
<img src="img/list_imgs/m2.jpg" />
</div>
</div>
<div class="col-md-3 col-6">
<div class="item">
<img src="img/list_imgs/m3.jpg" />
</div>
</div>
<div class="col-md-3 col-6">
<div class="item">
<img src="img/list_imgs/m4.jpg" />
</div>
</div>
<div class="col-md-3 col-6">
<div class="item">
<img src="img/list_imgs/m5.jpg" />
</div>
</div>
<div class="col-md-3 col-6">
<div class="item">
<img src="img/list_imgs/m6.jpg" />
</div>
</div>
</div>
<div class="col-12 mt-3">
<p class="text-center">
Made with β€οΈ by <a href="https://dinhanhthi.com" target="_blank">Thi</a> for an interview test of <a
href="http://ideta.io/">Ideta company</a>.
</p>
</div>
</main>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@2.0.0/dist/tf.min.js"></script>
<script src="src/index.js"></script>
</body>
</html>