Depth estimation: the axis a flat video hides
A video is flat, so movement straight toward or away from the camera barely shows up as movement on screen. Depth estimation for funscripts fills that gap: AutoScript Sync runs a MiDaS model on your PC that estimates how near each part of the frame is, and follows how that changes in the moving region. The result is one more candidate position signal. Depth is optional, and the script is still built on optical flow.
Checked against the app's code on 21 September 2026.
Why depth matters
Optical flow measures how things move across the picture: up, down, left, right. When a stroke runs along the camera's line of sight, as in point-of-view footage, the moving object mostly grows and shrinks rather than travelling across the frame. Flow sees very little of that. A depth model reads the same frames as near and far, so a stroke along that axis shows up as a change in depth instead.
Which MiDaS model is used
AutoScript Sync uses MiDaS v2.1 depth models in ONNX form. They give relative depth, meaning nearer and further within one picture, not distances in centimetres.
| Model | Size | Used |
|---|---|---|
| MiDaS small | ~64 MB | Fast and Balanced, and every tier on a CPU. The default download. |
| MiDaS large | ~397 MB | High, on a CUDA GPU only, if you have downloaded it. A GPU is advised. |
That choice is made by Auto-pick model tier from Accuracy, which is on by default, and it can only choose a model already installed. The engine accepts any relative-depth ONNX model you point it at, but MiDaS is the only one the app offers to download.
How depth becomes a signal
Depth is inferred on every second sampled frame, on the 320 px wide analysis image, and averaged over the pixels that are actually moving inside the tracked region. The result joins the region centre and pose keypoints as a candidate anchor for the position trace. If the depth model takes more than 3 seconds a frame, the engine switches depth off for the rest of that run rather than let one slow model hold up the whole job.
One depth scale per video, not per frame
A depth model's output has no fixed units: each frame comes back on its own scale. If every frame is normalised on its own, the scale itself shifts from frame to frame, and that shift looks like movement. AutoScript Sync instead sets one scale for the whole video, from robust percentiles of the depth readings, so a change in the number means a change in the scene.
| Measure | Scaled per frame | Scaled per video |
|---|---|---|
| Frame-to-frame correlation of depth changes | 0.594 | 0.963 |
| Steps with a spurious direction flip | 42% | 2% |
This is a narrow engineering measurement against the model's raw output, taken by the developer on 10 September 2026. It shows that per-video scaling stops the depth signal contradicting itself; it is not a measure of how accurate the finished script is.
Settings that shape depth
Two sliders in the stroke settings have depth in their name. Only Depth priority changes the analysis; Depth emphasis shapes stroke length on the way to a device and does not involve the MiDaS model. Neither switches the depth model on or off; that depends on whether a depth model is installed and chosen.
- Depth priority
- 30 to 90, default 85. It sets how much of the position trace comes from measured velocity rather than the position anchor that depth is one candidate for: the higher the value, the less weight the anchor gets. The app's own tooltip describes velocity as carrying stroke size and the anchor as stopping drift but flattening depth, and suggests lowering it to 45–65 if a script feels busy or over-deep. It changes the analysis, so it needs a regenerate.
- Depth emphasis
- 100% to 200%, default 100% (neutral). Deep strokes travel proportionally further. It shapes the copy sent to a device, so re-send the script after changing it; the saved file is not changed. In the released app this device shaping applies to the Autoblow AI Ultra upload; applying it to Intiface devices, and baking it into Export Script (as played), comes in the next update.
What depth costs
Depth runs on an NVIDIA GPU through CUDA when one is available, and on the CPU otherwise; the app reports which it is actually using. A code comment from the RTX 5080 test PC puts MiDaS small at about 25.8 ms per call on the GPU against 234 ms on the CPU. Running it on every second sampled frame rather than every one halves that work. On the GPU, the depth model's CUDA memory pool is capped at 4 GB.
We have not published what share of a whole analysis depth takes, because no measurement table stands behind the working estimate. The benchmarks page lists what has been measured.
Limits
- Relative, not absolute. MiDaS says nearer or further, not how far. Stroke size still comes from the fused trace, not from depth alone.
- Averaged over the moving region. Depth is averaged over every moving pixel in the tracked region, so other movement inside it is averaged in with the stroke. Drawing your own region with Set Motion Region… or Live Track narrows it.
- Heavier is not proven better. No comparison of MiDaS small against MiDaS large on stroke accuracy has been recorded.
- Stroke size is still a weakness. Against the developer's hand-scripted test clips, the engine's strokes on the two fastest films were a quarter and a half of the human's size. There is no committed measurement of depth error in absolute units.
Questions
Do I need a depth model?
No. Without one the engine works from optical flow, the region centre and pose if installed. MiDaS small is downloaded automatically unless you switch automatic downloads off.
Should I get MiDaS large?
Only if you run High on an NVIDIA GPU; it is not used on a CPU or at the other tiers. We have not measured whether it produces better scripts than MiDaS small.
A script feels too deep or too busy. Is that depth?
It may be the balance between velocity and anchor. Try Depth priority between 45 and 65 and regenerate. If strokes simply feel too long on the device, Depth emphasis at 100% is neutral.
Does depth estimation work on VR video?
VR footage is first unwarped to a normal perspective view of one eye, and depth runs on that view like any other footage. Layout detection is heuristic, based on a few sampled frames.
Read next
- How AI funscript generation worksThe full pipeline, from decoding to the device.
- How optical flow reads motionThe velocity signal depth is weighed against.
- Pose estimation in AutoScript SyncThe other optional model and anchor candidate.
- What each AI part contributesThe product view of the models, and how the app learns from edits.
Try it on your own videos
The trial lasts one day and runs on your own PC; your videos are analysed locally and never uploaded.