# Tencent’s AI background-removal patent: different boundary treatment for hair and the face

A technical reading of US12639823B2: semantic segmentation, region-specific trimap widths, face protection and per-pixel alpha estimation.

Source: https://www.iplexlaw.co.kr/en/blog/tencent-portrait-matting-trimap

HOME / NEWS & INSIGHTS NEWS & INSIGHTS Tencent’s AI background-removal patent: different boundary treatment for hair and the face A technical reading of US12639823B2: semantic segmentation, region-specific trimap widths, face protection and per-pixel alpha estimation. Artificial Intelligence 2026.11.07 published IPLEX 7 min read Original conceptual illustration of background separation using whole-person and region segmentation information. Removing a portrait’s background is not enough if fine hair disappears or artifacts remain on the face. Tencent’s US12639823B2 describes distinguishing the whole person, hair and face, then using a guidance map with different boundary widths to support precise matting. A fictional instructor poster illustrates trimaps, alpha estimation and a cloud-based background-removal workflow. 1. Why does fine hair disappear from a poster? Imagine an online education business preparing an instructor poster. The original background must be removed before the portrait is placed against an event design. The broad outline may look correct while fine hairs disappear or the old background color remains around the head, making the composite conspicuous when enlarged. An image consists of pixels. Some clearly belong to the person, such as the interior of clothing, while pixels around fine hair contain both foreground and background contributions. Assigning each boundary pixel immediately to only one side can lose that detail. Different edges may need different treatment. The patent describes identifying which part of the person forms the boundary. Hair receives a wider area for detailed processing, the torso a narrower area, and locations identified as face are treated as foreground. The useful design question is how guidance is prepared before the fine calculation, not just how the final images compare. 2. Segmentation and a trimap perform different jobs Semantic segmentation classifies image pixels, allowing separate maps of the whole person, hair and face. Matting separates the object from its background with finer treatment at the boundary. Recognizing the object and resolving its edges are distinct stages. A trimap is a guidance image with three regions: known foreground, known background and an unknown region requiring further calculation. In a portrait, the foreground is the person to retain, the background is the surroundings to remove, and the unknown band needs examination together with the original image. The gray unknown region is not an already computed semitransparent result. It tells the next stage where more calculation is needed; the matting model determines how much foreground to retain. For a poster, it is comparable to first marking the areas that require detailed attention. 3. Preparing whole-person, hair and face information The input is the original photograph. Semantic segmentation provides the whole-person region, the hair region and the face region. The first supplies the overall outline, the second identifies boundaries requiring wider treatment, and the third identifies foreground locations to preserve. These are not photographs of different subjects. They describe the same coordinates in the same original image from different perspectives. This makes it possible to relate a hair boundary to the person’s outline and determine where a face region overlaps the processing band. For the fictional instructor poster, locating only the face does not distinguish hair from shoulder contours. Treating the person as one undifferentiated region also leaves part-specific information unused. The design therefore prepares whole-object and component information together. 4. Combining boundary widths and resolving face overlaps A relatively narrow unknown band is drawn around the whole-person outline, while a wider band is drawn around the hair outline. The two maps are combined at corresponding coordinates, leaving more room for detailed analysis near hair and less around other edges. One disclosed labeling example uses 255 for foreground, 0 for background and 128 for the unknown region. Combination selects the larger label at each corresponding position. These are region identifiers in a guidance map: a label of 128 does not fix the final alpha value at one half. Locations where the face region overlaps the unknown band are then relabeled as foreground. This avoids leaving important facial pixels as an ambiguous boundary. The portrait example treats hair, torso and face with different boundary widths before passing the refined guidance to matting. Original fictional example showing different unknown-band widths around hair and torso and foreground labeling for the face. It is not a product screenshot or an original patent drawing. 5. Estimating alpha from the original image and guidance The refined trimap and original photograph are supplied to a matting model. It estimates per-pixel alpha information indicating the foreground contribution. The map identifies known retained and removed regions, while uncertain edges are resolved using the original image. Consider the photographic background visible between strands of the instructor’s hair. Per-pixel estimation can address fine structures instead of cutting them along one thick outline. Applying the resulting information produces a cutout, which a separate poster-composition stage can place on a new background. A terminal can let the user select the image and display the result. Segmentation, map generation and matting may be performed on a terminal or server. The substantive issue is the order in which the original, region maps and final guidance pass to subsequent calculations, rather than the server label alone. 6. Connecting Tencent Cloud background removal to a workflow Tencent Cloud’s Cloud Infinite service, 数据万象, documents intelligent cutout functions. Its official material describes recognizing subjects such as people or products, removing the background and producing an asset with transparency. It also explains processing images stored in COS through the relevant APIs. A transparent asset is an intermediate result that can be reused in different designs. Official examples include e-commerce product images, event posters and adaptation for dark displays. Separating image upload, processing requests and use of the resulting asset clarifies the business workflow. In the fictional education company, an instructor cutout could be placed in course posters with different colors and text. A designer can examine hair, face and clothing edges separately and refine the layout. Producing the person asset and composing the poster remain distinct operations. 7. Documenting intermediate information as well as output The technical idea is to avoid imposing one boundary rule on the entire person. Different regions receive different areas for detailed calculation, and face information further refines the guidance. This designs the information passed between a recognition model and a model that resolves edges. A development team can separately record the original, region segmentation, trimap, final alpha and output image. When a defect appears, this helps explain whether hair was misclassified, the unknown band changed, or detail was lost during final separation. Business teams can supply the intended use and processing sequence alongside before-and-after images. A flowchart showing the input, region distinctions and reuse of intermediate results makes the implementation concrete. Even a small change in edge treatment can be a useful starting point for describing the technical development. The original figure labels and forms are preserved; the text explains the source material. The patent’s claims and embodiments are distinguished from Tencent Cloud’s product documentation. This article does not establish that the commercial service implements every claimed feature; the illustrated poster workflow is hypothetical. USPTO patent publication · US12639823B2 Tencent Cloud official documentation · Intelligent cutout Adobe’s AI image-editing patent: keeping originals and generated alternatives in layers LG’s AI refrigerator patent: using door angle and depth to identify food in door storage Explore IPLEX’s AI projects, publications and technical consultation services. Explore our AI and patent practice Original Tistory article Read the Korean source This article reflects the information available when it was published. Contact us to discuss your circumstances. Discuss this topic ↗ All articles ON THIS PAGE 1. Why does fine hair disappear from a poster? 2. Segmentation and a trimap perform different jobs 3. Preparing whole-person, hair and face information 4. Combining boundary widths and resolving face overlaps 5. Estimating alpha from the original image and guidance 6. Connecting Tencent Cloud background removal to a workflow 7. Documenting intermediate information as well as output TALK TO IPLEX Discuss your IP questions We consider your technology and business needs together. ↗ Contact us Newer Inventive step in an augmented reality patent ↗ Older Factory photographs and design novelty: proving what was disclosed, and when ↗ Related insights Artificial Intelligence 2026.11.19 Matryoshka embeddings for image retrieval: shortlist with a prefix, rerank with the full vector A practical reading of Matryoshka Representation Learning, its nested training objective and the ImageNet-1K retrieval results reported at NeurIPS 2022. ↗ Read article Artificial Intelligence 2026.11.18 ByteDance’s captioning patent: transcribing separate tracks and resolving overlapping display times How US11837234B2 processes selected audio tracks and adjusts caption timing, with a practical distinction between patent disclosure and CapCut’s public guidance. ↗ Read article Artificial Intelligence 2026.11.17 Apple recognized text: connect a phone number or web address to the right action US12001642B2 links recognized text, image coordinates, text types and user input to contextual menus and actions. ↗ Read article

