The Smallest Useful Change: Restoring a Patch Without Rewriting the Frame
Jasna's most distinctive promise is spatial: restore the selected mosaic area while leaving the rest of the frame alone. That promise is implemented through a chain of crop preparation, fixed-size inference, optional enlargement, and masked compositing. This chapter follows one detected region through that chain so the reader can see both sides of the design: why locality protects untouched pixels, and why softness, mask artifacts, and uncertain detail can still remain inside the selected region.
The previous chapter treated time as the main boundary. A tracked region had to be divided into clips without losing continuity. Here the question is spatial: what exactly crosses from a frame into the restorer, and what comes back? The answer is not a replacement frame. It is a generated patch with a known relationship to a source crop and a defined place where it may influence the original image.
The crop supplies context to a fixed-size model
Jasna begins with a detected box and mask, but the box is not necessarily the exact crop sent to the model. The public crop preparation expands the region, subject to the frame and the relevant eye boundary for VR processing, so the restoration sees surrounding context. That context can help the model interpret edges, shapes, and local appearance instead of treating the mosaic as an isolated rectangle.
The expanded crop is then resized and padded to the input size expected by the primary BasicVSR++ restorer. The model returns a 256-by-256 patch. The fixed size creates a stable interface between the spatial preparation stage and the learned model: regardless of the original target's dimensions, the restorer receives a normalized patch shape and returns the same basic output shape.
That stability is useful, but it is not free. If the detected area is small, the crop can be represented at a scale that gives the model useful context. If the area is large or the video is a close-up, the same 256-by-256 output has to stand in for a larger portion of the frame. A patch can then look soft when it is resized back to its original region. The limitation is not necessarily that the detector failed; it can be the spatial contract of the primary restorer itself.
The crop also determines what the model does not see. Expanding the box provides context, but it does not turn the crop into a full-frame reconstruction. Information outside the crop is available to the blend stage as original pixels, not as additional generated evidence. If the selected area is too broad, the job spends more effort and risks changing more content. If it is too narrow, the model may have less surrounding structure to guide the patch and the boundary may be harder to integrate.
Secondary restoration changes scale, not history
Jasna offers optional secondary restoration for cases where the primary patch is too small for the target.