barakplasma/lingbot-map-long-video
Long-video 3D reconstruction with LingBot-Map: video in, bounded GLB point cloud + camera trajectory out. Community Cog wrapper of Robbyant/lingbot-map.
Run barakplasma/lingbot-map-long-video with an API
Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.
Input schema
The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.
| Field | Type | Default value | Description |
|---|---|---|---|
| video |
string
|
The video to reconstruct into a 3D point cloud. For anything larger than a few "
"seconds, pass a hosted URL rather than uploading the file directly.
|
|
| sample_fps |
number
|
5
Min: 0.25 Max: 30 |
How many frames per second to pull from the video. This is the main quality vs. "
"speed dial: higher values give the model more overlap to work with (denser, more accurate "
"geometry) but take longer and cost more. 5 suits a slow phone walkthrough; drop to 1-2 for "
"fast-moving or very long footage.
|
| max_points |
integer
|
3000000
Min: 10000 Max: 8000000 |
Upper bound on the number of points in the full-resolution scene.glb. Higher means "
"more detail and a larger file; lower keeps the download small. Points are spread evenly across "
"the video so no section is starved.
|
| max_preview_points |
integer
|
50000
Min: 1000 Max: 300000 |
Detail of the in-browser preview (scene_preview.glb) that renders in Replicate's "
"viewer. Each point becomes a small cube, so raising this sharpens the preview but enlarges the "
"file and slows loading on phones. The full-resolution scene.glb is unaffected.
|
| show_trajectory |
boolean
|
True
|
Draw the camera's path through the scene as a colored tube in both GLB files.
|
| confidence_percentile |
number
|
60
Max: 99 |
Advanced. Discards this percentage of the least-confident points in every frame "
"before export. Raise it to clean up noisy floaters and haze at the cost of some real geometry; "
"lower it to keep more points including uncertain ones.
|
| spatial_stride |
integer
|
4
Min: 1 Max: 16 |
Advanced. Keeps every Nth pixel in each direction when turning depth maps into "
"points (4 uses 1/16 of the pixels). Lower gives denser geometry and larger files; higher is "
"faster and lighter. Works together with max_points, which is the final ceiling.
|
| point_frame_stride |
integer
|
2
Min: 1 Max: 30 |
Advanced. Uses every Nth sampled frame for point geometry (2 = every other frame). "
"Camera poses are still recorded for every frame in trajectory.json; this only thins the points. "
"Raise it to lighten very long videos.
|
| max_frames |
integer
|
12000
Min: 2 Max: 30000 |
Advanced. Hard safety cap on total frames processed, applied uniformly across the "
"whole video. Acts as a backstop against runaway runtime on long footage; sample_fps usually "
"reaches the limit first.
|
| keyframe_interval |
integer
|
2
Min: 1 Max: 30 |
Advanced. Persists every Nth frame in the model's KV cache. Larger values save "
"memory on long, full-FPS footage (upstream suggests 8-12 there) at some accuracy cost; leave "
"at 2 for ordinary clips.
|
| window_size |
integer
|
128
Min: 16 Max: 256 |
Advanced. KV-cache slots per inference window (upstream long-video recommendation "
"is 128). Rarely needs changing unless you are tuning memory use.
|
| overlap_keyframes |
integer
|
8
Min: 2 Max: 32 |
Advanced. Number of keyframes shared between consecutive windows and macro-chunks "
"so their poses and depths align. More overlap improves alignment continuity but adds compute.
|
| chunk_frames |
integer
|
512
Min: 128 Max: 1536 |
Advanced. Largest number of dense prediction frames held in memory at once. Lower "
"it if a very long video runs out of memory; raise it for slightly better cross-chunk alignment "
"when memory allows.
|
{
"type": "object",
"title": "Input",
"required": [
"video"
],
"properties": {
"video": {
"type": "string",
"title": "Video",
"format": "uri",
"x-order": 0,
"description": "The video to reconstruct into a 3D point cloud. For anything larger than a few \"\n \"seconds, pass a hosted URL rather than uploading the file directly."
},
"max_frames": {
"type": "integer",
"title": "Max Frames",
"default": 12000,
"maximum": 30000,
"minimum": 2,
"x-order": 8,
"description": "Advanced. Hard safety cap on total frames processed, applied uniformly across the \"\n \"whole video. Acts as a backstop against runaway runtime on long footage; sample_fps usually \"\n \"reaches the limit first."
},
"max_points": {
"type": "integer",
"title": "Max Points",
"default": 3000000,
"maximum": 8000000,
"minimum": 10000,
"x-order": 2,
"description": "Upper bound on the number of points in the full-resolution scene.glb. Higher means \"\n \"more detail and a larger file; lower keeps the download small. Points are spread evenly across \"\n \"the video so no section is starved."
},
"sample_fps": {
"type": "number",
"title": "Sample Fps",
"default": 5,
"maximum": 30,
"minimum": 0.25,
"x-order": 1,
"description": "How many frames per second to pull from the video. This is the main quality vs. \"\n \"speed dial: higher values give the model more overlap to work with (denser, more accurate \"\n \"geometry) but take longer and cost more. 5 suits a slow phone walkthrough; drop to 1-2 for \"\n \"fast-moving or very long footage."
},
"window_size": {
"type": "integer",
"title": "Window Size",
"default": 128,
"maximum": 256,
"minimum": 16,
"x-order": 10,
"description": "Advanced. KV-cache slots per inference window (upstream long-video recommendation \"\n \"is 128). Rarely needs changing unless you are tuning memory use."
},
"chunk_frames": {
"type": "integer",
"title": "Chunk Frames",
"default": 512,
"maximum": 1536,
"minimum": 128,
"x-order": 12,
"description": "Advanced. Largest number of dense prediction frames held in memory at once. Lower \"\n \"it if a very long video runs out of memory; raise it for slightly better cross-chunk alignment \"\n \"when memory allows."
},
"spatial_stride": {
"type": "integer",
"title": "Spatial Stride",
"default": 4,
"maximum": 16,
"minimum": 1,
"x-order": 6,
"description": "Advanced. Keeps every Nth pixel in each direction when turning depth maps into \"\n \"points (4 uses 1/16 of the pixels). Lower gives denser geometry and larger files; higher is \"\n \"faster and lighter. Works together with max_points, which is the final ceiling."
},
"show_trajectory": {
"type": "boolean",
"title": "Show Trajectory",
"default": true,
"x-order": 4,
"description": "Draw the camera's path through the scene as a colored tube in both GLB files."
},
"keyframe_interval": {
"type": "integer",
"title": "Keyframe Interval",
"default": 2,
"maximum": 30,
"minimum": 1,
"x-order": 9,
"description": "Advanced. Persists every Nth frame in the model's KV cache. Larger values save \"\n \"memory on long, full-FPS footage (upstream suggests 8-12 there) at some accuracy cost; leave \"\n \"at 2 for ordinary clips."
},
"overlap_keyframes": {
"type": "integer",
"title": "Overlap Keyframes",
"default": 8,
"maximum": 32,
"minimum": 2,
"x-order": 11,
"description": "Advanced. Number of keyframes shared between consecutive windows and macro-chunks \"\n \"so their poses and depths align. More overlap improves alignment continuity but adds compute."
},
"max_preview_points": {
"type": "integer",
"title": "Max Preview Points",
"default": 50000,
"maximum": 300000,
"minimum": 1000,
"x-order": 3,
"description": "Detail of the in-browser preview (scene_preview.glb) that renders in Replicate's \"\n \"viewer. Each point becomes a small cube, so raising this sharpens the preview but enlarges the \"\n \"file and slows loading on phones. The full-resolution scene.glb is unaffected."
},
"point_frame_stride": {
"type": "integer",
"title": "Point Frame Stride",
"default": 2,
"maximum": 30,
"minimum": 1,
"x-order": 7,
"description": "Advanced. Uses every Nth sampled frame for point geometry (2 = every other frame). \"\n \"Camera poses are still recorded for every frame in trajectory.json; this only thins the points. \"\n \"Raise it to lighten very long videos."
},
"confidence_percentile": {
"type": "number",
"title": "Confidence Percentile",
"default": 60,
"maximum": 99,
"minimum": 0,
"x-order": 5,
"description": "Advanced. Discards this percentage of the least-confident points in every frame \"\n \"before export. Raise it to clean up noisy floaters and haze at the cost of some real geometry; \"\n \"lower it to keep more points including uncertain ones."
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
{
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"title": "Output"
}