- https://www.iplexlaw.co.kr/en
- https://www.iplexlaw.co.kr/en/blog/category/ai
- https://image-ppubs.uspto.gov/dirsearch-public/print/downloadPdf/12639823
- https://cloud.tencent.com/document/product/460/80907
- https://www.iplexlaw.co.kr/en/blog/adobe-non-destructive-generative-editing
- https://www.iplexlaw.co.kr/en/blog/lg-ai-refrigerator-door-depth-recognition
- https://www.iplexlaw.co.kr/en/ai-patents
- https://iplexlaw.tistory.com/18
- https://www.iplexlaw.co.kr/ko/blog/tencent-portrait-matting-trimap
- https://www.iplexlaw.co.kr/en/contact
- https://www.iplexlaw.co.kr/en/blog
- https://www.iplexlaw.co.kr/en/blog/tencent-portrait-matting-trimap#article-18-en-0
- https://www.iplexlaw.co.kr/en/blog/tencent-portrait-matting-trimap#article-18-en-1
- https://www.iplexlaw.co.kr/en/blog/tencent-portrait-matting-trimap#article-18-en-2
- https://www.iplexlaw.co.kr/en/blog/tencent-portrait-matting-trimap#article-18-en-3
- https://www.iplexlaw.co.kr/en/blog/tencent-portrait-matting-trimap#article-18-en-4
- https://www.iplexlaw.co.kr/en/blog/tencent-portrait-matting-trimap#article-18-en-5
- https://www.iplexlaw.co.kr/en/blog/tencent-portrait-matting-trimap#article-18-en-6
- https://www.iplexlaw.co.kr/en/contact
- https://www.iplexlaw.co.kr/en/blog/brunch-case-1930
- https://www.iplexlaw.co.kr/en/blog/brunch-case-1929
- https://www.iplexlaw.co.kr/en/blog/matryoshka-prefix-vector-image-retrieval
- https://www.iplexlaw.co.kr/en/blog/matryoshka-prefix-vector-image-retrieval
- https://www.iplexlaw.co.kr/en/blog/bytedance-track-based-caption-timing
- https://www.iplexlaw.co.kr/en/blog/bytedance-track-based-caption-timing
- https://www.iplexlaw.co.kr/en/blog/apple-recognized-text-contextual-actions
- https://www.iplexlaw.co.kr/en/blog/apple-recognized-text-contextual-actions
