forked from seanbell/opensurfaces-segmentation-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
495 lines (445 loc) · 18 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
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<title>OpenSurfaces - A Richly Annotated Catalog of Surface Appearance</title>
<meta name="description" content='OpenSurfaces is a large database of annotated surfaces created from real-world consumer photographs. Our annotation framework draws on crowdsourcing to segment surfaces from photos, and then annotate them with rich surface properties, including material, texture and contextual information.'/>
<meta name="author" content="Cornell University"/>
<!-- merged css -->
<link href="/static/css/opensurfaces-segmentation-ui.css" rel="stylesheet" type="text/css" />
<style>
canvas { border: 1px solid #969696; }
body { padding: 0 }
</style>
</head>
<body data-spy="scroll" data-target=".navbar" data-offset="50">
<!-- BEGIN MAIN UI -->
<div id='content-container'>
<div id="mt-top-nohover">
<div id="mt-instructions">
<span>
Instructions: carefully trace around regions that have a single material or texture.
Draw <span id="mt-num-shapes">six polygons</span> to complete the task.
</span>
<span class="pull-right">
<button type="button" id='btn-submit' class="btn btn-primary" disabled="disabled">Submit</button>
</span>
</div>
<div id="ui-controls" class="ui-controls-top">
<span class="btn-group" data-toggle="buttons-radio">
<button id='btn-draw' type="button" class="btn" disabled="disabled">
<i class="icon-pencil"></i> Draw (D)</button>
<button id='btn-edit' type="button" class="btn" disabled="disabled">
<i class="icon-move"></i> Adjust (A)</button>
</span>
<span class="btn-group">
<button id='btn-undo' type="button" disabled="disabled" class="btn">
<i class="icon-circle-arrow-left"></i> Undo (Ctrl-Z)</button>
<button id='btn-redo' type="button" disabled="disabled" class="btn">
<i class="icon-circle-arrow-right"></i> Redo (Ctrl-Y)</button>
</span>
<span class="btn-group">
<button id='btn-close' type="button" disabled="disabled" class="btn">
<i class="icon-ok-sign"></i> Close (Right-click)</button>
<button id='btn-delete' type="button" disabled="disabled" class="btn">
<i class="icon-remove"></i> Delete (Delete)</button>
</span>
<span class="btn-group">
<button id='btn-zoom-reset' type="button" disabled="disabled" class="btn">
<i class="icon-resize-small"></i> Reset Zoom (Esc)</button>
</span>
<span class="pull-right">
<a href="#modal-instructions" role="button" class="btn btn-warning" data-toggle="modal">Instructions</a>
</span>
</div>
</div>
<div id="mt-container"></div>
</div>
<!-- END MAIN UI -->
<!-- BEGIN MODALS -->
<!-- Instructions dialog -->
<div class="modal hide fade" id="modal-instructions" tabindex="-1" role="dialog"
aria-labelledby="modal-instructions-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×</button>
<h3 id="modal-instructions-label">Instructions</h3>
</div>
<div class="modal-body">
<div class="container-fluid">
<h2>What to draw</h2> <p>Please draw shapes around regions that have a
<i>single</i> material or texture. Some example materials: wood, steel,
bricks, tiles, ceramic, plastic. If you don't know what to draw, floors,
walls, and countertops are usually one material -- just be careful to exclude
things on top.</p>
<p>Please make the region as tight as possible. <b>Your shape should exactly
follow the material boundary.</b> Use the "adjust" button (or
press 'A') to improve the shape boundary.</p>
<p>If there is something like a brick wall or tiled floor, please include all
the tiles; do not draw a square around one tile. Large regions are
preferable.</p>
<p>Example: if a wood cabinet has a metal handle, then the metal portion is a
different material and should be excluded. If you are drawing a shape around a
person, their skin and clothing should not be in two different shapes. You can
also exclude regions by overlapping shapes. See the below examples.</p>
<p>Draw six polygons to complete
the task.</p>
<br/>
<h2>Good examples</h2>
<div class="row-fluid">
<div class="span4">
<div class="thumbnail">
<img src="/static/img/good5.jpg" alt="" />
<p class="caption">Large flat regions are preferable, though not necessary.</p>
</div>
</div>
<div class="span4">
<div class="thumbnail">
<img src="/static/img/good4.jpg" alt="" />
<p class="caption">Make the boundary as tight as possible.</p>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span4">
<div class="thumbnail">
<img src="/static/img/good12.jpg" alt="" />
<p class="caption">Be careful to not include items of a different material.</p>
</div>
</div>
<div class="span4">
<div class="thumbnail">
<img src="/static/img/good11.jpg" alt="" />
<p class="caption">Shapes can be nested.</p>
</div>
</div>
<div class="span4">
<div class="thumbnail">
<img src="/static/img/good9.jpg" alt="" />
<p class="caption">Shapes can intersect.</p>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<div class="thumbnail">
<img src="/static/img/segment_material_good2.jpg" alt="" />
<p class="caption">Please do not draw around individual bricks; draw a shape around larger wall portions.</p>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<div class="thumbnail">
<img src="/static/img/segment_material_good1.jpg" alt="" />
</div>
</div>
</div>
<br/>
<h2>Bad examples</h2>
<p>We will reject HITs that do not follow these instructions.</p>
<div class="row-fluid">
<div class="span6">
<div class="thumbnail">
<img src="/static/img/segment_material_bad1.jpg" alt="" />
<p class="caption">These are sloppy shapes.</p>
</div>
</div>
<div class="span6">
<div class="thumbnail">
<img src="/static/img/segment_material_bad2.jpg" alt="" />
<p class="caption">Please do not do this.</p>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span6">
<div class="thumbnail">
<img src="/static/img/segment_material_bad3.jpg" alt="" />
<p class="caption">Please make the regions bigger than this.</p>
</div>
</div>
<div class="span6">
<div class="thumbnail">
<img src="/static/img/segment_material_bad4.jpg" alt="" />
<p class="caption">These shapes contain multiple materials and are nowhere near the correct boundaries.</p>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span4">
<div class="thumbnail">
<img src="/static/img/bad1.jpg" alt="" />
<p class="caption">This shape includes more than one type of material.</p>
</div>
<br/>
<div class="thumbnail">
<img src="/static/img/bad4.jpg" alt="" />
<p class="caption">This includes other objects; the other objects should have shapes around them.</p>
</div>
</div>
<div class="span4">
<div class="thumbnail">
<img src="/static/img/bad6.jpg" alt="" />
<p class="caption">This includes the edges of other objects.</p>
</div>
<br/>
<div class="thumbnail">
<img src="/static/img/bad3.jpg" alt="" />
<p class="caption">This shape is too sloppy.</p>
</div>
</div>
<div class="span4">
<div class="thumbnail">
<img src="/static/img/bad5.jpg" alt="" />
<p class="caption">This contains more than one type of material.</p>
</div>
<br/>
<div class="thumbnail">
<img src="/static/img/bad2.jpg" alt="" />
<p class="caption">This contains many substances.</p>
</div>
</div>
</div>
<br/>
<h2>How to draw</h2>
<div class="row-fluid">
<div class="span12">
<ul class="thumbnails">
<li class="span4"> <div class="thumbnail"><p class="caption">
<span class="badge">1</span> Click on the material boundary.</p>
<img src="/static/img/draw1.jpg" alt=""></div> </li>
<li class="span4"> <div class="thumbnail"><p class="caption">
<span class="badge">2</span> Continue clicking along the boundary.</p>
<img src="/static/img/draw5.jpg" alt=""></div> </li>
<li class="span4"> <div class="thumbnail"><p class="caption">
<span class="badge">3</span> Right-click to close the polygon.</p>
<img src="/static/img/draw6.jpg" alt=""></div> </li>
</ul>
</div>
</div>
<p>To close the shape, you do not need to click near the first point. You can
right-click to connect the first and last point.</p>
<h2>Adjust your shapes</h2>
<p>After drawing a polygon, please adjust its edges so that it better fits the true boundary.
When you are done adjusting, switch back to "Draw" mode to draw more polygons.</p>
<p>You can press the D and A key to quickly switch modes.</p>
<div class="row-fluid">
<div class="span12">
<ul class="thumbnails">
<li class="span4"> <div class="thumbnail"><p class="caption">
<span class="badge">1</span> Switch to "Adjust" mode.</p>
<img src="/static/img/adjust0.jpg" alt=""></div> </li>
<li class="span4"> <div class="thumbnail"><p class="caption">
<span class="badge">2</span> Click on the polygon.</p>
<img src="/static/img/adjust1.jpg" alt=""></div> </li>
<li class="span4"> <div class="thumbnail"><p class="caption">
<span class="badge">3</span> Drag the small white circles.</p>
<img src="/static/img/adjust2.jpg" alt=""></div> </li>
</ul>
</div>
</div>
<h2>Zoom in to see better</h2>
<p>Scroll with the mouse wheel to zoom in. Click "Reset Zoom" or press escape to reset back to normal.</p>
<br/>
<h2>Move around in the image</h2>
<p>Press 'space' and drag with the mouse to move around in the image (panning). You can also move press the arrow keys to move.</p>
<br/>
<h2>Other controls</h2>
<div class="row-fluid">
<div class="span12">
<img src="/static/img/controls.jpg" alt="" />
</div>
</div>
<div class="row-fluid">
<div class="span12">
<dl class="dl-horizontal">
<dt>Undo</dt> <dd>If you make a mistake, click "Undo" or press Ctrl-Z.</dd>
<dt>Redo</dt> <dd>You can also re-do an action with Ctrl-Y.</dd>
<dt>Close</dt> <dd>To close a polygon, right-click on the image or you can click the "Close" button.</dd>
<dt>Delete</dt> <dd>You can delete polygons by selecting them with the "Adjust" button and pressing delete.</dd>
<dt>Reset Zoom</dt> <dd>When zoomed in, you you can click "Reset Zoom" to zoom out again.</dd>
<dt>Instructions</dt> <dd>Show this page during the task.</dd>
</dl>
</div>
</div>
<br/>
<h2>Mirrors and windows</h2>
<p>If there is a mirror, draw a shape around the mirror surface itself, not the
things that you can see in the reflection. Similarly, draw a shape around the
window glass, and not the things you can see through the window.</p>
<br/>
<h2>Why are we doing this?</h2>
<p>We are building a database of materials from images on the web. This is part of ongoing research at Cornell University.</p>
<p>Thank you for participating!</p>
<br/>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</div>
<!-- Loading bar -->
<div class="modal hide fade" id="modal-loading" tabindex="-1" role="dialog" aria-labelledby="modal-loading-label" aria-hidden="true">
<div class="modal-header">
<h3 id="modal-loading-label"></h3>
</div>
<div class="modal-body">
<div class="progress progress-striped active">
<div class="bar" style="width: 100%;">Please Wait</div>
</div>
</div>
</div>
<!-- Error message -->
<div class="modal hide fade" id="modal-error" tabindex="-1" role="dialog" aria-labelledby="modal-error-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="modal-error-label">Error!</h3>
</div>
<div class="modal-body">
<div id="modal-error-message">
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">OK</button>
</div>
</div>
<!-- Are you sure question -->
<div class="modal hide fade" id="modal-areyousure" tabindex="-1" role="dialog"
aria-labelledby="modal-areyousure-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="modal-areyousure-label">Are you sure?</h3>
</div>
<div class="modal-body">
<p id="modal-areyousure-message"></p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true" id="modal-areyousure-no">No</button>
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true" id="modal-areyousure-yes">Yes</button>
</div>
</div>
<!-- Feedback survey -->
<div class="modal hide fade" id="modal-feedback" tabindex="-1" role="dialog"
aria-labelledby="modal-feedback-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×</button>
<h3 id="modal-feedback-label">Feedback</h3>
</div>
<div class="modal-body">
<div id="modal-feedback-prompt"></div>
<form id='modal-feedback-form' class='form-horizontal'>
<div class="control-group">
<label class="control-label" for="feedback-thoughts">What did you think of this task?</label>
<div class="controls">
<textarea id="feedback-thoughts" rows="6"></textarea>
</div>
</div>
<div class="control-group">
<label class="control-label" for="feedback-understand">What parts didn't you understand?</label>
<div class="controls">
<textarea id="feedback-understand" rows="6"></textarea>
</div>
</div>
<div class="control-group">
<label class="control-label" for="feedback-other">Any other feedback, improvements, or suggestions?</label>
<div class="controls">
<textarea id="feedback-other" rows="6"></textarea>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true" id="modal-feedback-cancel">Cancel</button>
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true" id="modal-feedback-submit">Submit</button>
</div>
</div>
<!-- Script for feedback survey -->
<script type="text/javascript">
window.show_modal_feedback = function(label_message, prompt_message, on_submit) {
$('#modal-feedback-label').empty();
$('#modal-feedback-bonus').empty();
$('#modal-feedback-prompt').empty();
if (label_message !== undefined) {
$('#modal-feedback-label').html(label_message);
}
if (prompt_message !== undefined) {
$('#modal-feedback-prompt').html(prompt_message);
}
$('#modal-feedback').modal('show');
if (on_submit !== undefined) {
$('#modal-feedback-submit').off('click').on('click', on_submit);
}
};
window.get_modal_feedback = function() {
var feedback = {};
var names = ['thoughts', 'understand', 'other'];
for (var i = 0; i < names.length; i++) {
var value = $.trim($('#feedback-' + names[i]).val());
if (value) {
feedback[names[i]] = value;
}
}
return feedback;
};
</script>
<!-- Message about valid polygons -->
<div class="modal hide fade" id="poly-modal-intersect" tabindex="-1" role="dialog"
aria-labelledby="modal-intersect-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×</button>
<h3 id="poly-modal-intersect-label">Not a valid polygon!</h3>
</div>
<div class="modal-body">
<p>Polygons must contain at least
<strong>four</strong>
points and cannot intersect themselves. Try adding more points so
that the first and last point can connect.</p>
<div class="thumbnail span2">
<img src="/static//img/bad-close.jpg" alt=""/>
<p class="mt-caption">This polygon cannot close.</p>
</div>
<div class="thumbnail span2">
<img src="/static//img/bad-vertex.jpg" alt=""/>
<p class="mt-caption">This edge cannot be added.</p>
</div>
<div class="thumbnail span2">
<img src="/static//img/good-close.jpg" alt=""/>
<p class="mt-caption">This polygon can be closed.</p>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">OK</button>
</div>
</div>
<!-- END MODALS -->
<!-- BEGIN MAIN SCRIPTS -->
<script type="text/javascript">
/* photo_url: URL of the photo to be shown
photo_id: database ID of the photo being segmented. The results
will be returned in a JSON object with the format:
{"photo_id": [[x1,y1,x2,y2,...], [x1,y1,x2,y2,...]]}
otherwise, photo_id is not used.
*/
window.template_args = {
photo_url: 'http://farm9.staticflickr.com/8204/8177262167_d749ec58d9_h.jpg',
photo_id: 1,
};
// the user must submit this many shapes before they may submit:
window.min_shapes = 6;
// each polygon must have at least this many vertices:
window.min_vertices = 4;
// if true, show a popup survey at the end of the task
window.ask_for_feedback = true;
// amount of money (bonus) promised for completing the survey
window.feedback_bonus = '$0.02';
</script>
<!-- merged javascript libraries and compiled coffeescript -->
<script type="text/javascript" src="/static/js/opensurfaces-segmentation-ui.js"></script>
<!-- END MAIN SCRIPTS -->
</body>
</html