Kąt Andersona
Ulepszanie usuwania tła AI bez kosztownej anotacji ludzkiej

Naukowcy odkryli, że AI może czysto wycinać ludzi z filmów bez drogiej anotacji ludzkiej, poprawiając jakość i stabilność
Większość z nas doświadczyła bycia “wyciętą” z tła przez proste filtry zmiany tła na platformach wideokonferencyjnych – i zauważyliśmy ograniczenia takich systemów, które są szkolone na najczęstszych typach przypadków, które można znaleźć w wideokonferencji, i nie są zwykle odporne na coś “nieoczekiwanego” – lub nawet na przewidywalne obiekty, takie jak palce:

Typowy przykład systemu wyodrębniania pierwszego planu szkolonego przez AI, który wycina zbyt dużo źródłowego obiektu. Źródło
Najłatwiejszym rozwiązaniem, które staje się coraz bardziej popularne w obliczu modeli języka i widzenia (VLM), które nie są specjalnie szkolone do takich zadań, jest dostosowanie istniejącego modelu do danych, które będą najprawdopodobniej spotkane przez system:

Dwa duże, starannie anotowane zestawy danych podstawowe rozwiązania przedstawionego w artykule z 2020 roku "Real-Time High-Resolution Background Matting". Źródło
Jednak takie dane muszą być anotowane przez ludzi, przy pewnym koszcie i czasie, przez ludzi; i w każdym przypadku, wynika to w bardzo specyficzne i niespecjalizowane narzędzie, które kosztuje dużo pieniędzy i zwykle nie może być używane do szerszego zakresu zadań.
Pomimo tego, rozwijanie “ukierunkowanych” modeli tego typu jest obecnie najkrótszą drogą do skutecznej inferencji w różnych dziedzinach, nie tylko w matowaniu wideo i obrazu (tj. usuwaniu tła / pierwszego planu). Do tej pory wiele nieszkolonych rozwiązań po prostu przeniosło problem w innym miejscu.
Even now, despite the proliferation of AI-augmented filters in platforms such as Zoom, the latter continues to recommend a green screen as the optimal solution for background removal – a burdensome and somewhat ‘professional’ solution that would perhaps make most of us a little self-conscious.
Wyciąć to!
Lately, interest has grown in using the Segment Anything (SAM) family to provide automated and fine-grained extraction. Since SAM was developed to aid annotation rather than provide crisp outlines to a standard acceptable in a visual effects pipeline, its default boundaries are not suitable to address the challenge, unaided:
Kliknij, aby odtworzyć, jeśli to konieczne. Przykład szorstkich granic utworzonych przez model Segment Anything – idealny do anotacji, ale nie wystarczająco dobry dla VFX drop-out. Źródło
A recent offering from China has proposed a more sophisticated way of using SAM models to obtain superior extraction processes – by marrying a foundational tracker such as SAM to a region-proposal bridge with dedicated matting heads. In this way, the system is able to refine edge detail iteratively and resolve challenging edges, such as hair in motion:
Kliknij, aby odtworzyć, jeśli to konieczne. Z witryny pomocniczej wspierającej nowy artykuł, połączenie dodatkowych filmów, demonstrujących zaawansowanie metody autorów do ekstrakcji. Źródło
Crucially, the new composite system trains only on images, not on videos, and requires no additional human annotation – the traditional hindrance against progress in this, and diverse other AI domains.

Przykłady drobiazgowego matowania obrazu i wideo uzyskane za pomocą nowej metody, z trudnymi przypadkami, takimi jak włosy, przejrzystość i ruch, przedstawionymi obok sekwencji w środowisku, w którym metoda produkuje – zdaniem autorów – czystsze, bardziej stabilne wyniki niż poprzednie podejścia. Źródło
With three experimental models produced for the work, the authors claim new state-of-the-art performance in this task, while retaining the higher generalization capabilities of the base model, meaning that the method produces an all-purpose model with extra capabilities, rather than a siloed tool targeted to a single task.
The authors state:
‘Comprehensive experiments show that SAM2Matting achieves state-of-the-art (SOTA) performance on both image and video matting, with video matting evaluated in a strictly zero-shot manner.
‘Extensive in-the-wild results further demonstrate its strong generalization to open-world scenarios with rapid motion, complex backgrounds, and target attachments (e.g., man riding a bicycle).
‘Moreover, our matting components are lightweight and efficient, enabling the SAM2.1-Tiny variant to run at 40 FPS on a 200-frame 1080p video using less than 5GB GPU memory.’
The new paper is titled SAM2Matting: Generalized Image and Video Matting, and comes from four authors across Fudan University and Shanghai University of Finance and Economics. The work has a GitHub repository, which at the time of writing has released checkpoints of different variants, inference code, and an interactive demo, with a release of training code promised. Additionally, there is a project site.
Metoda
The authors’ method separates tracking from fine detail extraction using a video object segmentation (VOS) tracker to produce a temporally consistent coarse mask for each frame, while a dedicated matting pipeline refines boundaries:

