-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgallery.html
More file actions
419 lines (372 loc) · 18 KB
/
Copy pathgallery.html
File metadata and controls
419 lines (372 loc) · 18 KB
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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>MegaSaM: Accurate, Fast and Robust Structure and Motion from Casual Dynamic Videos</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:image" content="https://mega-sam.github.io/megasam-logo.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1711">
<meta property="og:image:height" content="576">
<meta property="og:type" content="website" />
<meta property="og:url" content="https://mega-sam.github.io/" />
<meta property="og:title" content="MegaSaM: Accurate, Fast and Robust Structure and Motion from Casual Dynamic Video" />
<meta property="og:description"
content="We present a system that allows for accurate, fast, and robust estimation of camera parameters and depth maps from casual monocular videos of dynamic scenes. Most conventional structure from motion and monocular SLAM techniques assume input videos that feature predominantly static scenes with large amounts of parallax. Such methods tend to produce erroneous estimates in the absence of these conditions. Recent neural network-based approaches attempt to overcome these challenges; however, such methods are either computationally expensive or brittle when run on dynamic videos with uncontrolled camera motion or unknown field of view. We demonstrate the surprising effectiveness of a deep visual SLAM framework: with careful modifications to its training and inference schemes, this system can scale to real-world videos of complex dynamic scenes with unconstrained camera paths, including videos with little camera parallax. Extensive experiments on both synthetic and real videos demonstrate that our system is significantly more accurate and robust at camera pose and depth estimation when compared with prior and concurrent work, with faster or comparable running times." />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="MegaSaM: Accurate, Fast and Robust Structure and Motion from Casual Dynamic Videos" />
<meta name="twitter:description"
content="We present a system that allows for accurate, fast, and robust estimation of camera parameters and depth maps from casual monocular videos of dynamic scenes. Most conventional structure from motion and monocular SLAM techniques assume input videos that feature predominantly static scenes with large amounts of parallax. Such methods tend to produce erroneous estimates in the absence of these conditions. Recent neural network-based approaches attempt to overcome these challenges; however, such methods are either computationally expensive or brittle when run on dynamic videos with uncontrolled camera motion or unknown field of view. We demonstrate the surprising effectiveness of a deep visual SLAM framework: with careful modifications to its training and inference schemes, this system can scale to real-world videos of complex dynamic scenes with unconstrained camera paths, including videos with little camera parallax. Extensive experiments on both synthetic and real videos demonstrate that our system is significantly more accurate and robust at camera pose and depth estimation when compared with prior and concurrent work, with faster or comparable running times." />
<meta name="twitter:image" content="https://mega-sam.github.io/megasam-logo.png" />
<!-- <meta
http-equiv="Content-Security-Policy"
content="script-src-elem * 'self' 'unsafe-inline';" />-->
<link rel="icon" href="static/megasam-removebg-preview-notext.png">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.8.0/codemirror.min.css">
<link rel="stylesheet" href="static/css/app.css">
<link rel="stylesheet" href="static/css/fontawesome.all.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jpswalsh/academicons@1/css/academicons.min.css">
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-8ZERS5BVPS"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-8ZERS5BVPS');
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.8.0/codemirror.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.5.3/clipboard.min.js"></script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<script defer src="static/js/fontawesome.all.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script>
<script src="static/js/app.js"></script>
<script src="static/js/synced_video_selector.js"></script>
<style>
.final-element {
white-space: nowrap;
}
</style>
</head>
<body style="padding: 5%; padding-top: min(15px, 5%); width: 100%">
<div class="container-lg text-center" style="max-width: 100%; margin: auto;" id="main">
<!-- <div class="container" id="main"> -->
<div class="row">
<h2 class="col-md-12 text-center">
<span class="active3d"><b>MegaSaM</b></span><br>Accurate, Fast and Robust Structure and Motion from Casual Dynamic Videos</br>
</h2>
</div>
<div class="row text-center">
<div class="col-md-3">
</div>
<div class="is-size-5 publication-authors">
<span class="author-block">
<a href="https://zhengqili.github.io/">Zhengqi Li</a><sup>1</sup></span>    
<span class="author-block">
<a href="https://research.google/people/richardtucker/?&type=google">Richard Tucker</a><sup>1</sup>    
</span>
<span class="author-block">
<a href="https://research.google/people/forrestercole/">Forrester Cole</a> <sup>1</sup></span>    
</span>
<span class="author-block">
<a href="https://qianqianwang68.github.io/">Qianqian Wang</a><sup>1,2</sup></span>    
</span>
<span class="author-block">
<a href="https://jinlinyi.github.io/">Linyi Jin</a><sup>1,3</sup></span>    
</span>
<!-- <br> Removing the forced break so things flexibly resize more naturally for different window sizes-->
<span class="author-block">
<a href="https://people.eecs.berkeley.edu/~vye/">Vickie Ye</a><sup>2</sup></span>    
</span>
<span class="author-block">
<a href="https://people.eecs.berkeley.edu/~kanazawa/">Angjoo Kanazawa</a><sup>2</sup></span>    
</span>
<span class="author-block">
<a href="https://holynski.org/">Aleksander Holynski</a><sup>1,2</sup></span>    
</span>
<span class="author-block">
<a href="https://www.cs.cornell.edu/~snavely/">Noah Snavely</a><sup>1</sup>
</span>
</div>
<div class="is-size-5 publication-authors">
<span class="author-block"><sup>1</sup>Google DeepMind </span>
    
