AI-powered lead scoring system using hybrid heuristics and OpenAI embeddings to automate and prioritize high-fit leads at scale.

LayerWise
Synthetic video with exact depth, alpha masks, optical flow and bokeh for training depth-aware video bokeh models
Highlights
Depth-aware video bokeh models learn from an all-in-focus video paired with a defocused version of it. Real pairs of sharp and defocused video are hard to capture, so every video bokeh dataset synthesizes the defocus.
Build a pipeline that composes training video from still-image layers, with exact disparity, alpha masks, optical flow and occlusion, and a bokeh renderer fast enough to run inside a training loop.
Prepared a library of 8,586 foregrounds and 20,000 backgrounds with estimated disparity, then composited sequences in which objects move in depth, and rendered their bokeh from the layers.
Released the library and a fixed set of 300 sequences. The renderer takes about 5 ms per frame at 1024 × 1024 pixels on one GPU, more than ten times faster than the other renderers that take layers.
Core Team
Overview
Bokeh is the blur that a shallow depth of field gives a photograph, and it is hardest to render at depth discontinuities, where the blurred edge of a near object should partly reveal the background behind it. A single frame does not show that background, so a model that sees only the frame and its disparity makes errors there. To learn the effect, a video bokeh model trains on pairs of an all-in-focus video and a defocused version of the same video.
Published real pairs are still images taken at two apertures, and video pairs are hard to capture, so every video bokeh dataset synthesizes its defocus. LayerWise is a pipeline that composes such video from still-image layers, and a dataset made with it. Each sequence holds its all-in-focus frames, their disparity and a soft alpha mask for every object. On request it also holds exact optical flow, occlusion masks in both directions, and bokeh from a layered renderer. The work was done at Pompeu Fabra University for Huawei's depth-aware video bokeh research, and the code and the dataset are public.
A web demo generates a sequence from a seed and plays its streams side by side, in step, so a person can judge them against each other. A walkthrough is shown in Figure 1.
Data
The inputs are still images only, and a depth estimator gives each of them a disparity map once, so every later sequence reads a ready library:
- •Foregrounds: 8,586 generated cut-outs from MAGICK with high-quality alpha mattes, 7,727 in the train split and 859 in the test split.
- •Backgrounds: 20,000 photographs from BG-20k, 15,000 in the train split and 5,000 in the test split, following the dataset's own split.
- •Fixed set: 300 sequences written once from the test split, with the settings and seeds recorded, so a network trained on the train split can be evaluated on assets it never saw.
The library and the fixed set are on Hugging Face, 115 GB and 79 GB. Every sequence of the fixed set has 80 frames and 2.9 objects on average, and all but two of its 869 objects move in depth. The streams of one sequence are shown in Figure 2, and three more sequences at two time steps each in Figure 3.
Methods
The pipeline has two stages, shown in Figure 4:
- Stage A (Library): A monocular depth estimator, Depth Anything by default, gives each foreground and background a disparity map, once and offline. Each foreground's matte replaces the unreliable estimate at its soft edge with disparity from inside the object.
- Stage B (Sequences): Objects move over a background that a 2D camera motion warps. An object that approaches or recedes changes its size on screen and its disparity by the same factor, and the disparity inside it keeps the shape the estimator gave it, so the blur can vary within the object. Every layer's known motion gives exact optical flow and an occlusion mask in each direction.
Each object's alpha mask is soft, so a blurred edge mixes the object with what lies behind it, and amodal, so it includes the parts hidden by nearer objects. Stage B writes the sequences to disk, or runs inside a training loop's data loader, so a network receives sequences generated in memory. The depth estimator, the assets and the bokeh renderer can each be replaced.
Results
The layered renderer was compared with four published ones on 120 sequences of 24 frames at 1024 × 1024 pixels, against a layered ray tracer that composites the layers in display values, as the pipeline does:
- •Speed: About 5 ms per frame at 1024 × 1024 pixels on one NVIDIA GeForce RTX 5090. Of the renderers that take layers, it is more than ten times faster than the others at every width, and on the CPU it takes under a second per frame.
- •Edge accuracy: Near object edges it is on average the closest to the reference in every subset, ahead of BokehMe by 1.3 dB on smoke to 7.0 dB on hair. The lead comes from sequences with one object, and the order depends on how the reference composites.
- •Generation: Writing a fixed-set sequence of 80 frames took 75 s on average, with bokeh rendered on the GPU and every stream written.
The bokeh strength is a setting of the renderer, and the same sequence at three strengths is shown in Figure 5.
Conclusion
LayerWise gives a depth-aware bokeh model exact supervision at object edges, where real data is hardest to get, and generates it cheaply enough to run inside a training loop. Its sequences are composed from flat layers rather than rendered from 3D scenes, so they have no camera parallax, shadows or refraction, and the disparity inside an object is estimated, not rendered.
The remaining limits are not fundamental: motion blur could be added along each layer's known motion, and the renderer can write the same scenes at other strengths. The data is for non-commercial research, as the licenses of its source images require.
Keep Exploring
Time-series forecasting dashboard for monthly insurance claims and costs using SARIMAX seasonal models, scenario stress-testing, and AI-generated summaries.





