IP Library Granted Patent US 12,437,358
Granted Patent B2
US 12,437,358 · App. 17/968,645 · Granted Oct 7, 2025

Performing segmentation of objects in media items based on user input

Inventors: Orly Liba (Mountain View, CA); Navin Sarma (Mountain View, CA); Yael Pritch Knaan (Mountain View, CA); Alexander Schiffhauer (Mountain View, CA); Longqi Cai (Mountain View, CA); David Jacobs (Mountain View, CA); Huizhong Chen (Mountain View, CA); Siyang Li (Mountain View, CA); Bryan Feldman (Mountain View, CA)
Assignee: Google LLC
G06T3/40G06T5/77G06T7/11G06T2200/24G06T2207/20081G06T2210/12G06T2210/22
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,437,358
App. No.
17/968,645
Granted
Oct 7, 2025
Kind
B2
Abstract

A media application receives user input that indicates one or more objects to be erased from a media item. The media application translates the user input to a bounding box. The media application provides a crop of the media item based on the bounding box to a segmentation machine-learning model. The segmentation machine-learning model outputs a segmentation mask for one or more segmented objects in the crop of the media item and a corresponding segmentation score that indicates a quality of the segmentation mask.

Claims (42)

1. A computer-implemented method comprising:

receiving user input that indicates one or more objects to be erased from a media item;

translating the user input to a bounding box;

providing a crop of the media item based on the bounding box to a segmentation machine-learning model;

outputting, with the segmentation machine-learning model, a segmentation mask for one or more segmented objects in the crop of the media item and a corresponding segmentation score that indicates a quality of the segmentation mask;

determining that the segmentation mask is invalid based on one or more of: the corresponding segmentation score failing to meet a threshold score, a number of valid mask pixels falling below a threshold number of pixels, a segmentation mask size falling below a threshold size, or the segmentation mask being greater than a threshold distance from a region indicated by the user input; and

responsive to determining that the segmentation mask is invalid, generating a different mask based on a region within the user input.

2. The method of claim 1 , wherein the bounding box is an axis-aligned bounding box or an oriented bounding box.

3. The method of claim 1 , wherein the user input includes one or more strokes made with reference to the media item.

4. The method of claim 3 , wherein the bounding box is an oriented bounding box and wherein an orientation of the oriented bounding box matches an orientation of at least one of the one or more strokes.

5. The method of claim 1 , wherein prior to the providing the crop of the media item, the segmentation machine-learning model is trained using training data that includes a plurality of training images and groundtruth segmentation masks.

6. The method of claim 1 , further comprising:

providing a user interface that receives the user input, wherein the user input is selected from a group of a circle that surrounds the one or more objects, one or more lines on top of the one or more objects, a square that surrounds the one or more objects, and combinations thereof.

7. The method of claim 1 , further comprising inpainting a portion of the media item that matches the different mask to obtain an output media item, wherein the one or more objects are absent from the output media item.

8. The method of claim 7 , wherein the inpainting is performed using an inpainting machine-learning model, and wherein the media item and the different mask are provided as input to the inpainting machine-learning model.

9. The method of claim 7 , further comprising providing a user interface that includes the output media item.

10. A non-transitory computer-readable medium with instructions stored thereon that, when executed by one or more computers, cause the one or more computers to perform operations comprising:

receiving user input that indicates one or more objects to be erased from a media item;

translating the user input to a bounding box;

providing a crop of the media item based on the bounding box to a segmentation machine-learning model;

outputting, with the segmentation machine-learning model, a segmentation mask for one or more segmented objects in the crop of the media item and a corresponding segmentation score that indicates a quality of the segmentation mask;

determining that the segmentation mask is invalid based on one or more of: the corresponding segmentation score failing to meet a threshold score, a number of valid mask pixels falling below a threshold number of pixels, a segmentation mask size falling below a threshold size, or the segmentation mask being greater than a threshold distance from a region indicated by the user input; and

responsive to determining that the segmentation mask is invalid, generating a different mask based on a region within the user input.

11. The computer-readable medium of claim 10 , wherein the bounding box is an axis-aligned bounding box or an oriented bounding box.

12. The computer-readable medium of claim 10 , wherein the user input includes one or more strokes made with reference to the media item.

13. The computer-readable medium of claim 12 , wherein the bounding box is an oriented bounding box and wherein an orientation of the oriented bounding box matches an orientation of at least one of the one or more strokes.

14. The computer-readable medium of claim 10 , wherein the segmentation machine-learning model is trained prior to the providing using training data that includes a plurality of training images and groundtruth segmentation masks.

15. A computing device comprising:

a processor; and

a memory coupled to the processor, with instructions stored thereon that, when executed by the processor, cause the processor to perform operations comprising:

receiving user input that indicates one or more objects to be erased from a media item;

translating the user input to a bounding box;

providing a crop of the media item based on the bounding box to a segmentation machine-learning model;