Przegląd potoku, w którym elastyczne wprowadzenie i wejście wideo są wprowadzane do śledzenia obiektu wideo w celu wytworzenia grubego maska, który jest udoskonalany przez wykrywacz ROI i przekonwertowany w trimap przed tym, jak predictor wieloskalowy generuje ostateczne drobiazgowe matowanie.
A region-of-interest (ROI) detector then identifies regions with fine detail or semi-transparency, converting these into a trimap (a three-region mask dividing foreground, background, and uncertain areas) that guides refinement, after which a Progressive Alpha Predictor generates the final matte through a coarse-to-fine cascade across multiple scales
Conventional matting systems typically derive regions of interest using simple morphological operations, or by directly reusing the mask – approaches that can either overlook fine detail, or else include areas that do not require refinement:

Porównanie standardowego przetwarzania opartego na masce z trimapami o wysokiej jakości, pokazujące, jak proste operacje morfologiczne produkują grube, jednolite granice, które pomijają drobiazgowe struktury, takie jak włosy i przejrzystość, prowadząc do utraty szczegółów w ostatecznym matowaniu.
Oprocentowanie składane
Conversely, the proposed Region-of-Interest Detector instead treats this step as a pixel-wise classification task (i.e., treating each individual pixel in the image as a separate decision, and assigning it a label based on whether it belongs to a matting-critical region or not) that integrates the VOS mask, the current frame, and multi-scale image features, to more precisely isolate matting-critical regions.
In the new approach, the predicted ROI is first converted into a pseudo-trimap that separates definite foreground and background from uncertain regions, using the tracker mask to assign known areas while marking the ROI as ambiguous, so that subsequent processing can focus explicitly on boundaries where detail must be resolved.
Refinement is then handled by a Progressive Alpha Predictor that treats matting as a stepwise process, passing intermediate results from coarse to finer scales, with each stage using the image, the trimap, and the previous estimate to progressively sharpen structure and recover fine detail.
At the final stage, the highest-resolution output is upsampled to produce the completed matte, allowing broad shapes to be established early while finer elements such as hair and transparency are resolved in later passes.
During training, the authors froze the VOS tracker, while training only the matting components on high-quality image data – allowing fine detail to be refined without degrading tracking consistency. Supervision was then applied per frame, with regions of interest derived from the ground-truth alpha matte, and used to guide learning, while the ROI detector was trained with losses designed to encourage accurate boundary classification, and reduce jagged artifacts.
For alpha estimation, losses were applied across multiple scales to progressively improve detail, alongside an additional constraint intended to keep the predicted matte aligned with the original mask – helping to preserve structure, and to prevent hollow or broken regions in the final output.
Dane i testy
Eight image matting datasets were used initially, for the trials: I-HIM50K; P3M-10k; CelebAHairMask-HQ; AIM-500; Distinctions-646; AM-2K; UHRIM; and RefMatte; and three variants of the ‘Sam2Matting’ approach were developed as VOS trackers, respectively using SAM2.1-Tiny; SAM2.1-Base+; and the concept-focused SAM3.
The tracker component was frozen, with only the matting components optimized. All versions were trained for five epochs across four NVIDIA A6000 GPUs, each with a VRAM allocation of 48GB. A batch size of 32 was used, under the AdamW optimizer. Metrics used were Mean Absolute Difference (MAD); Mean Squared Error (MSE); Gradient (Grad); Connectivity (Conn); and dtSSD (for video matting only).
Testy ilościowe
The authors began with quantitative testing of the new systems on image matting, using the benchmarks P3M-500-NP; AM-2K (‘GFM’ in results); MAM (‘Matte Anything’, in results); E2E-HIM; Lightweight; and PPM-100 (‘MODNet’, in results):

