Method, apparatus, and computer program product for video compression
This video deduplication scheme, based on visual content perception, identifies focal and background regions in video frames. It then uses deep learning models to perform simple clustering and numerical calculations to remove duplicate content across periods and within frames. This solves the problem of efficiently compressing periodic videos on lightweight devices and reduces storage and computing costs.
Patent Information
- Application Number
- CN202210633520.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-06
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2042-06-06
AI Technical Summary
Existing technologies struggle to efficiently compress videos containing periodically repetitive content, leading to excessive storage and transmission demands, and deep learning methods consume too much computational resources on lightweight devices.
A video deduplication scheme based on visual content perception identifies focal and background regions in video frames, uses deep learning models to perform simple clustering and numerical calculations based on detection results, and removes duplicate content across periods and within frames.
It enables efficient video compression on lightweight devices, reducing storage space and computing costs while preserving important video content, making it suitable for edge devices.
Smart Images

Figure CN117241028B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of this disclosure relate to data processing techniques, and more specifically, to methods, apparatus, and computer program products for video compression. Background Technology
[0002] With the increasing prevalence of smart devices and social networks, millions of videos are created and shared every day. Many videos contain periodically repeating processes, such as natural cycles (e.g., lunar phases) and artificially repetitive processes (e.g., traffic patterns, sports, and human activities). The creation and sharing of such a large volume of videos also means a demand for massive amounts of storage space and communication resources. Summary of the Invention
[0003] The embodiments of this disclosure provide a scheme for video compression.
[0004] In a first aspect of this disclosure, a video compression method is provided, the method comprising: segmenting the video into multiple segments according to the period of one or more features of an object in the video having periodic variations; identifying focal regions in frames of the video associated with the object; and compressing the video based on the multiple segments and focal regions.
[0005] In a second aspect of this disclosure, an electronic device is provided, including a processor and a memory coupled to the processor, the memory having instructions stored therein that, when executed by the processor, cause the device to perform actions including: segmenting the video into multiple segments according to a period of periodic variation in response to one or more features of an object in the video having periodic variations; identifying a focal region in a frame of the video associated with the object; and compressing the video based on the multiple segments and the focal regions.
[0006] In a third aspect of this disclosure, a computer program product is provided, which is tangibly stored on a computer-readable medium and includes machine-executable instructions that, when executed, cause a machine to perform the method of the first aspect of this disclosure.
[0007] Please note that this summary is provided to present a simplified version of the chosen concepts, which will be further described in the detailed embodiments below. This summary is not intended to identify key or principal features of this disclosure, nor is it intended to limit the scope of this disclosure. Attached Figure Description
[0008] The above and other objects, features, and advantages of this disclosure will become more apparent from a more detailed description of exemplary embodiments thereof in conjunction with the accompanying drawings, wherein:
[0009] Figure 1 Example environments in which various embodiments of this disclosure may be implemented are shown;
[0010] Figure 2 A flowchart is shown illustrating an example method for compressing video according to some embodiments of this disclosure;
[0011] Figure 3 A flowchart is shown illustrating an example method for compressing video based on multiple segments and focus regions according to some embodiments of the present disclosure;
[0012] Figure 4 Example illustrations of focal areas according to some embodiments of the present disclosure are shown;
[0013] Figure 5 A simplified example of generating a synthetic background image based on multiple frames is shown according to an embodiment of the present disclosure;
[0014] Figure 6 An example visualization of frame clustering according to an embodiment of the present disclosure is shown;
[0015] Figure 7 Example diagrams illustrating fragment clustering according to some embodiments of the present disclosure are shown; and
[0016] Figure 8 A schematic block diagram of a device that can be used to implement embodiments of the present disclosure is shown.
[0017] In all the accompanying drawings, the same or similar reference numerals denote the same or similar elements. Detailed Implementation
[0018] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0019] The term "comprising" and its variations as used herein are open-ended inclusion, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment". Definitions of other terms will be given in the description below.
[0020] Periodic processes, from natural cycles (such as lunar phases, heartbeats, and breathing) to artificially repetitive processes (such as traffic patterns, sports activities, and human activities), are commonplace in daily life. Recording just a few cycles is far from sufficient for observing and analyzing these processes. Typically, thousands or even millions of such repetitions are recorded in video. Such videos can last for hours, consuming vast amounts of storage space and requiring significant communication resources for subsequent transmission.
[0021] The aforementioned videos exhibit a high degree of periodicity, meaning that most of the content is repetitive, with only slight differences between cycles. For example, in a rowing machine training video, the athlete performs similar back-and-forth movements multiple times during a single workout, such as pulling the arms back towards the chest and then pushing them outward in multiple cycles. Most cycles are likely to be highly similar, varying slightly due to the athlete's physical or mental state during training. For ease of explanation, the following description of the disclosed solution will use an example of a rowing machine training video; however, it should be understood that such videos are merely illustrative, and the disclosure is equally applicable to other videos with periodically repetitive content.
[0022] To effectively and efficiently store and transmit periodic videos for further operations (such as analysis), it is necessary to remove duplicate content to compress the video while preserving anomalous motion that differs from other periods for future reconstruction of the original video content or other operations. A common video deduplication method is hash-based. This method first uses computer vision techniques or machine learning to convert video frames into a series of hash codes. Then, it can determine whether two frames or sets of frames are duplicates by comparing their hash codes over time (video clips). This method can measure differences in captions, language (audio), or resolution between two videos to remove duplicate data, but it is not directly applicable to videos with periodic variations and is too costly. Other methods use deep learning models to remove duplicate data from videos. For videos with periodic variations, such models are trained end-to-end as machine learning models to directly estimate the repetition period. Deep learning methods require significant computational power (especially from GPUs) and are therefore unsuitable for deployment in lightweight scenarios (e.g., at edge devices). Therefore, there is a need for cost-effective technologies specifically designed for periodic videos to remove duplicate data from video content, in order to compress videos more cost-effectively and efficiently.
[0023] To at least partially address the aforementioned problems and other potential issues, embodiments of this disclosure propose a visual content-aware video deduplication scheme for video compression. This scheme identifies focal regions associated with content of interest and background regions other than the focal regions in each frame of the video, thereby supporting deduplication at a granularity smaller than that of a single frame. Furthermore, the scheme takes into account the periodicity of video, meaning that even between two frames that are geographically distant, there is a high probability of many overlapping content regions. Based on this understanding, the scheme measures the similarity of focal content at various scales without being constrained by the spatiotemporal continuity between video frames, and removes overlapping content frame-by-frame and across periods based on the similarity of focal content, thereby compressing the video more effectively. According to some embodiments of this disclosure, the deduplication process can be quickly run using only the detection results of video frames from a deep learning model to perform simple clustering algorithms and numerical calculations, without requiring further deep learning inference work, making it ideal for deployment in lightweight video applications (e.g., at edge devices). This scheme differs from video encoding methods such as H.264 and H.265, avoiding IP conflicts with such video codecs, and can be used in conjunction with them to compress video.
[0024] Figure 1 A schematic diagram of an example environment 100 in which various embodiments of the present disclosure can be implemented is shown. Environment 100 may include a computing device 110. Examples of computing devices 110 include, but are not limited to, personal computers, smartphones, tablets, laptops, and desktop computers. The scope of the present disclosure is not limited in this respect. Furthermore, although shown as a single device, computing device 110 may also be multiple devices, virtual devices, or any other form of device suitable for implementing embodiments of the present disclosure.
[0025] For the sake of explanation, Figure 1 Video 120 is also shown. In embodiments of this disclosure, video 120 can be any suitable video with periodically changing content, including one or more objects with periodically changing content. As a non-limiting example, video 120 can be a rowing machine training video as described above. Furthermore, environment 100 may also include more videos and / or other videos with periodically changing repetitive content. Feature data 130 of the objects in video 120 may also be included in environment 100. Feature data 130 may be stored together with the video file, for example, in a digital or text format.
[0026] Computing device 110 can be configured to generate or acquire video 120 from other devices (not shown), perform compression on video 120, and save the result as compressed video 140. The compressed video 140 can then be stored by computing device 110 in its own storage device, or it can be transmitted by computing device 110 to other devices. For example, computing device 110 can perform the above process using methods according to embodiments of this disclosure and / or utilizing feature data 130, which will be described in more detail below in conjunction with other accompanying drawings.
[0027] It should be understood that the structure and function of environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure. Environment 100 may also include Figure 1 Devices, components, and other entities not shown. Furthermore, embodiments of this disclosure can also be applied to environments different from environment 100.
[0028] Figure 2 A flowchart of an example method 200 for compressing video according to some embodiments of the present disclosure is shown. Method 200 can be, for example, by... Figure 1 The device 110 shown is used to perform this. It should be understood that method 200 may also include additional actions not shown, and the scope of this disclosure is not limited in this respect. The following is in conjunction with... Figure 1 Example environment 100 is used to describe method 200 in detail.
[0029] At box 210, in response to one or more features of objects in the video exhibiting periodic changes, the video is segmented into multiple segments according to the periodic changes in periodicity. For example, computing device 110 may segment video 120 into multiple segments according to the periodic changes in periodicity of one or more features of objects in video 120. In other words, due to the periodicity of the content of video 120, certain elements in the frames of video 120 will exhibit periodic patterns. Computing device 110 can segment video 120 into periodic video clips based on these periodic patterns, where each clip includes one period of the pattern.
[0030] The one or more features depend on the specific content of video 120 and can be extracted using, for example, knowledge of the content domain or machine learning techniques. For example, for the purpose of analyzing an object of interest, computing device 120 or other computing devices may have extracted feature data 130 of the object from frames of the video using techniques such as computer vision and speech analysis. This feature data can be stored, for example, in digital or text format associated with the video file and can be used by computing device 110 to segment video 120. Taking a rowing machine training video as an example of video 120, the object can be an athlete, and the features can be the athlete's posture points (e.g., elbows, knees, hips, and ankles), which can form geometric angles (e.g., elbow angles, knee angles, hip angles, and ankle angles). As the athlete repeats the movement multiple times during training, the values of these angles change periodically, reflecting the periodic changes in posture points. Computing device 110 can determine the range in which the start / end of a cycle may occur based on the changing temporal patterns (e.g., within a range where the angles have minimum / maximum values), and thus identify the frames corresponding to the start / end of the cycle, to segment video 120 into segments by cycle.
[0031] In box 220, a focal region associated with the object in a frame of video is identified. For example, computing device 110 may identify a focal region associated with the object in a frame of video 120. Objects that change periodically within a frame are a determinant of video periodicity. The content region associated with it is often a focal point of interest for the video user, for example, the region is most valuable for analyzing the object. Such focal content regions may be identified in embodiments of this disclosure for compressing periodic videos. For example, computing device 110 may use deep learning methods to accurately extract object contours (such as the body contour of an athlete in a rowing machine video) in frames of video 120 and designate the area covered by the contour as the focal region. In some embodiments, computing device 110 may use a heuristic bounding box approach to identify the focal region. Specifically, by using feature data, computing device 110 may form bounding boxes for multiple parts of an object in a frame (e.g., connecting multiple pose points of an athlete into a polygon). Computing device 110 may then combine the multiple bounding boxes to obtain their union, the region of which substantially covers all parts of the object (e.g., the athlete) and is identified as the focal region of that frame.
[0032] As illustrated. Figure 4 Example illustrations of focal regions according to some embodiments of the present disclosure are shown. In this non-limiting example, the results of identifying focal regions in the original frame 410 of rowing machine training using different methods are shown, in this example, the region associated with the athlete's body. Figure 4In the figure, reference numeral 420 illustrates an embodiment of the athlete's body contour extracted using a deep learning method. Reference numeral 430 illustrates bounding boxes for multiple parts of the athlete's body in frame 410, and reference numeral 440 illustrates another embodiment of the focal region extracted using the bounding boxes. Compared to deep learning methods, heuristic bounding box methods can identify the approximate region where the object of interest is located with less computation.
[0033] Now continue Figure 2 At box 230, video compression is performed based on multiple segments and focus regions (obtained at boxes 210 and 220). For example, computing device 110 may compress video 120 based on multiple segments of video 120 divided periodically and focus regions of video 120. In some embodiments, computing device 110 may compress video 120 by removing duplicate focus regions by comparing the similarity of focus regions of frames within a single segment. In some embodiments, computing device 110 may also compress video 120 to obtain compressed video 140 by removing duplicate focus regions by comparing the similarity of focus regions of corresponding frames in multiple segments. This will be discussed later in conjunction with... Figure 3 A more detailed example implementation of compressing video based on multiple segments and focus areas is provided.
[0034] Figure 3 A flowchart illustrating an example method for compressing video based on multiple segments and focus regions according to some embodiments of the present disclosure is shown. Method 300 can be considered as an example implementation of block 230 in method 200. It should be understood that although the actions of method 300 are shown in a certain order, the actions of method 300 can be combined in other suitable orders unless the context otherwise indicates. Furthermore, some actions in method 300 may be omitted in specific embodiments, and additional actions not shown may also be included; the scope of the present disclosure is not limited in this respect. Method 300 can be, for example, by... Figure 1 The computing device 110 shown is used to perform this operation. The following is in conjunction with... Figure 1 Example environment 100 is used to describe method 300 in detail.
[0035] Method 300 can be executed after the video has been segmented into multiple periodic segments according to method 200 and the focal region of the video has been identified.
[0036] In some embodiments, the portion of video 120 other than the focus area is not critical for the purposes of video processing and / or analysis. In such cases, these areas can be considered background areas, and any fluctuations therein can be considered noise and intentionally ignored in video processing and / or analysis. In some such embodiments, computing device 110 may perform deduplication on the background areas of video 120 at frame 310 to compress video 120.
[0037] At subframe 310-1, computing device 110 can remove background regions other than the focus region from at least a portion of the frames of video 120. Computing device 110 can remove background regions from some or all of the frames of video 120 based on the focus region identified in frame 220 of method 200. Through this operation, the amount of data in the frames of video 120 is further reduced.
[0038] At subframe 310-2, based on the background region, computing device 110 can generate one or more synthetic background images for the at least part of the frame.
[0039] In some embodiments, for a segment of video 120 segmented according to method 200, computing device 110 can generate a synthetic background image for the segment based on background regions other than the focal region in the frame of that segment. For example, computing device 110 can find the motion trajectory of an object (e.g., an athlete's body) within a period by analyzing changes in feature data (e.g., pose points). A background region covered by the focal region in one frame may be visible in another frame. Computing device 110 can thus combine background regions from different frames to increase the background region, thereby generating a synthetic background image for the entire period segment. In this way, only portions that are consistently covered by the focal region throughout the entire period (e.g., athlete's body parts) will be unavailable in the background image for the segment. In other embodiments, computing device 110 can also generate a synthetic background image for multiple segments (e.g., a group of segments or a cluster of similar segments), or for the entire video, etc.
[0040] As illustrated. Figure 5A simplified example of generating a composite background image based on multiple frames of a video is shown. In this non-limiting example, the focal regions in frames 510-1, 510-2, and 520-3 are shown as 520-1, 520-2, and 520-3, respectively. As the position of the focal region changes in the video, different background regions are revealed in each frame. A computing device (e.g., computing device 110) can combine the background regions from 520-1, 520-2, and 520-3 to synthesize a background image 530. Thus, only the region 540 occluded by the focal region in all images is unavailable in the background image. It should be understood that, although for clarity... Figure 5 Only three frames are shown, but more frames can be used. As more frames are used to generate the background image, the resulting background image will become more complete.
[0041] At subframe 310-3, computing device 110 may save one or more composite background images associated with at least a portion of frames of the removed background region. In the embodiment for generating composite background images for segments as described above, computing device 110 may retain the focus region of each frame and a single composite background image associated with each segment in the compressed video 120. Computing device 110 may store (e.g., in the form of metadata) a mapping between the composite background images and the corresponding set of frames (e.g., segments or clusters of segments) associated with the compressed video 140 for subsequent operations such as restoration and rendering.
[0042] According to box 310, computing device 110 can perform deduplication on video in units smaller than a frame (e.g., a group of pixels), thereby highly condensing frame content and reducing the requirements for video storage space and computing costs.
[0043] At frame 320, computing device 110 can perform frame-by-frame compression on segments of multiple segments of video 120.
[0044] At subframe 320-1, computing device 110 can divide the frames of the segment into multiple frame clusters (e.g., a predetermined number of frame clusters) based on the similarity of the focal regions between the frames of the segment. In some embodiments, computing device 110 can identify multiple phases of periodic change in video 120 and segment the segment into multiple sub-segments corresponding to the multiple phases. This means that in addition to identifying key phase frames corresponding to the start / end of the period, computing device 110 can also analyze patterns based on domain knowledge and feature data to find representative indicators (such as feature value ranges) of transitions between different phases within the period. Computing device 110 can then identify key phase frames within the segment corresponding to these indicators, thereby segmenting the segment into multiple sub-segments. As a non-limiting example, computing device 110 can find the midpoint of the periodic change, thereby dividing the period into two sub-periods. Then, computing device 110 can segment the periodic segment of video 120 into segments corresponding to the two sub-periods. It should be understood that the number of stages in a cycle and the corresponding sub-segments in a segment depend on the specific video content and application, and the scope of this disclosure is not limited by the specific number of stages and sub-segments.
[0045] Then, for each of the multiple sub-segments, the computing device 110 can divide the frames of the sub-segment into a set of frame clusters (e.g., a predetermined number of frame clusters) based on the similarity of the focal region between the frames of the sub-segment, as part of a plurality of frame clusters. By clustering each sub-segment of the segment separately, the computing device 110 can obtain multiple frame clusters that are more evenly distributed across different stages of the entire cycle. Taking a rowing machine training video as an example, the computing device 110 can segment the video segment by taking the moment when the athlete's body is extended and the arms are pulled back to the chest (e.g., when the angle of the knees and hips is the largest and the angle of the elbows is the smallest) as the start / end of the cycle, and further identify the moment when the athlete's body is curled up and the arms are extended (e.g., when the angle of the knees and hips is the smallest and the angle of the elbows is the largest) as the midpoint of the cycle to divide the segment into two sub-segments. Clustering these two sub-segments separately avoids clustering frames with similar athlete body positions in different stages together, thereby ensuring that frames including content from different stages within the cycle are preserved in the compression result.
[0046] In some embodiments, as a basis for performing similarity clustering, computing device 110 may calculate a focus content difference value between the focus region of each frame in a segment and the focus region of a key stage frame of the segment (the start / end frame of a periodic segment, and / or other key stage frames that divide the segment into sub-segments). Then, for example, by performing unsupervised learning (e.g., K-Means) on the calculated difference values of each frame, computing device 110 may divide the frames into multiple frame clusters. In some such embodiments, computing device 110 may perform difference value calculations on the focus region of each frame within a segment and the focus region of the start frame of that segment, and perform clustering on the calculated focus content difference values to divide the frames of the segment into multiple clusters. In some embodiments where sub-segments are divided, computing device 110 may perform difference value calculations on each frame within a sub-segment and the key stage frame that is the start of that sub-segment. For example, for a rowing machine training video example where focus regions are extracted by bounding boxes, computing device 110 may calculate the difference value between frames based on the geometric information of the bounding box of each body part. In other embodiments, the computing device may also use other appropriate values that characterize the focal region as the basis for clustering.
[0047] As illustrated. Figure 6 An example visualization 600 of frame clustering according to an embodiment of the present disclosure is shown, illustrating the visualization of the results of performing clustering on frames of a sub-segment in an example rowing machine training video. The rowing machine training video may be... Figure 1 An example of a medium-length video 120 is provided, and clustering operations can be performed by computing device 110. The following will combine... Figure 1 Let's describe the example visualization 600.
[0048] In this non-limiting example, computing device 110 divides a segment of video 120 into two sub-segments, and performs clustering operations on each sub-segment as described above to obtain a predetermined number of clusters. Visualization 600 shows the clustering results for one of the preceding sub-segments in a three-dimensional feature space. Coordinate axes 610-1, 610-2, and 610-3 represent features with the highest variance. Each point (e.g., point 530) represents the location of a frame in the sub-segment within this feature space. Boxes 620-1 to 620-5 schematically illustrate the range of frames included in each frame cluster. In this example, typically each cluster contains frames in chronological order, as these frames are largely similar based on their focus content. Computing device 110 then selects the point (frame) closest to the center of each cluster as the reference frame for similarity comparisons for subsequent operations. It should be understood that the visualization 600 is shown for illustrative purposes only, and the number of frames, frame clusters, and features therein is merely an example. In other embodiments, any other appropriate number of frames, frame clusters, and features may also be used.
[0049] Now back Figure 3 At subframe 320-2, for a segment among multiple segments, computing device 110 can compress the segment based on the division of multiple frame clusters within the segment at subframe 320-1. In some embodiments, for a frame cluster among multiple frame clusters, computing device 110 can determine the center frame of the frame cluster, where the center frame is the frame in the frame cluster closest to the center of the frame cluster. For example, computing device 110 can calculate this by projecting the focus content difference value of the frame onto the corresponding feature space. Then, computing device 110 can compare other frames in the frame cluster with the center frame, and remove the other frame from the segment in response to the similarity between the focus region of the center frame and another frame in the frame cluster satisfying a threshold. Computing device 110 can compare similarities in a manner similar to that described above, and consider the focus regions of two frames with similarity less than a threshold as content that overlaps with each other. This threshold may depend on the specific application, and the scope of this disclosure is not limited thereto. Through this operation, the computing device 110 can retain only the center frame and the focus content area of frames different from the center frame in each frame cluster, thereby reducing the amount of video data while retaining useful content to the greatest extent.
[0050] Compared to sampling at time intervals within segments or sub-segments that only considers the time factor, selecting benchmark frames based on similarity clustering takes into account the video content. Frames selected in this way can represent the different content within sub-segments to the greatest extent, thereby improving the efficiency and comprehensiveness of deduplication and achieving better video compression results.
[0051] In some embodiments, after performing frame-by-frame deduplication on frames within a segment, computing device 110 may also perform segment-by-segment deduplication on multiple segments at block 330.
[0052] At subframe 330-1, computing device 110 can further divide multiple segments of video 120 into multiple segment clusters (e.g., a predetermined number of clusters) based on the similarity of periodically changing periods among multiple segments. Taking a rowing machine training video as an example, the quality of the athlete's movement varies across different periods. Compared to periods with different qualities, the trend of movement variation is more similar between periods of similar quality, and the segments corresponding to these periods are more likely to have content that overlaps with each other. Therefore, grouping segments corresponding to periods of similar quality into the same cluster for processing can be beneficial for compression.
[0053] Similar to frame similarity, computation 110 can integrate feature metrics that quantify the focal regions of each frame within each segment as the basis for calculating the similarity between segments. In some embodiments, computation device 110 can calculate similarity based on the content difference vectors of a segment's frames relative to key stage frames. For example, for each segment, computation device 110 can compare the similarity between the segment's content difference vector and the content difference value of the current center segment of each existing cluster. If the highest similarity satisfies (e.g., a predefined) threshold, the segment is grouped into the corresponding cluster. Otherwise, the segment forms a new cluster. In other embodiments, depending on the video content and specific application, computation device 110 may also employ other quantified representations of video segments as the basis for similarity clustering.
[0054] At box 330-2, computing device 110 can also compress video 120 based on the partitioning of multiple segment clusters (at subbox 320-2). In some embodiments, computing device 110 can determine the center segment of a segment cluster among multiple segment clusters, the center segment being the first segment in the segment cluster closest to the center of that segment cluster. Similar to the center segment of a frame cluster, computing device 110 can use the Euclidean distance between the focal region representations of segments in the cluster to find and / or label the center segment. Then, for a second segment in a segment cluster, computing device 110 can compare the frame of the second segment with the corresponding frame of the center segment. Based on the similarity of the focal regions between the frame and the corresponding frame of the center segment meeting a threshold, computing device 110 can remove that frame of the second segment from the second segment. In some such embodiments, computing device 110 can sort the segments in the segment cluster except for the center segment by time and perform the above comparison and deduplication operations on these segments sequentially. In some of these embodiments, computing device 110 may also use the manner described above with respect to boxes 310-3 to generate and retain only one synthetic background image for each segment cluster.
[0055] As illustrated. Figure 7 An example illustration 700 of video 120 segment clustering according to some embodiments of the present disclosure is shown. In this non-limiting example, based on the focus content region difference value vectors of the segments of video 120 (as previously described), video 120 is divided into segment clusters 710-1 to 710-N. For each cluster, in this example, only one synthetic background image is generated and will be retained in the compressed result (e.g., compressed video 140), such as synthetic background image 720-1 for segment cluster 710-1 and synthetic background image 720-N for segment cluster 710-N.
[0056] By comparing the content perception between corresponding frames of cross-period segments as described above, the temporal continuity between video frames can be broken, and content duplication data deletion across time scales can be achieved based on the focus content in video frames of different segments.
[0057] Building upon method 200, method 300 can provide deduplication logic at different granular levels, thereby achieving better video compression results. For example, the computing device performing video compression (e.g., computing device 110) can first perform a frame-by-frame visual content deduplication process targeting the focal and background regions of each periodic segment of the video. Then, the segments are clustered, and video frames from the central segment of each cluster are used as the content basis to further remove duplicate content from that cluster. Furthermore, duplicate content metadata and mapping relationships can be saved, for example, in coordinate form along with the compression results for subsequent video content restoration. In this process, all intermediate computation results can be stored in plain text format, thus not consuming excessive memory. Moreover, all computational operations are numerical calculations and classic statistical machine learning techniques, requiring minimal resource consumption or powerful hardware support.
[0058] Figure 8 A schematic block diagram of a device 800 that can be used to implement embodiments of the present disclosure is shown. Device 800 may be the device or apparatus described in the embodiments of the present disclosure. Figure 8 As shown, device 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) 802 or loaded from storage unit 808 into random access memory (RAM) 803. The RAM 803 may also store various programs and data required for the operation of device 800. The CPU 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804. Although not shown in... Figure 8 As shown, device 800 may also include a coprocessor.
[0059] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0060] The various methods or processes described above can be executed by processing unit 801. For example, in some embodiments, the methods can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by CPU 801, one or more steps or actions in the methods or processes described above can be performed.
[0061] In some embodiments, the methods and processes described above can be implemented as a computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this disclosure.
[0062] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0063] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, a local area network (LAN), a wide area network (WAN), and / or a wireless network, to an external computer or external storage device. The network may include copper cables, fiber optic cables, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0064] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages and conventional procedural programming languages. The computer-readable program instructions may execute entirely on a user's computer, partially on a user's computer, as a standalone software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0065] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0066] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0067] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0068] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A video compression method, comprising: In response to one or more features of an object in the video having periodic changes, the video is segmented into multiple segments according to the period of the periodic changes; Identify the focal region in the video frame that is associated with the object; as well as The video is compressed based on the multiple segments and the focus area; Compressing the video based on the multiple segments and the focal region includes: For each of the multiple segments, based on the similarity of the focal region among the frames of the segment, the frames of the segment are divided into multiple frame clusters; and The fragment is compressed based on the division of the multiple frame clusters; The compression of the segment based on the division of the multiple frame clusters includes: Determine the center frame of each of the plurality of frame clusters, wherein the center frame is the frame in the frame cluster that is closest to the center of the frame cluster; and In response to the similarity between the focal region and another frame in the frame cluster satisfying a threshold, the other frame is removed from the segment.
2. The method according to claim 1, further comprising: Remove the background area other than the focus area from at least a portion of the frames of the video; Based on the background region, generate one or more synthetic background images for at least a portion of the frames; as well as The one or more synthetic background images are saved in association with at least a portion of the frames in which the background region has been removed.
3. The method of claim 2, wherein generating one or more synthetic background images for the at least a subset of frames comprises: For each of the plurality of segments, a composite background image is generated based on the background region in the frame of the segment other than the focal region.
4. The method according to claim 1, wherein dividing the frames of the segment into multiple frame clusters includes: Identify multiple stages of the aforementioned periodic changes; Based on the multiple stages, the segment is divided into multiple sub-segments corresponding to the multiple stages; For each of the plurality of sub-segments, based on the similarity of the focal region among the frames of the sub-segment, the frames of the sub-segment are divided into a set of frame clusters, which are part of the plurality of frame clusters.
5. The method of claim 1, wherein compressing the video further comprises: Based on the similarity of the periodic changes among the multiple segments, the multiple segments are divided into multiple segment clusters; as well as The video is compressed based on the partitioning of the multiple segments by clustering.
6. The method of claim 5, wherein compressing the video based on the partitioning of the plurality of segments by clustering comprises: Determine the central segment of the fragment clusters among the plurality of fragment clusters, wherein the central segment is the first segment in the fragment cluster that is closest to the center of the fragment cluster; For the second segment in the aforementioned segment cluster: In response to the similarity between the frame of the focal region in the second segment and the corresponding frame of the center segment meeting a threshold, the frame of the second segment is removed from the second segment.
7. An electronic device, comprising: processor; as well as A memory coupled to the processor, the memory having instructions stored therein, the instructions causing the device to perform actions when executed by the processor, the actions including: In response to one or more features of an object in the video having periodic changes, the video is segmented into multiple segments according to the period of the periodic changes; Identify the focal region in a frame of the video that is associated with the object; and The video is compressed based on the multiple segments and the focus area; Compressing the video based on the multiple segments and the focal region includes: For each of the multiple segments, based on the similarity of the focal region among the frames of the segment, the frames of the segment are divided into multiple frame clusters; and The fragment is compressed based on the division of the multiple frame clusters; The compression of the segment based on the division of the multiple frame clusters includes: Determine the center frame of each of the plurality of frame clusters, wherein the center frame is the frame in the frame cluster that is closest to the center of the frame cluster; and In response to the similarity between the focal region and another frame in the frame cluster satisfying a threshold, the other frame is removed from the segment.
8. The device according to claim 7, wherein the action further includes: Remove the background area other than the focus area from at least a portion of the frames of the video; Based on the background region, generate one or more synthetic background images for at least a portion of the frames; as well as The one or more synthetic background images are saved in association with at least a portion of the frames in which the background region has been removed.
9. The apparatus of claim 8, wherein generating one or more synthetic background images for the at least a subset of frames comprises: For each of the plurality of segments, a composite background image is generated based on the background region in the frame of the segment other than the focal region.
10. The device according to claim 7, wherein dividing the frames of the segment into multiple frame clusters includes: Identify multiple stages of the aforementioned periodic changes; Based on the multiple stages, the segment is divided into multiple sub-segments corresponding to the multiple stages; For each of the plurality of sub-segments, based on the similarity of the focal region among the frames of the sub-segment, the frames of the sub-segment are divided into a set of frame clusters, which are part of the plurality of frame clusters.
11. The device of claim 7, wherein compressing the video further comprises: Based on the similarity of the periodic changes among the multiple segments, the multiple segments are divided into multiple segment clusters; as well as The video is compressed based on the partitioning of the multiple segments by clustering.
12. The device of claim 11, wherein compressing the video based on the partitioning of the plurality of segments clusters comprises: Determine the central segment of the fragment clusters among the plurality of fragment clusters, wherein the central segment is the first segment in the fragment cluster that is closest to the center of the fragment cluster; For the second segment in the aforementioned segment cluster: In response to the similarity between the frame of the focal region in the second segment and the corresponding frame of the center segment meeting a threshold, the frame of the second segment is removed from the second segment.
13. A computer program product tangibly stored on a computer-readable medium and comprising machine-executable instructions that, when executed, cause a machine to perform the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
System and Method for Processing Video Content Having Redundant Pixel Values
US20090161766A1
Micro-service based deduplication
WO2018191709A1