outputting, with the segmentation machine-learning model, a segmentation mask for one or more segmented objects in the crop of the media item and a corresponding segmentation score that indicates a quality of the segmentation mask;

determining that the segmentation mask is invalid based on one or more of: the corresponding segmentation score failing to meet a threshold score, a number of valid mask pixels falling below a threshold number of pixels, a segmentation mask size falling below a threshold size, or the segmentation mask being greater than a threshold distance from a region indicated by the user input; and

responsive to determining that the segmentation mask is invalid, generating a different mask based on a region within the user input.

16. The computing device of claim 15 , wherein the bounding box is an axis-aligned bounding box or an oriented bounding box.

17. The computing device of claim 15 , wherein the user input includes one or more strokes made with reference to the media item.

18. The computing device of claim 17 , wherein the bounding box is an oriented bounding box and wherein an orientation of the oriented bounding box matches an orientation of at least one of the one or more strokes.

19. The computing device of claim 15 , wherein prior to the providing a crop of the media item, the segmentation machine-learning model is trained using training data that includes a plurality of training images and groundtruth segmentation masks.

20. The computing device of claim 15 , wherein the operations further comprise:

providing a user interface that receives the user input, wherein the user input is selected from a group of a circle that surrounds the one or more objects, one or more lines on top of the one or more objects, a square that surrounds the one or more objects, and combinations thereof.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 18, 2022
From: LIBA, ORLY; SARMA, NAVIN; KNAAN, YAEL PRITCH; SCHIFFHAUER, ALEXANDER; CAI, LONGQI; JACOBS, DAVID; CHEN, HUIZHONG; LI, SIYANG; FELDMAN, BRYAN
To: GOOGLE LLC
Reel/Frame 061819/0430 →
Continuity (2)
Provisional Application 63257111 · Oct 18, 2021
Related Publication 20230118361A1 · Apr 20, 2023
References Cited (27)
US 11048977B1 · Ulbricht · 2021 [cited by examiner]
US 20170287137A1 · Lin · 2017 [cited by examiner]
US 20180005063A1 · Chan · 2018 [cited by examiner]
US 20190108640A1 · Zhang · 2019 [cited by examiner]
US 20200143171A1 · Lee · 2020 [cited by examiner]
US 20200175654A1 · Tagra et al. · 2020 [cited by applicant]
US 20200364871A1 · Bradski · 2020 [cited by examiner]
US 20210027539A1 · Huang · 2021 [cited by examiner]
US 20210142497A1 · Pugh · 2021 [cited by examiner]
CN 109409371 · 2019 [cited by applicant]
CN 111582297 · 2020 [cited by applicant]
CN 112241675 · 2021 [cited by applicant]
JP 2000228722 · 2000 [cited by applicant]
KR 1020190019822 · 2019 [cited by applicant]
Le et al., Object removal from complex videos using a few annotations, Computational Visual Media, vol. 5, No. 3, Sep. 2019 , pp. 267-291, AAPA furnished vi alDS. [cited by examiner]
Matsui, et al., “Single-Image Fence Removal Using Deep Convolutional Neural Network”, IEEE Access 8, 2019, p. 38846-38854. [cited by applicant]
Banerjee, et al., “Image foreground extraction—a supervised framework based on region transfer”, 2016 International Conference on Signal and Information Processing (IConSIP), 2016, pp. 1-5. [cited by applicant]
JPO, Office Action for Japanese Patent Application No. 2023-561358, Sep. 10, 2024, 6 pages. [cited by applicant]
USPTO, International Search Report and Written Opinion in International Application No. PCT/US2022/047035, Feb. 2, 2023, 11 pages. [cited by applicant]
Jonna Sankaraganesh, et al., “Deep Learning Based Fence Segmentation and Removal from an Image Using a Video Sequence”, 16th European Conference—Computer Vision—ECCV 2020, Cornell University Library, 201 Olin Library Co… [cited by applicant]
Le Thuc Trinh, et al., “Object removal from complex videos using a few annotations”, Computational Visual Media, vol. 5, No. 3, Aug. 22, 2019, pp. 267-291. [cited by applicant]
JPO, Notice of Allowance (with English translation) for Japanese Patent Application No. 2023-561358, Apr. 1, 2025, 6 pages. [cited by applicant]
CNIPA, First Office Action (with English translation) for Chinese Patent Application No. 202280021669.1, May 30, 2025, 18 pages. [cited by applicant]
IPO, First Examination Report for Indian Patent Application No. 202347065021, Jul. 7, 2025, 6 pages. [cited by applicant]
KIPO, Office Action (with English translation) for Korean Patent Application No. 10-2023-7032245, Jul. 8, 2025, 14 pages. [cited by applicant]
Le, Thuc Trinh, et al., “Object removal from complex videos using a few annotations,” Computation Visual media, vol. 5, No. 3, Sep. 2019, pp. 267-291. [cited by applicant]
EPO, Communication under Rule 71(3) EPC for European Patent Application No. 22812866.6, Aug. 26, 2025, 8 pages. [cited by applicant]