Wyniki ilościowe na benchmarkach matowania obrazu w P3M-500-NP, AM-2K test i PPM-100, z niższymi wartościami wskazującymi lepszą wydajność we wszystkich metrykach, i najlepsze, drugie i trzecie wyniki wyróżnione na czerwono, pomarańczowo i żółto odpowiednio. Proszę odnieść się do oryginalnego artykułu, aby uzyskać lepszą rozdzielczość.
Of these results, the paper states:
‘As shown [above], all three variants of SAM2Matting consistently outperform previous baselines across different metrics. For instance, the SAM2.1-Tiny variant achieves an 11.48 lower MAD than MAM on P3M-500-NP.’
The authors maintain that the results across the board indicate that their approach achieves superior results through the core conceptual design, and not because of the level of data curation.
For video matting, SAM2Matting was evaluated on V-HIM60 and VideoMatte in a zero-shot setting, against the video-trained systems MatAnyone2, MatAnyone, MaGGIe, FTP-VM, and RVM, with consistent gains reported across both medium and hard splits.
Across all benchmarks, the three variants record lower errors on MAD, MSE, Grad, Conn, and dtSSD, with SAM3 achieving the strongest overall results, while the lowest dtSSD values apparently indicate more stable frame-to-frame consistency:

Wyniki ilościowe na benchmarkach matowania wideo w V-HIM60 i VideoMatte, oceniane w ustawieniu zero-shot, z niższymi błędami we wszystkich metrykach, i najlepsze, drugie i trzecie wyniki wyróżnione na czerwono, pomarańczowo i żółto odpowiednio.
The authors contend that these outcomes reflect the decoupled design, where the VOS tracker preserves temporal structure and the matting modules focus on boundary detail, enabling image-trained models to exceed fully supervised video approaches.
Testy jakościowe
For human matting in qualitative tests, the authors found that Sam2Matting outperformed competitive baselines:

Porównanie jakościowe na matowaniu ludzi i wideo w środowisku, gdzie SAM2Matting zachowuje drobiazgowe pasma włosów i półprzezroczyste regiony bardziej dokładnie niż RVM i MatAnyone, produkując czystsze granice i mniej brakujących struktur w trudnych obszarach.
As shown below, existing video matting systems such as MatAnyone2 and MaGGIe, trained on domain-specific and often human-centric datasets, struggled to generalize to in-the-wild sequences, particularly when handling fast-moving subjects such as growing roots, semi-transparent butterflies, and rapidly dripping water:

Porównanie jakościowe na sekwencjach w środowisku, gdzie SAM2Matting zachowuje drobiazgowe struktury i spójność czasową bardziej skutecznie niż MatAnyone2 i MaGGIe, szczególnie dla nie-ludzkich obiektów, szybkiego ruchu i półprzezroczystych elementów, takich jak woda, szkło i skrzydła owadów. Proszę odnieść się do oryginalnego artykułu, aby uzyskać lepszą rozdzielczość.
Conversely, SAM2Matting proved able to maintain stable tracking, and to extract fine details more reliably, in these challenging scenarios.
Finally, as shown in the figure below, SAM2Matting effectively handled targets with attached objects, such as people riding bicycles or holding ski poles, while suppressing nearby background distractions, benefiting from the matte-mask consistency constraint described earlier.

Porównanie jakościowe na sekwencjach z obiektami przywiązanych i tłem, gdzie SAM2Matting zachowuje struktury, takie jak rowery i kije narciarskie, bardziej dokładnie niż MatAnyone2, podczas gdy tłumi pobliskie rozpraszające tło i utrzymuje czystsze sylwetki w ramach.
Wnioski
The achievements detailed in the new paper demonstrate the extent to which extraction, one of the oldest tasks in computer vision, remains unsolved and resistant to generalized approaches. As with many other vision-based models, the problem remains that extraction algorithms cling to domain knowledge instead of adapting easily to unseen and unknown objects; this particular task strains the outermost reaches of a model’s generalization.
While the new work is a step forward from that dependence, there’s still a long way to go, considering the extent to which this task is embedded in our daily lives, through video chat portals.
Pierwotnie opublikowane w poniedziałek, 13 lipca 2026












