Video processing method and apparatus, electronic device, and medium
Abstract
The present disclosure provides a video processing method and apparatus, an electronic device, and a medium, and the method includes: acquiring a to-be-erased region including a to-be-erased object in each target video frame of a to-be-processed video; acquiring, for a single target video frame, acquiring, from another target video frame other than the target video frame, a target region that corresponds to a to-be-erased region of the target video frame and does not include the to-be-erased object; filling pixels of the target region into the to-be-erased region of the target video frame, to erase the to-be-erased region of the target video frame; and in response to an unerased region existing in the to-be-erased region of the target video frame, predicting pixels of the unerased region according to the target video frame, and filling the unerased region according to the predicted pixels to erase the unerased region.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 13 · Forward citations: 0.
Claims (11 — 3 Independent, 8 Dependent)
- Claim 1Independent Claim
A video processing method, comprising: acquiring a to-be-erased region comprising a to-be-erased object in each first video frame of a to-be-processed video; acquiring, for a single first video frame, from another first video frame other than the first video frame, a first region that corresponds to a to-be-erased region of the first video frame and does not comprise the to-be-erased object; filling pixels of the first region into the to-be-erased region of the first video frame, to erase the to-be-erased region of the first video frame; and in response to an unerased region existing in the to-be-erased region of the first video frame, predicting pixels of the unerased region according to the first video frame, and filling the unerased region according to the predicted pixels to erase the unerased region; wherein predicting pixels of the unerased region according to the first video frame comprises: in response to the first video frame not being a first one of video frames in the to-be-processed video, predicting the pixels of the unerased region according to the first video frame, at least one video frame adjacent to the first video frame, and a second video frame, wherein a position of the second video frame in the to-be-processed video is before a position of the first video frame in the to-be-processed video, and a to-be-erased region in the second video frame has been erased and pixel filling or pixel prediction of the to-be-erased region of the second video frame has been completed.
- Claim 2Depends on #1
The method according to claim 1, wherein predicting pixels of the unerased region according to the first video frame comprises: predicting the pixels of the unerased region based on a region that is adjacent to the unerased region in the first video frame.
- Claim 3Depends on #1
The method according to claim 1, wherein predicting the pixels of the unerased region according to the first video frame, at least one video frame adjacent to the first video frame, and a second video frame, comprises: inputting the first video frame, the at least one video frame adjacent to the first video frame, and the second video frame into a pre-trained video erasure model to predict the pixels of the unerased region.
- Claim 4Depends on #1
The method according to claim 1, wherein acquiring a to-be-erased region comprising a to-be-erased object in each first video frame of a to-be-processed video comprises: acquiring a candidate region comprising the to-be-erased object in one first video frame of the to-be-processed video; and determining, based on the candidate region, the to-be-erased region comprising the to-be-erased object in each first video frame of the to-be-processed video.
- Claim 5Depends on #4
The method according to claim 4, wherein acquiring a candidate region comprising a to-be-erased object in one first video frame of the to-be-processed video comprises: acquiring the candidate region in the one first video frame in response to a region selection operation for the to-be-erased object in the one first video frame of the to-be-processed video; or comprises: performing target detection on the to-be-processed video to acquire the to-be-erased object; and determining a region comprising the to-be-erased object in the one first video frame of the to-be-processed video as the candidate region.
- Claim 6Independent Claim
An electronic device, comprising a processor, wherein the processor is configured to execute a computer program stored in a memory, when the computer program is executed by the processor, a video processing method is implemented, and the video processing method comprises: acquiring a to-be-erased region comprising a to-be-erased object in each first video frame of a to-be-processed video; acquiring, for a single first video frame, from another first video frame other than the first video frame, a first region that corresponds to a to-be-erased region of the first video frame and does not comprise the to-be-erased object; filling pixels of the first region into the to-be-erased region of the first video frame, to erase the to-be-erased region of the first video frame; and in response to an unerased region existing in the to-be-erased region of the first video frame, predicting pixels of the unerased region according to the first video frame, and filling the unerased region according to the predicted pixels to erase the unerased region; wherein predicting pixels of the unerased region according to the first video frame comprises: in response to the first video frame not being a first one of video frames in the to-be-processed video, predicting the pixels of the unerased region according to the first video frame, at least one video frame adjacent to the first video frame, and a second video frame, wherein a position of the second video frame in the to-be-processed video is before a position of the first video frame in the to-be-processed video, and a to-be-erased region in the second video frame has been erased and pixel filling or pixel prediction of the to-be-erased region of the second video frame has been completed.
- Claim 7Depends on #6
The electronic device according to claim 6, wherein predicting pixels of the unerased region according to the first video frame comprises: predicting the pixels of the unerased region based on a region that is adjacent to the unerased region in the first video frame.
- Claim 8Depends on #6
The electronic device according to claim 6, wherein predicting the pixels of the unerased region according to the first video frame, at least one video frame adjacent to the first video frame, and a second video frame, comprises: inputting the first video frame, the at least one video frame adjacent to the first video frame, and the second video frame into a pre-trained video erasure model to predict the pixels of the unerased region.
- Claim 9Depends on #6
The electronic device according to claim 6, wherein acquiring a to-be-erased region comprising a to-be-erased object in each first video frame of a to-be-processed video comprises: acquiring a candidate region comprising the to-be-erased object in one first video frame of the to-be-processed video; and determining, based on the candidate region, the to-be-erased region comprising the to-be-erased object in each first video frame of the to-be-processed video.
- Claim 10Depends on #9
The electronic device according to claim 9, wherein acquiring a candidate region comprising a to-be-erased object in one first video frame of the to-be-processed video comprises: acquiring the candidate region in the one video frame in response to a region selection operation for the to-be-erased object in the one first video frame of the to-be-processed video; or comprises: performing target detection on the to-be-processed video to acquire the to-be-erased object; and determining a region comprising the to-be-erased object in the one target first video frame of the to-be-processed video as the candidate region.
- Claim 11Independent Claim
A non-transitory computer-readable storage medium, storing a computer program, wherein when the computer program is executed by a processor, a video processing method is implemented; wherein the video processing method comprises: acquiring a to-be-erased region comprising a to-be-erased object in each first video frame of a to-be-processed video; acquiring, for a single first video frame, from another first video frame other than the first video frame, a first region that corresponds to a to-be-erased region of the first video frame and does not comprise the to-be-erased object; filling pixels of the first region into the to-be-erased region of the first video frame, to erase the to-be-erased region of the first video frame; and in response to an unerased region existing in the to-be-erased region of the first video frame, predicting pixels of the unerased region according to the first video frame, and filling the unerased region according to the predicted pixels to erase the unerased region; wherein predicting pixels of the unerased region according to the first video frame comprises: in response to the first video frame not being a first one of video frames in the to-be-processed video, predicting the pixels of the unerased region according to the first video frame, at least one video frame adjacent to the first video frame, and a second video frame, wherein a position of the second video frame in the to-be-processed video is before a position of the first video frame in the to-be-processed video, and a to-be-erased region in the second video frame has been erased and pixel filling or pixel prediction of the to-be-erased region of the second video frame has been completed.
Technical Overview & Description
CROSS-REFERENCE TO RELATED APPLICATION This is a national stage application based on International Patent Application No. PCT/CN2022/117970, filed Sep. 9, 2022, which claims priority to Chinese Patent Application No. 202111056524.9, filed on Sep. 9, 2021, entitled “ VIDEO PROCESSING METHOD AND APPARATUS, ELECTRONIC DEVICE, MEDIUM, AND PROGRAM PRODUCT, ” the disclosures of which are incorporated herein by reference in their entireties. TECHNICAL FIELD The present disclosure relates to the field of video processing technology and, in particular, to a video processing method and apparatus, an electronic device, a medium, and a program product. BACKGROUND As the standard of living improves, a growing number of people go out to travel and take videos as souvenirs. However, there are often people passing by during video capturing, which tends to ruin the aesthetics of the video. Currently, erasure for a video is relatively static, for example, removal of watermarks from a video. Therefore, how to erase a dynamic object in a video has become a technical problem that needs to be resolved urgently. SUMMARY In order to solve the above-mentioned technical problems or at least partially solve the above-mentioned technical problems, the present disclosure provides a video processing method and apparatus, an electronic device, a medium, and a program product. According to a first aspect of the present disclosure, a video processing method is provided, including: acquiring a to-be-erased region including a to-be-erased object in each target video frame of a to-be-processed video; acquiring, for a single target video frame, from another target video frame other than the target video frame, a target region that corresponds to a to-be-erased region of the target video frame and does not include the to-be-erased object; filling pixels of the target region into the to-be-erased region of the target video frame, to erase the to-be-erased region of the target video frame; and in response
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (13)
| Patent | Title | Year | Citations |
|---|
Non-Patent Literature (10)
- Office Action for Chinese Patent Application No. 202111056524.9, mailed on Jul. 31, 2025, 17 pages.
- Kim et al.,
- “
- Deep Video Inpainting
- ”
- , Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019, 10 pages.
- Wang et al.,
- “
- Fast Online Object Tracking and Segmentation: A Unifying Approach
- ”