<span class="author-block"><sup>2</sup>UC Berkeley </span>
    
<span class="author-block"><sup>3</sup>University of Michigan </span>
</div>
</div>
<div class="row text-center">
<span class="link-block" style="padding-top: 10px; padding-bottom: 10px">
<a href="https://arxiv.org/abs/2412.04463" class="external-link button is-normal is-rounded is-dark"
style="width: 80px; font-size: 15px">
<span class="icon">
<i class="ai ai-arxiv"></i>
</span>
<span>arXiv</span>
</a>
<a href="index.html" class="external-link button is-normal is-rounded is-dark"
style="width: 120px; font-size: 15px">
<span>Project Page</span>
</a>
</span>
</div>
<div class="container video-gallery" id="videoGallery" style="max-width: 100%;">
<!-- Thumbnails -->
<div id="thumbnails" class="card-columns captioned_videos list"></div>
</div>
<script src="static/js/stopExecutionTimeout.js"></script>
<script src="https://polyfill.io/v3/polyfill.js?features=IntersectionObserver"></script>
<script src="static/js/yall.js"></script>
<script>
if (document.location.search.match(/type=embed/gi)) {
window.parent.postMessage("resize", "*");
}
/*
const bucket = "https://storage.googleapis.com/gallery_videos/v0"
async function listFolders() {
// Interacting with the google cloud storage APIS requires full on node installatiosn and such so meh, just parse the returned XML :)
let xmlDoc = await fetch(bucket).then(response => response.text()).then(xmlString => {
const parser = new DOMParser();
const xmlDoc = parser.parseFromString(xmlString, 'text/xml');
return xmlDoc;
}).catch(error => {
console.error('Error:', error);
});
const contentsElements = xmlDoc.getElementsByTagName('Contents');
let nodeArray = [].slice.call(contentsElements);
function xmlToKey(folder) {
let key = folder.getElementsByTagName("Key")[0].textContent;
let parts = key.split("/");
return parts[0] + "/" + parts[1];
}
const keys = [...new Set(nodeArray.map(f => xmlToKey(f)))];
return keys.filter(f => f.includes(".mp4"))
}
let files = listFolders();
console.log(files)
console.log("hello")*/
const shuffleArray = array => {
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
const temp = array[i];
array[i] = array[j];
array[j] = temp;
}
}
var videoPaths = [
"1076859440_sgd_cvd_hr.mp4",
"2796077-uhd_3840_2160_25fps_sgd_cvd_hr.mp4",
"5534310-hd_1080_1920_30fps_sgd_cvd_hr.mp4",
"5739690-hd_1920_1080_24fps_sgd_cvd_hr.mp4",
"F_165554287_XjE70kEJDhrciruRSCTmjcs6Z28xtu8G_sgd_cvd_hr.mp4",
"PXL_20221028_213745015.TS_i1_sgd_cvd_hr.mp4",
"VID_20200902_173923_i1_sgd_cvd_hr.mp4",
"alley_1_sgd_cvd_hr.mp4",
"alley_2_sgd_cvd_hr.mp4",
"ambush_4_sgd_cvd_hr.mp4",
"ambush_5_sgd_cvd_hr.mp4",
"backpack_sgd_cvd_hr.mp4",
"bamboo_2_sgd_cvd_hr.mp4",
"bear_sgd_cvd_hr.mp4",
"bike-packing_sgd_cvd_hr.mp4",
"bmx-trees_ours-align.mp4",
"breakdance-flare_sgd_cvd_hr.mp4",
"breakdance_sgd_cvd_hr.mp4",
"butterfly_sgd_cvd_hr.mp4",
"camel_sgd_cvd_hr.mp4",
"car-roundabout_sgd_cvd_hr.mp4",
"car-shadow_sgd_cvd_hr.mp4",
"car-turn_sgd_cvd_hr.mp4",
"cat-girl_sgd_cvd_hr.mp4",
"cat-piano_sgd_cvd_hr.mp4",
"cat-spinning_sgd_cvd_hr.mp4",
"cat-walk-right_sgd_cvd_hr.mp4",
"cat-walking_sgd_cvd_hr.mp4",
"child-field_sgd_cvd_hr.mp4",
"cows_sgd_cvd_hr.mp4",
"creeper_sgd_cvd_hr.mp4",
"dog-agility_sgd_cvd_hr.mp4",
"dog-gooses_sgd_cvd_hr.mp4",
"dog-rotation-vase_sgd_cvd_hr.mp4",
"dogs-scale_sgd_cvd_hr.mp4",
"drift-chicane_sgd_cvd_hr.mp4",
"drone_sgd_cvd_hr.mp4",
"elephant_sgd_cvd_hr.mp4",
"goat_sgd_cvd_hr.mp4",
"handwavy_sgd_cvd_hr.mp4",
"horsejump-high_sgd_cvd_hr.mp4",
"italian-pup_sgd_cvd_hr.mp4",
"judo_sgd_cvd_hr.mp4",
"kid-running_sgd_cvd_hr.mp4",
"lab-coat_sgd_cvd_hr.mp4",
"libby_sgd_cvd_hr.mp4",
"loading_sgd_cvd_hr.mp4",
"market_5_sgd_cvd_hr.mp4",
"mochi-high-five_sgd_cvd_hr.mp4",
"motorbike_sgd_cvd_hr.mp4",
"mountain_1_sgd_cvd_hr.mp4",
"paper-windmill_sgd_cvd_hr.mp4",
"parkour_sgd_cvd_hr.mp4",
"pigeon_sgd_cvd_hr.mp4",
"pillow_sgd_cvd_hr.mp4",
"rallye_sgd_cvd_hr.mp4",
"rhino_sgd_cvd_hr.mp4",
"rice-field_sgd_cvd_hr.mp4",
"rollerblade_sgd_cvd_hr.mp4",
"s_101_outdoor_walking_backward_dancing_person_daytime_sgd_cvd_hr.mp4",
"schoolgirls_sgd_cvd_hr.mp4",
"scooter-gray_sgd_cvd_hr.mp4",
"seal_sgd_cvd_hr.mp4",
"shaman_3_sgd_cvd_hr.mp4",
"shutterstock_1038326681_i1_sgd_cvd_hr.mp4",
"shutterstock_1058262031_i1_sgd_cvd_hr.mp4",
"skiing_sgd_cvd_hr.mp4",
"sleeping_1_sgd_cvd_hr.mp4",
"soapbox_sgd_cvd_hr.mp4",
"spin_mon.mp4",
"spin_sgd_cvd_hr.mp4",
"sriracha-tree_sgd_cvd_hr.mp4",
"swing_sgd_cvd_hr.mp4",
"teddy_sgd_cvd_hr.mp4",
"tennis_sgd_cvd_hr.mp4",
"tiger_sgd_cvd_hr.mp4",
"tractor-sand_sgd_cvd_hr.mp4",
"varanus-cage_sgd_cvd_hr.mp4",
];
const omitPhrases = [
'cat3d_tags',
];
var intervalId = window.setInterval(function(){
document.querySelectorAll('video').forEach(vid => vid.play());
}, 1000);
shuffleArray(videoPaths);
// document.addEventListener("DOMContentLoaded", function() {
var thumbnails = document.getElementById("thumbnails");
var isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
for (var i = 0; i < videoPaths.length; i++) {
var outer = document.createElement("DIV");
outer.classList = "thumbnail outer card";
var inner = document.createElement("DIV");
inner.style.padding = "5px";
inner.classList = "inner card-body";
let videoPath = videoPaths[i];
let caption = videoPath.replace('.mp4', "").replace("cat3d_tags", " ").replaceAll("_", " ");
// let captionShort = caption;
// for (let i = 0; i < omitPhrases.length; i++) {
// captionShort = captionShort.replace(omitPhrases[i], '[...]');
// }
let captionShort = ""
var componentVideo = document.createElement("VIDEO");
componentVideo.loop = true;
componentVideo.playsinline = true;
// componentVideo.preload = "metadata";
componentVideo.muted = true;
//componentVideo.width = "333";
componentVideo.style.width = "100%"
componentVideo.autoplay = true;
if (isIOS) {
// Autoplay doesn't seem to work.
componentVideo.classList = "video";
componentVideo.src = './static/videos/gallery/codec/' + videoPath;
componentVideo.controls = false;
} else {
componentVideo.controls = false;
componentVideo.classList = "video lazy";
//componentVideo.onmouseout = componentVideo.play;
//componentVideo.onmouseover = componentVideo.pause;
componentVideo.onmousemove= componentVideo.play;
componentVideo.onmouseout = componentVideo.play;
componentVideo.onkeyup = componentVideo.play;
componentVideo.onmouseover = componentVideo.play;
componentSource = document.createElement("SOURCE")
componentSource.type = "video/mp4"
componentSource.setAttribute('data-src',
"./static/videos/gallery/codec/" + videoPath);
componentVideo.appendChild(componentSource);
}
inner.appendChild(componentVideo);
var fullCaption = document.createElement("span");
fullCaption.classList = "name invisible";
fullCaption.style.display = "none";
fullCaption.style.fontSize = "3px";
fullCaption.appendChild(document.createTextNode(caption))
inner.appendChild(fullCaption);
var componentCaption = document.createElement("h6");
componentCaption.classList = "caption";
componentCaption.title = caption;
componentCaption.appendChild(document.createTextNode(captionShort));
//inner.appendChild(componentCaption);
outer.appendChild(inner);
thumbnails.appendChild(outer);
}
if (!isIOS) {
yall({
observeChanges: false
});
}
// }
</script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/list.js/1.2.0/list.min.js'></script>
<script id="rendered-js" >
$(function () {
// Search
var options = {
valueNames: ['name', 'category'] };
var videoList = new List('videoGallery', options);
function debounced(delay, fn) {
// https://jsfiddle.net/foxbunny/rL68o4ef/?utm_source=website&utm_medium=embed&utm_campaign=rL68o4ef.
let timerId;
return function (...args) {
if (timerId) {
clearTimeout(timerId);
}
timerId = setTimeout(() => {
fn(...args);
timerId = null;
}, delay);
}
}
$("#search").change(debounced(1000, function () {
// smooth scroll to thumbnails
$('html, body').animate({
scrollTop: $("#thumbnails").offset().top - 60 },
1000);
}));
// Filter
$('#filter').change(function () {
var selection = this.value;
if (selection) {
videoList.filter(function (item) {
return item.values().category == selection;
});
} else {
videoList.filter();
}
});
});
//Get URL query string
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {if (window.CP.shouldStopExecution(0)) break;
var pair = vars[i].split("=");
if (pair[0] == variable) {return pair[1];}
}window.CP.exitedLoop(0);
return false;
}
// Get URL query string variables
var id = getQueryVariable("id");
var title = getQueryVariable("title");
</script>
</body>
</html>