What a matting model outputs for an empty opening: a poster became a 2.5% person
If a video starts with an empty room and the person walks in a few seconds later, what does a person-matting model output for those first frames? The two obvious guesses are a transparent frame or a speckle of noise. On
If a video starts with an empty room and the person walks in a few seconds later, what does a person-matting model output for those first frames? The two obvious guesses are a transparent frame or a speckle of noise. On this one test clip it was neither, and the answer depended on what was hanging on the wall.
The test clips are homemade. Each is 960×540 at 30 fps, 6 seconds long (180 frames), with no audio track. Frames 0 to 96 are empty; from frame 97 the person slides in from the right edge and is fully in shot near frame 104. That person comes from a public-domain green-screen video on Wikimedia Commons by VOA Learning English, cropped, keyed out and pasted onto self-made backgrounds, and the poster hanging in one of them shows a photo of the same person. Limits: a single person, low resolution, a background that never moves, an entry that is a rigid slide rather than a walk, and one run per clip. Walking in, moving backgrounds and long videos were not tested. All numbers below come from one run on one Apple-silicon Mac in a desktop browser.
How a mask is read
Every output pixel has an alpha value from 0 (fully transparent) to 255 (fully opaque). "Mask share" below is the fraction of the frame where alpha is above 128. The matting ran in ImgIng https://imging.ai/ , a browser video-matting tool that is still labelled Beta and recommends desktop Chrome or Edge, in its Compatible and Quality modes. Alpha was read back from the exported transparent WebM, frame by frame.
What each background produced
| Background, frames 0 to 96 | Mask share (Compatible mode) | What the mask was |
|---|---|---|
| Plain wall | 0% | Nothing. Alpha never went above 2 |
| Portrait poster on the wall | 2.46% to 2.66%, mean 2.48% | The person printed on the poster |
| Coat on a hanger | 5.78% | The coat and the hook |
| Busy colourful bookshelf | 0% | Nothing |
Quality mode gave the same picture, 2.44% on the poster wall and 5.73% on the coat. So an empty opening is not "nothing to do" for the model: it still decides, frame by frame, whether something person-shaped is there.
No speckle-style mask showed up. The plain wall left only about 119 pixels per frame at alpha 1 or 2. The poster and the coat were solid blocks at alpha 255 with clean edges, and the poster block (roughly 104×205 pixels) barely changed over 90 frames. The cluttered bookshelf produced nothing.
The poster really does contain a person, so whether this counts as a mistake depends on your definition. If you only want the person who walks in, it is something to remove.
The blocks stay after the person arrives
Once the real person arrived, the stray blocks did not go away. At frames 150 to 179 the poster block still took 2.46% of the frame and the coat block 5.65%. A transparent export keeps them for the whole clip, so they have to be masked or cropped out afterwards.
The real person shows up on the same frame
A model that carries memory from frame to frame could lag behind a new arrival, but on this clip it did not. At frame 97, when only an arm was in frame (0.31% of the frame in the reference mask), Compatible mode already had a mask there with an overlap score (IoU) of 0.84 against the reference. From frame 100 the score was 0.97 or higher.
To see whether memory helps with the poster, the same lightweight model weights were also run locally two ways, clearing the memory every frame or passing it along. That side check is not how ImgIng works internally. The empty-opening share was 2.68% against 2.55% on the poster wall, 5.77% against 5.73% on the coat, and 0% on the plain wall both times, so the mistake comes from judging one frame and memory neither fixed nor worsened it. The two runs only differed just before the person was fully in. At frame 99 the poster clip scored an IoU of 0.62 per-frame and 0.69 with memory carried, so the gap was small and not always in the same direction.
What the preview and export say
On the plain wall, the one-second preview says no subject was recognised in the current frame and that this will not count as a successful mask. A separate 4-second plain-wall clip with nobody in it exported without an error, with no pixel above alpha 16 in any of the 120 frames, and the page said it was completed but no subject was recognised, without saving automatically. The poster wall behaves differently: the same preview reports a subject of about 2.6% of the frame, which is the poster, so no warning appears.
What to check before exporting
These are suggestions from one clip, not a rule. Preview at a time when the person is clearly in shot rather than at the opening, then look at where the mask sits instead of reading only the percentage. If a second block is lit up at the poster or the coat, plan to remove it.
A guess, not a measurement: a threshold of alpha above 16 would already filter out the plain-wall residue, which never exceeded 2. It would not remove the poster, because that block is fully opaque. Telling that block apart would need something like "it never moves" or "it does not overlap the entry region".
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.