Video clip acquisition method and device, electronic equipment and storage medium
By searching for matches of face features in selfie images in the target feature library and obtaining video clips with the highest similarity based on these features, the problem of low accuracy in video clip search in the prior art is solved, and the quality of Vlog videos is improved.
Patent Information
- Application Number
- CN202311371913.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2025-04-22
AI Technical Summary
In the prior art, the accuracy of searching for user's play video clips directly using the user's selfie image is not high, which affects the effect of the generated Vlog video.
By searching for feature information matching the face features of the target object extracted from the self-portrait image from the target feature library of the target scene area, the face features with the highest similarity are obtained, and the target video clips are obtained from the videos collected by each image acquisition device based on these feature information.
Improves the accuracy and recall of the target video clip, thereby improving the effect of the generated Vlog video.
Smart Images

Figure CN119862303A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video processing technology, and in particular to a method, device, electronic device and storage medium for obtaining video clips. Background Art
[0002] Travel videos are one of the ways for tourists to share their travels and take photos to commemorate the travel process. The camera equipment, video shooting technology and video production capabilities will directly affect the quality of the travel videos produced. The emergence of cultural and tourism video records (Video Log, Vlog) has helped tourists to make travel videos, promote scenic spots, and interact with scenic spots.
[0003] Vlog videos are tourist-centric. By placing cameras in theme parks, amusement parks, scenic spots and other scene areas to automatically capture tourists' play moments, tourists can easily obtain high-quality Vlog videos of people and scenery with one click by scanning their faces, which improves the efficiency and quality of tourism video production. However, the selfie pictures used by users when making Vlog videos and the images taken by the cameras placed in the scene areas have certain differences due to differences in resolution, image size, clarity, etc., especially in scenes with fast movement speeds such as water slides and roller coasters. This difference will be more obvious. In this way, directly using the user's selfie pictures to search for the user's play video clips, the search results are not accurate, and there are cases where the video clips containing the user cannot be searched out, which in turn affects the effect of the generated Vlog video. Summary of the invention
[0004] The present invention provides a video clip acquisition method, device, electronic device and storage medium, which are used to solve the problem in the prior art that the accuracy of directly using the user's selfie to search for the user's gaming video clips is low, thereby affecting the effect of the generated Vlog video.
[0005] The present invention provides a method for obtaining a video clip, comprising:
[0006] Searching, from a target feature library corresponding to the target scene area, first target feature information matching the first facial feature of the target object extracted from the selfie image; the target feature library is used to store feature information, the feature information including a correspondence between each image acquisition device deployed in the target scene area and the facial features in the corresponding acquired facial image;
[0007] Acquire a second facial feature having the highest similarity to the first facial feature from the first target feature information, and search the target feature library for second target feature information matching the second facial feature;
[0008] Based on the first target feature information and the second target feature information, determining the third facial feature with the highest similarity corresponding to each of the image acquisition devices;
[0009] Based on each of the third facial features, a target video segment corresponding to the target object is obtained from a video captured by an image capture device corresponding to each of the third facial features.
[0010] According to a video clip acquisition method provided by the present invention, the determining of the third facial features with the highest similarity corresponding to each of the image acquisition devices based on the first target feature information and the second target feature information includes:
[0011] In a case where the first combined information formed by combining the first target feature information and the second target feature information does not include all image acquisition devices deployed in the target scene area, determining whether there is corresponding peer object identification information for the fourth facial feature with the highest similarity in the first combined information;
[0012] In the case where it is determined that the fourth facial feature has the corresponding peer object identification information, obtaining a fifth facial feature corresponding to the peer object identification information, and determining a target image acquisition device that is not included in the first combination information;
[0013] Search for a sixth facial feature that matches the fifth facial feature among the facial features corresponding to the target image acquisition device in the target feature library, and determine the third facial feature based on the search result and the first target feature information and the second target feature information.
[0014] According to a video clip acquisition method provided by the present invention, determining the third facial feature based on the search results and the first target feature information and the second target feature information includes:
[0015] In the case that the search result shows that the sixth facial feature is not found, searching for an eighth facial feature matching the seventh facial feature among the facial features corresponding to the target image acquisition device in the target feature library; the seventh facial feature is the facial feature corresponding to the second-highest similarity after sorting the similarities between the facial features in the first target feature information and the first facial feature from largest to smallest;
[0016] In the case where the eighth facial feature is searched, determining the corresponding relationship between the eighth facial feature and the target image acquisition device as third target feature information;
[0017] The third facial feature is determined based on second combined information formed by combining the first target feature information, the second target feature information and the third target feature information.
[0018] A video clip acquisition method provided by the present invention also includes:
[0019] In a case where the search result is the sixth facial feature, determining the target image acquisition device and the sixth facial feature as fourth target feature information;
[0020] The third facial feature is determined based on third combined information formed by combining the first target feature information, the second target feature information and the fourth target feature information.
[0021] A video clip acquisition method provided by the present invention also includes:
[0022] When the first combined information includes all image acquisition devices deployed in the target scene area, or when it is determined that the fourth facial feature does not have corresponding peer object identification information, the third facial feature is determined based on the first combined information.
[0023] A video clip acquisition method provided by the present invention also includes:
[0024] Acquire a facial image of each face in the scene image respectively acquired by each of the image acquisition devices;
[0025] For each of the image acquisition devices, extracting facial features of each of the facial images corresponding to the image acquisition device;
[0026] The corresponding relationship between the image acquisition device and the corresponding facial features is determined as the feature information, and the feature information is saved in the target feature library.
[0027] A video clip acquisition method provided by the present invention also includes:
[0028] Determining the pixel distance between each of the faces in the scene image;
[0029] The facial features corresponding to the faces whose pixel distance is less than a preset distance threshold are marked with the same peer object identification information.
[0030] The present invention also provides a video clip acquisition device, comprising:
[0031] A first search module is used to search for first target feature information matching a first facial feature of a target object extracted from a selfie image from a target feature library corresponding to a target scene area; the target feature library is used to store feature information, and the feature information includes a correspondence between each image acquisition device deployed in the target scene area and a facial feature in a corresponding acquired facial image;
[0032] A second search module is used to obtain a second facial feature having the highest similarity to the first facial feature from the first target feature information, and search the target feature library for second target feature information matching the second facial feature;
[0033] A feature determination module, used for determining the third facial feature with the highest similarity corresponding to each of the image acquisition devices based on the first target feature information and the second target feature information;
[0034] The video segment acquisition module is used to acquire the target video segment corresponding to the target object from the video captured by the image acquisition device corresponding to each of the third facial features based on each of the third facial features.
[0035] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-described methods for acquiring video clips when executing the computer program.
[0036] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the video clip acquisition method as described in any one of the above is implemented.
[0037] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the video clip acquisition method as described in any one of the above is implemented.
[0038] The video clip acquisition method, device, electronic device and storage medium provided by the present invention first search for first target feature information matching the first facial feature of the target object extracted from the selfie image from a target feature library corresponding to the target scene area, wherein the target feature library is used to store feature information, and the feature information includes the correspondence between each image acquisition device deployed in the target scene area and the facial features in the corresponding acquired facial image, so that the facial features matching the target object under each image acquisition device can be searched from the target feature library according to the facial features of the selfie image of the target object; then, the second facial feature with the highest similarity to the first facial feature is obtained from the first target feature information, and the second facial feature is the most similar to the target object and takes into account the image acquisition in the target scene area. The facial features of the capture factors of the device, in this way, continue to search for the second target feature information matching the second facial feature from the target feature library, then as many facial features belonging to the target object as possible can be searched, thereby improving the recall rate of the facial features of the target object being searched out; then based on the first target feature information and the second target feature information, determine the third facial features with the highest similarity corresponding to each image acquisition device, which can improve the accuracy of the facial features of the searched target object, and then based on each third facial feature, obtain the target video clip containing the target object from the video captured by the image acquisition device corresponding to each third facial feature, then the accuracy and recall rate of the obtained target video clip can be improved, thereby improving the effect of the Vlog video generated using these target video clips. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 is a flow chart of a method for obtaining a video clip provided by an embodiment of the present invention;
[0041] Figure 2 This is one of the schematic diagrams of the principle of generating a target feature library in an embodiment of the present invention;
[0042] Figure 3 Schematic diagram of the principle of generating a Vlog video in an embodiment of the present invention;
[0043] Figure 4 Schematic diagram of the working principle of the target feature library in an embodiment of the present invention;
[0044] Figure 5This is the second schematic diagram of the principle of generating a target feature library in an embodiment of the present invention;
[0045] Figure 6 is a schematic diagram of the principle of a method for obtaining video clips provided by an embodiment of the present invention;
[0046] Figure 7 is a structural schematic diagram of a video clip acquisition device provided by an embodiment of the present invention;
[0047] Figure 8 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] It should be noted that the serial numbers assigned to the objects described in the present invention, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning.
[0050] The production process of the Vlog video of the target scene area includes the process of capturing facial images of tourists when they are visiting the target scene area and the process of obtaining video clips by scanning their faces to generate the required Vlog video. Among them, when tourists are visiting the target scene area, the image acquisition devices deployed at different points in the target scene area can capture tourists and save the captured facial images. When tourists need to make a Vlog video, they can input facial images by scanning their faces, use the facial images to search for matching facial images in the saved captured facial images, use the searched matching facial images to obtain tour video clips of the preset time period before and after the facial images, and combine these video clips with the template videos provided by the target scenic area to generate the Vlog video required by the face-scanning tourists.
[0051] However, due to the differences in shooting angle, resolution, image size, and clarity between the captured images of the image acquisition devices deployed in the target scene area and the scanned face images used by users when making Vlog videos, when the scanned face images are directly used to search for matching face images in the face captured images stored in the scenic area, the probability of the target being searched out is very low, which in turn reduces the number of video clips searched out, thus affecting the effect of the final Vlog video produced. Moreover, for scenes with fast movement speeds such as water slides and roller coasters, when the image acquisition devices capture the moments of tourists playing, due to occlusion by other tourists, occlusion by environmental objects, and movement of tourists, tourists may not be captured when passing by certain image acquisition devices, resulting in the inability to search out the target under the point of the image acquisition device during post-production of the video, resulting in the lack of video clips at that point, which in turn affects the effect of the final Vlog video produced.
[0052] Based on this, an embodiment of the present invention provides a method for obtaining video clips. On the one hand, the self-portrait image of the target object is first used to search for matching captured images from the target feature library corresponding to the target scene area, and then the captured image most similar to the user's self-portrait image is determined from the searched captured images, and then the most similar captured image is used to search for matching captured images from the target feature library corresponding to the target scene area again, so as to search for as many captured images of the target object as possible, improve the recall rate, and then determine the captured images most similar to the target object corresponding to each image acquisition device based on the captured images searched twice, and use the most similar captured images to obtain the target video clip, thereby improving the number and accuracy of the searched video clips, and further improving the effect of the produced Vlog video. On the other hand, in view of the problem that the target object may be blocked or not captured under different image acquisition devices, the captured images of the objects traveling with the target object can be used to search under the blocked image acquisition device to make up for the missing video clips at the point of the image acquisition device due to the blockage, and further improve the effect of the produced Vlog video.
[0053] Combine the following Figure 1-Figure 6 The video clip acquisition method of the present invention is described. The video clip acquisition method can be applied to electronic devices such as terminal devices or servers. Among them, the terminal devices may include mobile phones, computers, tablet computers, wearable devices, scenic spot tourist self-service machines, etc.; servers may include independent servers, cluster servers or cloud servers, etc. The video clip acquisition method can also be applied to a video clip acquisition device set in an electronic device such as a terminal device or a server. The video clip acquisition device can be implemented by software, hardware or a combination of the two. The video clip acquisition method of the present invention is described below by taking the application of electronic devices as an example.
[0054] Figure 1 The schematic diagram of the process of the video clip acquisition method provided by the embodiment of the present invention is exemplified. Figure 1 As shown, the video clip acquisition method may include the following steps 110 to 140.
[0055] Step 110: searching, from a target feature library corresponding to the target scene area, for first target feature information that matches a first facial feature of the target object extracted from the selfie image.
[0056] The target feature library is used to store feature information, which includes the correspondence between each image acquisition device deployed in the target scene area and the facial features in the corresponding acquired facial image. The target scene area can be the entire scenic area, or at least one amusement park or at least one amusement project in the scenic area, such as a water slide, a roller coaster, etc.
[0057] In the target scene area, image acquisition devices can be deployed at multiple points. For each image acquisition device, when a target passes through the field of view of the image acquisition device, the image acquisition device can capture images of the target passing by, capture the best image frame, such as the clearest and most complete image frame of a face, extract the facial features of each face from the captured image frame, save the corresponding relationship between the image acquisition device and the facial features to the target feature library corresponding to the target scene area, and generate a target feature library. By way of example, the image acquisition device can be a camera and / or a camera, etc.
[0058] Specifically, in an example embodiment, the video clip acquisition method may also include the step of constructing a target feature library, which may specifically include: acquiring a facial image of each face in the scene image respectively acquired by each image acquisition device; for each image acquisition device, extracting facial features of each facial image corresponding to the image acquisition device; determining the correspondence between the image acquisition device and the corresponding facial features as feature information, and saving the feature information in the target feature library.
[0059] For example, Figure 2 One of the schematic diagrams of the principle of generating a target feature library is shown as an example. Figure 2As shown, taking the target scene area as a water slide as an example, assuming that there are 5 image acquisition device points deployed on the water slide, when tourists 1 and 2 are riding on the same boat on the water slide, the image acquisition device can capture images of the passing tourists, and the electronic device can detect and track tourists 1 and 2 based on the scene images captured by the image acquisition device. When tourists 1 and 2 pass through each image acquisition device, the image acquisition device can capture and save the optimal image frame, such as capturing and saving the image frame with the clearest and most complete face, so that the face image and scene image of each tourist under the 5 image acquisition devices can be obtained, and the face image can be extracted from the scene image. Afterwards, facial features can be extracted from the facial images of each tourist under the 5 image acquisition devices, such as inputting the facial image of each tourist into a pre-trained facial feature extraction model, using the facial feature extraction model to extract facial features, and then associating the facial features under each image acquisition device with the image acquisition device, and saving them in the target feature library to complete the construction of the target feature library. In this way, the facial features of each tourist under each image acquisition device can be saved.
[0060] When the user needs to make a Vlog video of the target scene area, the user can input a selfie image through the client interface of the electronic device, such as selecting a selfie image from the selfie images stored in the local storage of the electronic device or in an external storage device through the client interface, or taking a selfie image through the camera of the electronic device. After the electronic device obtains the selfie image, it can extract the first facial feature of the target object in the selfie image, and then use the first facial feature to search for the first target feature information matching the first facial feature from the target feature library corresponding to the target scene area, the first target feature information including the facial feature matching the first facial feature and the information of the image acquisition device that acquires the facial image corresponding to the facial feature.
[0061] For example, the first facial feature can be compared with the facial features corresponding to each image acquisition device in the target feature library to determine the similarity between the first facial feature and each facial feature in the target feature library. If the similarity is greater than or equal to a first preset similarity threshold, the facial feature is determined to be a facial feature that matches the first facial feature. Further, the facial features whose similarities are greater than or equal to the first similarity threshold can be sorted from large to small according to the similarity, and the facial features corresponding to the first preset number of similarities in the sorting result are determined to be facial features that match the first facial feature.
[0062] For example, for facial features with a similarity greater than or equal to a first preset similarity threshold, further threshold filtering can be performed to determine whether there are facial features with a similarity greater than or equal to a second preset similarity threshold. If so, the facial features with a similarity greater than or equal to the second preset similarity threshold are determined as facial features that match the first facial features, and the corresponding relationship between the matched facial features and their corresponding image acquisition devices is determined as the first target feature information; otherwise, the facial features with a similarity greater than or equal to the first preset similarity threshold are determined as facial features that match the first facial features, and the corresponding relationship between the matched facial features and their corresponding image acquisition devices is determined as the first target feature information. In this way, the accuracy of facial feature search can be further improved.
[0063] The second preset similarity threshold is greater than the first preset similarity threshold, for example, the second preset similarity threshold can be 0.9, and the first preset similarity threshold can be 0.7. It is understood that 0.9 and 0.7 are only examples and do not constitute the sole limitation of the present invention.
[0064] For example, the first target feature information may include the similarities calculated for each facial feature that matches the first facial feature.
[0065] Step 120: Obtain a second facial feature having the highest similarity to the first facial feature from the first target feature information, and search the target feature library for second target feature information matching the second facial feature.
[0066] The second target feature information includes the facial feature that matches the second facial feature and information about an image acquisition device that acquires a facial image corresponding to the facial feature.
[0067] For example, it is assumed that the determined first target feature information includes: the corresponding relationship between image acquisition device 1 and facial features A1, B1 and C1; and the corresponding relationship between image acquisition device 2 and facial features A2 and B2. Among them, the similarities between the first facial feature and facial features A1, B1, C1, A2 and B2 are S1, S2, S3, S4 and S5 respectively, and S3>S1>S4>S2>S5, then the facial feature C1 corresponding to the image acquisition device 1 can be determined as the second facial feature, and then the facial feature C1 is used to continue to search for facial features matching the facial feature C1 from the target feature library. For example, if the facial features C1 and A1 corresponding to the image acquisition device 1, the facial feature A2 corresponding to the image acquisition device 2, and the facial features A3 and C3 corresponding to the image acquisition device 3 are searched, then the correspondence between the image acquisition device 1 and the facial features C1 and A1, the correspondence between the image acquisition device 2 and the facial feature A2, and the correspondence between the image acquisition device 3 and the facial features A3 and C3 can be determined as the second target feature information.
[0068] For example, in the process of continuing to search for second target feature information matching the second facial feature from the target feature library using the second facial feature, a third preset similarity threshold can be set to determine facial features having a similarity greater than the third preset similarity threshold as facial features matching the second facial feature.
[0069] For example, for facial features whose similarity is greater than or equal to the third preset similarity threshold, threshold filtering can be further performed to determine whether there are facial features whose similarity is greater than or equal to the fourth preset similarity threshold. If so, the facial features whose similarity is greater than or equal to the fourth preset similarity threshold are determined as facial features that match the second facial features, and the corresponding relationship between the matched facial features and the corresponding image acquisition devices is determined as the second target feature information; otherwise, the facial features whose similarity is greater than or equal to the third preset similarity threshold are determined as facial features that match the second facial features, and the corresponding relationship between the matched facial features and the corresponding image acquisition devices is determined as the second target feature information. The fourth preset similarity threshold is greater than the third preset similarity threshold.
[0070] Step 130: Based on the first target feature information and the second target feature information, determine the third facial feature with the highest similarity corresponding to each image acquisition device.
[0071] After obtaining the first target feature information and the second target feature information, the first target feature information and the second target feature information can be combined to obtain first combined information, which includes the correspondence between the image acquisition device and the facial features. The corresponding similarity is calculated for each facial feature in the first combined information during the search phase of the first target feature information and the second target feature information.
[0072] For example, each facial feature in the first combination information has its own corresponding similarity, and the similarity can be stored in the first combination information. For each image acquisition device in the first combination information, the facial feature with the highest similarity can be determined from the facial features corresponding to the image acquisition device, and a third facial feature corresponding to the image acquisition device can be obtained. The facial image corresponding to the third facial feature is the facial image of the target object acquired by the image acquisition device, and the scene image corresponding to the third facial feature is the scene image acquired by the image acquisition device when the target object passes through the field of view of the image acquisition device.
[0073] For example, after obtaining the first combination information of the first target feature information and the second target feature information, it can be determined whether the first combination information contains all the image acquisition devices deployed in the target scene area. If not all of them are included, for the target image acquisition devices that are not included, the facial features with the highest similarity can be searched from the first combination information, and the facial features of the peer object corresponding to the facial features with the highest similarity are used to search for facial features that match the facial features of the peer object from the facial features corresponding to the target image acquisition device in the target feature library, and the searched facial features are determined as the third facial features corresponding to the target image acquisition device. If a matching facial feature is still not found using the facial features of the peer object, a facial feature can be selected from the facial features corresponding to the target image acquisition device in the first target feature information, such as selecting the facial feature ranked second in similarity, and using this facial feature to search for a matching third facial feature again from the facial features corresponding to the target image acquisition device in the target feature library.
[0074] Step 140: Based on each third facial feature, a target video segment corresponding to the target object is obtained from the video captured by the image capture device corresponding to each third facial feature.
[0075] For each image acquisition device, after obtaining the third facial feature corresponding to the image acquisition device, the target facial image corresponding to the third facial feature can be determined based on the correspondence between the facial feature and the facial image. The target facial image can be a sub-image area in the scene graph acquired by the image acquisition device. According to the correspondence, the target scene graph corresponding to the third facial feature can also be determined. Then, based on the target facial image or the target scene graph, the target video clip corresponding to the target object can be obtained from the video acquired by the image acquisition device. In this way, the target video clip corresponding to the target object under each image acquisition device in the target scene area can be obtained. By way of example, the correspondence between facial features and facial images can be stored in a target feature library.
[0076] For example, the moment when the image acquisition device captures the target scene graph can be obtained, and the video image of the preset time period including the moment can be determined as the target video segment corresponding to the target object. For example, the video images of the first preset time period before the moment, the moment, and the second preset time period after the moment can be determined as the target video segment corresponding to the target object.
[0077] After the target video segment corresponding to the target object under each image acquisition device is obtained, the target video segment under each image acquisition device can be inserted into the template video corresponding to the target scene area to generate a Vlog video of the target object.
[0078] Among them, the template video is a high-quality video with the target scene area as the background. Inserting the video clips of the target object playing in the target scene area into the template video can achieve the perfect combination of "people + scenery" and obtain a high-quality Vlog video, thereby improving the effect of the generated Vlog video.
[0079] For example, Figure 3 The schematic diagram of the principle of generating a Vlog video is shown as an example. Figure 3As shown, taking the need to generate a Vlog video of tourist 1 in a water slide scene as an example, the electronic device can obtain a selfie image of tourist 1 and extract the facial feature E of the selfie image. The video clip acquisition method provided by the embodiment of the present invention is used to search for facial features matching the facial feature E under each image acquisition device deployed on the water slide from the target feature library corresponding to the water slide scene according to the facial feature E. For example, if three image acquisition devices are deployed, the matching facial features searched include: facial features A1, A2 and A3 corresponding to image acquisition device 1, facial features B1 and B2 corresponding to image acquisition device 2, and facial features C1, C2 and C3 corresponding to image acquisition device 3. Then, the facial features with the highest similarity to the facial feature E under each image acquisition device in the search results are filtered out, for example, facial feature A2 corresponding to image acquisition device 1, facial feature B1 corresponding to image acquisition device 2, and facial feature C2 corresponding to image acquisition device 3 are filtered out, and then the scene image P1 corresponding to facial feature A2, the scene image P2 corresponding to facial feature B1, and the scene image P3 corresponding to facial feature C2 are obtained, and then video clip 1 within a preset time period before and after the capturing moment of scene image P1 captured by image acquisition device 1, video clip 2 within a preset time period before and after the capturing moment of scene image P2 captured by image acquisition device 2, and video clip 3 within a preset time period before and after the capturing moment of scene image P3 captured by image acquisition device 3 are obtained, and video clip 1, video clip 2, and video clip 3 are inserted into the template video corresponding to the water slide scene to generate a Vlog video of tourist 1 in the water slide scene.
[0080] It can be understood that the target feature library is in a real-time updating state. When a new tourist passes through the image acquisition device deployed in the target scene area, the facial features of the new tourist will be added to the target feature library. Tourists can also use selfie images to search for their own facial features from the target feature library at any time to obtain the target video clips required for making Vlog videos.
[0081] For example, Figure 4 The schematic diagram of the working principle of the target feature library is shown as an example. Figure 4As shown, assuming that the target feature library has stored the facial features of N tourists, when a new tourist N+1 appears, the facial features of the tourist N+1 can be obtained in the same way and stored in the target feature library, and the features in the target feature library remain in a real-time insertion state. Assuming that tourist 1 needs to make a Vlog video, the facial features of the selfie image of tourist 1 can be extracted, and the facial features of the selfie image can be compared with the facial features currently stored in the target feature library for similarity, and the similarities are sorted in order from large to small. The facial features corresponding to the first preset number of similarities in the sorting result are taken as the facial features of tourist 1, so as to use the searched facial features to obtain the target video clip required for making the Vlog video of tourist 1.
[0082] The video clip acquisition method provided by the embodiment of the present invention first searches for first target feature information matching the first facial feature of the target object extracted from the selfie image from a target feature library corresponding to the target scene area, wherein the target feature library is used to store feature information, and the feature information includes the correspondence between each image acquisition device deployed in the target scene area and the facial features in the corresponding acquired facial image. In this way, the facial features matching the target object under each image acquisition device can be searched from the target feature library based on the facial features of the selfie image of the target object; then, the second facial feature with the highest similarity to the first facial feature is acquired from the first target feature information, and the second facial feature is the one that is most similar to the target object and takes into account the capture factors of the image acquisition device in the target scene area. In this way, by continuing to search for the second target feature information matching the second facial feature from the target feature library, as many facial features belonging to the target object as possible can be searched, thereby improving the recall rate of the facial features of the target object being searched out; then, based on the first target feature information and the second target feature information, the third facial feature with the highest similarity corresponding to each image acquisition device is determined, thereby improving the accuracy of the facial features of the searched target object, and then based on each third facial feature, a target video clip containing the target object is obtained from the video acquired by the image acquisition device corresponding to each third facial feature, thereby improving the accuracy and recall rate of the obtained target video clips, thereby improving the effect of the Vlog video generated using these target video clips.
[0083] Considering that when capturing a target, the image acquisition device in the target scene area may be unable to obtain the target video clip due to the target being blocked or not being captured, which will affect the effect of the Vlog video finally generated. To address this problem, the embodiment of the present invention uses the peer object binding strategy of the image acquisition device difference set to achieve the captured image search and video clip acquisition when the target is blocked or not captured under a certain image acquisition device.
[0084] Specifically, in an example embodiment of the present invention, determining the third facial feature with the highest similarity corresponding to each image acquisition device based on the first target feature information and the second target feature information may include: when the first combined information formed by the combination of the first target feature information and the second target feature information does not include all the image acquisition devices deployed in the target scene area, determining whether the fourth facial feature with the highest similarity in the first combined information has corresponding peer object identification information; when it is determined that the fourth facial feature has corresponding peer object identification information, obtaining the fifth facial feature corresponding to the peer object identification information, and determining the target image acquisition device not included in the first combined information; searching for a sixth facial feature that matches the fifth facial feature among the facial features corresponding to the target image acquisition device in the target feature library, and determining the third facial feature based on the search results and the first target feature information and the second target feature information.
[0085] Furthermore, it also includes: when the first combination information includes all image acquisition devices deployed in the target scene area, or when it is determined that there is no corresponding peer object identification information for the fourth facial feature, determining the third facial feature based on the first combination information.
[0086] Among them, when the first combination information includes all the image acquisition devices deployed in the target scene area, it means that the facial image corresponding to the target object has been searched under each image acquisition device deployed in the target scene area, and the video clip of the target object under each image acquisition device can be obtained.
[0087] For example, taking the example of tourist 1 making a Vlog video of himself in the target scene area by scanning his face, assuming that 5 image acquisition devices are deployed in the target scene area, facial features are extracted from the self-portrait image of tourist 1 to obtain facial feature A. Assuming that the first combination information obtained by the search does not include image acquisition device 2, that is, because tourist 1 was blocked or not captured when passing through image acquisition device 2, no facial features matching facial feature A were searched under image acquisition device 2. In this case, the fifth facial feature with the highest similarity can be obtained from the first combination information, such as facial feature B, and it is determined whether there is corresponding peer object identification information for facial feature B. If there is, for example, the peer object identification information of facial feature C is the same as facial feature B, it can be determined that tourist 2 corresponding to facial feature C is traveling with tourist 1. At this time, the sixth facial feature matching facial feature C of tourist 2 can be searched in the facial features corresponding to image acquisition device 2 in the target feature library. Then, according to the search results and the first target feature information and the second target feature information, the third facial feature with the highest similarity corresponding to each image acquisition device is determined.
[0088] If there is no corresponding peer object identification information for facial feature B, the third facial feature can be determined directly from the first combination information, or the similarities of the facial features in the first combination information can be sorted in order from large to small, and the facial feature D corresponding to the second highest similarity can be selected to determine whether there is corresponding peer object identification information for facial feature D. If so, the facial features of the peer object can be determined using the peer object identification information, and then the facial features of the peer object can be used to search for facial features that match the facial features of the peer object from the facial features corresponding to the image acquisition device 2 in the target feature library, and then the third facial features with the highest similarity corresponding to each image acquisition device can be determined based on the search results at this time and the first target feature information and the second target feature information.
[0089] In this way, by analyzing the first target feature information obtained by the first search and the second target feature information obtained by the second search, it is confirmed which image acquisition device in the target scene area has not searched out the facial features matching the target object. For the target image acquisition device that has not searched out the matching features, the facial features of the bound peer objects are continued to be used to search for matching features under the target image acquisition device, thereby improving the recall rate of the search results. Moreover, based on the facial features of the peer objects, only the target image acquisition devices that have not searched out the matching features in the first two searches are further searched, thereby ensuring the accuracy of the search results.
[0090] In an example embodiment, determining the third facial feature based on the search results and the first target feature information and the second target feature information may include: when the search results show that the sixth facial feature is not found, searching for an eighth facial feature that matches the seventh facial feature among the facial features corresponding to the target image acquisition device in the target feature library; wherein the seventh facial feature is the facial feature corresponding to the second highest similarity after sorting the similarities between the facial features in the first target feature information and the first facial feature from largest to smallest; when the eighth facial feature is found, determining the correspondence between the eighth facial feature and the target image acquisition device as the third target feature information; and determining the third facial feature based on second combined information formed by combining the first target feature information, the second target feature information and the third target feature information.
[0091] Furthermore, it also includes: when the search result is a sixth facial feature, determining the target image acquisition device and the sixth facial feature as fourth target feature information; and determining the third facial feature based on third combined information composed of the first target feature information, the second target feature information and the fourth target feature information.
[0092] For example, take the case where five image acquisition devices are deployed in the target scene area and facial feature A is obtained by extracting facial features from the selfie image of tourist 1. Assuming that the first combination information obtained by searching does not include image acquisition device 2, the fifth facial feature with the highest similarity is obtained from the facial features of the first combination information to obtain facial feature B, and determine whether there is corresponding peer object identification information for facial feature B. If there is, for example, the peer object identification information of facial feature C is the same as facial feature B, then it can be determined that tourist 2 corresponding to facial feature C is traveling with tourist 1. At this time, the sixth facial feature that matches facial feature C of tourist 2 can be searched in the facial features corresponding to image acquisition device 2 in the target feature library.
[0093] If the sixth facial feature is not found, assuming that the first target feature information includes facial features F, G and H, and their similarity is ranked as F>H>G, then facial feature F can be used as the seventh facial feature, and the facial features corresponding to the image acquisition device 2 in the target feature library are searched for a facial feature that matches facial feature F.
[0094] If a facial feature matching the facial feature F is found, such as facial features K1 and K2, the corresponding relationship between the image acquisition device 2 and the facial features K1 and K2 can be determined as the third target feature information. Then, the first target feature information, the second target feature information and the third target feature information are combined to obtain the second combination information, and then for each image acquisition device in the second combination information, the facial feature with the highest similarity is selected from the facial features corresponding to the image acquisition device to obtain the third facial feature corresponding to each image acquisition device. If a facial feature matching the facial feature F is not found, the third facial feature is determined based on the first combination information formed by combining the first target feature information and the second target feature information.
[0095] If a sixth facial feature matching the facial feature C of the tourist 2 is searched in the facial features corresponding to the image acquisition device 2 in the target feature library, for example, K3 and K4 are searched, the corresponding relationship between the image acquisition device 2 and the facial features K3 and K4 can be determined as the fourth target feature information. Then, the first target feature information, the second target feature information, and the fourth target feature information are combined to obtain the third combination information, and then for each image acquisition device in the third combination information, the facial feature with the highest similarity is selected from the facial features corresponding to the image acquisition device to obtain the third facial feature corresponding to each image acquisition device.
[0096] In this way, after further searching the target image acquisition devices that did not find matching features in the first two searches based on the facial features of peer objects, for the target image acquisition devices that still do not find matching features, the facial features ranked second in similarity from largest to smallest in the first search results are used to search for matching facial features in the target image acquisition devices again, so as to search out the target objects captured by the target image acquisition devices as much as possible, thereby further improving the recall rate of the search results.
[0097] For example, a fifth preset similarity threshold can be set. For the facial feature corresponding to the second similarity after sorting the similarities between the facial features in the first target feature information and the first facial feature from large to small, that is, the seventh facial feature, it can be determined whether the similarity corresponding to the seventh facial feature is greater than or equal to the fifth preset similarity threshold. If it is greater than or equal to the fifth preset similarity threshold, then search for an eighth facial feature matching the seventh facial feature among the facial features corresponding to the target image acquisition device in the target feature library. If the similarity corresponding to the seventh facial feature is less than the fifth preset similarity threshold, no subsequent search will be performed, and the third facial feature with the highest similarity corresponding to each image acquisition device can be determined based on the first target feature information and the second target feature information.
[0098] The fifth preset similarity threshold may be set to a relatively high value, such as 0.95, so that the accuracy of the search can be guaranteed.
[0099] The above embodiment can use the facial features of peer objects to assist in searching when the target object is blocked or not captured by the image acquisition device. Accordingly, in the process of generating the target feature library, peer objects can be bound, such as marking the facial features of peer objects with the same peer object identification information, and identifying whether it is a peer object through the peer object identification information.
[0100] Specific, combined Figure 2 Corresponding to the method of the embodiment, in the process of constructing the target feature library, the video clip acquisition method may also include: determining the pixel distance between each face in the scene image; marking the facial features corresponding to the faces whose pixel distance is less than a preset distance threshold with the same peer object identification information.
[0101] For example, Figure 5 The second schematic diagram of the principle of generating a target feature library is shown as an example. Figure 2 and Figure 5As shown, taking the target scene area as a water slide as an example, assuming that a total of 5 image acquisition device points are deployed on the water slide, when tourists 1 and 2 are riding on the same boat and sliding on the water slide, the image acquisition device can capture images of the passing tourists, and the electronic device can detect and track tourists 1 and 2 based on the scene images captured by the image acquisition device, and determine whether tourists 1 and 2 are on the same boat during the detection and tracking process. For example, it can be detected whether the face detection frames of tourists 1 and 2 intersect, and if so, it is determined that tourists 1 and 2 are on the same boat, otherwise it is determined that they are on different boats; or, it can be detected that the pixel distance between the center positions of the faces of tourists 1 and 2 is less than the preset distance threshold, and it is determined that tourists 1 and 2 are on the same boat, otherwise it is determined that they are on different boats.
[0102] When tourists 1 and 2 pass through each image acquisition device, the image acquisition device can capture and save the optimal image frame, so that the facial image and scene image of each tourist under the five image acquisition devices can be obtained. Afterwards, the facial features of each tourist under the five image acquisition devices can be extracted, and the facial features of tourists determined to be on the same ship can be marked with the same peer object identification information, and then the facial features under each image acquisition device can be associated with the image acquisition device and saved in the target feature library to complete the construction of the target feature library. In this way, the facial features of each tourist under each image acquisition device can be saved, and the tourists traveling together can be marked.
[0103] The following is an example in which tourist 1 makes a Vlog video of himself in a water slide scene by scanning his face, and 5 cameras are deployed in the water slide scene, to further illustrate the method for obtaining video clips provided in an embodiment of the present invention.
[0104] Figure 6 The schematic diagram exemplarily shows the principle of the method for obtaining a video clip provided by an embodiment of the present invention, referring to Figure 6As shown, the electronic device can search for features matching facial feature A in the target feature library corresponding to the water slide scene based on facial feature A of tourist 1 extracted from the selfie image of tourist 1. For example, the similarity (such as cosine similarity) between facial feature A and each facial feature in the target feature library can be calculated, and each similarity can be sorted in order from large to small, and facial features corresponding to the first preset number (such as the first 10) of similarities are taken as features matching facial feature A; or, a first preset similarity threshold can be set, and facial features with a similarity greater than or equal to the first preset similarity threshold are determined as features matching facial feature A; or, it can be first determined whether there is a facial feature with a similarity greater than or equal to a second preset similarity threshold among the facial features with a similarity greater than or equal to the first preset similarity threshold, and if so, the facial feature with a similarity greater than or equal to the second preset similarity threshold is determined as a feature matching facial feature A, and if not, the facial feature with a similarity greater than or equal to the first preset similarity threshold is determined as a feature matching facial feature A. Then the searched facial features matching the facial features A and the corresponding cameras are determined as the first target feature information and saved.
[0105] For example, the first target feature information obtained by searching includes: facial feature 31 of tourist 1 corresponding to camera 3, facial feature 24 of tourist 4 corresponding to camera 2, facial feature 21 of tourist 1, and facial feature 52 of tourist 2 corresponding to camera 5. The similarities between these four features and facial feature A are obtained, and they are sorted in descending order according to the similarity, and the sorting result is: facial feature 31>facial feature 21>facial feature 52>facial feature 24.
[0106] At this time, the facial feature 31 can be used to search for facial features matching the facial feature 31 again from the target feature library, and the searched facial features and their corresponding cameras are determined as the second target feature information and saved. Since the facial feature 31 with the highest similarity in the first search result is a feature in the target feature library, the feature comes from the scene image of the water slide scene captured by the camera 3 in the water slide scene, and the other features in the target feature library also come from the scene image of the water slide scene, the scenes are similar, and the image effects of each scene image are similar. Therefore, searching using the facial feature 31 can search for more facial features matching the tourist 1 as much as possible, and improve the recall rate of the search, compared with searching using the facial feature A of the selfie image. Among them, the method of searching for facial features matching the facial feature 31 from the target feature library can refer to the method of searching for features matching the facial feature A in the target feature library, and will not be repeated here.
[0107] For example, the second target feature information obtained by the search includes: facial feature 31 of tourist 1 corresponding to camera 3, facial feature 11 of tourist 1 corresponding to camera 1, facial feature 41 of tourist 1 corresponding to camera 4, and facial feature 42 of tourist 2 corresponding to camera 4.
[0108] After obtaining the first target feature information and the second target feature information, the first target feature information and the second target feature information can be combined to obtain first combined information, including: facial feature 11 of tourist 1 corresponding to camera 1, facial feature 24 of tourist 4 and facial feature 21 of tourist 1 corresponding to camera 2, facial feature 31 of tourist 1 corresponding to camera 3, facial feature 41 of tourist 1 and facial feature 42 of tourist 2 corresponding to camera 4, and facial feature 52 of tourist 2 corresponding to camera 5.
[0109] After obtaining the first combination information, for each camera in the first combination information, determine the facial feature with the highest similarity among the facial features corresponding to the camera in the first combination information, use the facial feature to obtain the target scene image captured by the camera, and then obtain the target video clip within a preset time period before and after the target scene image. In this way, the target video clip corresponding to each camera can be obtained, and these target video clips are integrated into the template video of the water slide scene to obtain the Vlog video of tourist 1 in the water slide scene.
[0110] Alternatively, after obtaining the first combination information, the first combination information can be analyzed to determine whether the first combination information includes all five cameras. If all are included, as described above, the facial features with the highest similarity under each camera in the first combination information are determined, and the target video clip of the corresponding camera is obtained using the facial features, thereby generating the required Vlog video.
[0111] If there are missing cameras in the first combination information, such as camera 5, a third search is performed, that is, the facial feature with the highest similarity in the first combination information is obtained, such as facial feature 11, and then the facial feature 11 is detected to see whether there is peer object identification information. If there is no peer object identification information for facial feature 11, the first combination information is still used to obtain the target video clip corresponding to each camera in the first combination information. If there is peer object identification information for facial feature 11, the facial features of the peer object are found under camera 1 based on the peer object identification information. At this time, the facial features of tourist 2 can be found, such as facial feature 12 of tourist 2, and then the facial features corresponding to camera 5 in the target feature library are searched for facial features that match facial feature 12.
[0112] If a facial feature matching facial feature 12 is found, such as facial feature 52 of tourist 2 and facial feature 53 of tourist 3, the corresponding relationship between camera 5 and facial feature 52 and facial feature 53 is determined as the fourth target feature information. Then, the first combination information and the fourth target feature information are combined to obtain the third combination information, and then the facial feature with the highest similarity under each camera in the third combination information is determined, and the target video clip of the corresponding camera is obtained using the facial feature, thereby generating the required Vlog video.
[0113] If no facial feature matching facial feature 12 is found, a fourth search is performed, that is, the facial feature ranked second in similarity from the first target feature information obtained in the first search is obtained, for example, facial feature 21 of tourist 1 corresponding to camera 2 is obtained, and then the facial feature matching facial feature 21 is searched from the facial features corresponding to camera 5 in the target feature library. If a matching facial feature is found, for example, facial feature 51 of tourist 1 is found, the correspondence between camera 5 and facial feature 51 is determined as the third target feature information, the first combination information and the third target feature information are combined to obtain the second combination information, and then the facial feature with the highest similarity under each camera in the second combination information is determined, and the target video clip of the corresponding camera is obtained using the facial feature, thereby generating the required Vlog video. If no facial feature matching facial feature 21 is found, the facial feature with the highest similarity under each camera in the first combination information is determined, and the target video clip of the corresponding camera is obtained using the facial feature, thereby generating the required Vlog video.
[0114] The video clip acquisition method provided by the embodiment of the present invention adopts a progressive staged search method to acquire the target video clip of the target object in the target scene area. The facial features of the target object in the selfie image are first used to search for matching features in the target feature library to find the facial features most similar to the target object, thereby ensuring the accuracy of the search and realizing the conversion from the selfie image to the captured image of the target scene area. After obtaining the high-precision first search result, the facial features of the captured image with the highest similarity are continuously selected from the first search result, and a matching feature search is performed again in the target feature library to search out as many target objects captured by each image acquisition device as possible, thereby improving the recall rate and improving the effect of searching using only the selfie image. Furthermore, based on the first two search results, the difference set image acquisition devices are analyzed to determine whether the first two search results cover all image acquisition devices in the target scene area. If there is a target image acquisition device that has not been searched for matching features, a third search is performed, that is, the facial features of the target object's peers are used for supplementary search, which solves the problem that the target object is blocked or not captured when passing through certain image acquisition devices, resulting in the missing of the corresponding point video clip, further improving the recall rate, and only searching for matching features under the missing image acquisition device ensures the accuracy of the search. If the facial features of the peers are used in the third search process, the matching facial features are still not found under the missing image acquisition device, then the fourth search can be continued, that is, the facial features ranked second in similarity from large to small are selected from the first search results, and the matching facial features are used to search for matching facial features under the missing image acquisition device in the target feature library, completing the supplementary search, and further improving the recall rate. This progressive phased search method achieves a phased improvement in the recall rate while giving priority to ensuring the search accuracy, which can further improve the accuracy and recall rate of the acquired target video clips, thereby improving the effect of the Vlog video generated using these target video clips.
[0115] The video segment acquisition device provided by the present invention is described below. The video segment acquisition device described below and the video segment acquisition method described above can be referenced to each other.
[0116] Figure 7 The schematic diagram of the structure of the video clip acquisition device provided by the embodiment of the present invention is exemplified. Figure 7 As shown, the video clip acquisition device may include:
[0117] The first search module 710 is used to search for first target feature information matching the first facial feature of the target object extracted from the selfie image from a target feature library corresponding to the target scene area; wherein the target feature library is used to store feature information, and the feature information includes a correspondence between each image acquisition device deployed in the target scene area and the facial features in the corresponding acquired facial image;
[0118] The second search module 720 is used to obtain the second facial feature with the highest similarity to the first facial feature from the first target feature information, and search the target feature library for the second target feature information that matches the second facial feature;
[0119] A feature determination module 730, configured to determine the third facial feature with the highest similarity corresponding to each image acquisition device based on the first target feature information and the second target feature information;
[0120] The video segment acquisition module 740 is used to acquire, based on each third facial feature, a target video segment corresponding to the target object from the video acquired by the image acquisition device corresponding to each third facial feature.
[0121] In an exemplary embodiment, the feature determination module 730 may include: a first determination unit, used to determine whether a fourth facial feature with the highest similarity in the first combination information has corresponding peer object identification information, when the first combination information formed by combining the first target feature information and the second target feature information does not include all image acquisition devices deployed in the target scene area; a second determination unit, used to obtain a fifth facial feature corresponding to the peer object identification information, and determine the target image acquisition device not included in the first combination information, when it is determined that the fourth facial feature has corresponding peer object identification information; a third determination unit, used to search for a sixth facial feature that matches the fifth facial feature among the facial features corresponding to the target image acquisition device in the target feature library, and determine the third facial feature based on the search results and the first target feature information and the second target feature information.
[0122] In an exemplary embodiment, the third determination unit may include: a search subunit, used to search for an eighth facial feature that matches the seventh facial feature among the facial features corresponding to the target image acquisition device in the target feature library when the search result shows that the sixth facial feature is not found; the seventh facial feature is the facial feature corresponding to the second highest similarity after sorting the similarities between the facial features in the first target feature information and the first facial feature from largest to smallest; a first determination subunit, used to determine the correspondence between the eighth facial feature and the target image acquisition device as the third target feature information when the eighth facial feature is found; and a second determination subunit, used to determine the third facial feature based on second combined information formed by combining the first target feature information, the second target feature information and the third target feature information.
[0123] In an exemplary embodiment, the third determination unit may further include: a third determination subunit, used to determine the target image acquisition device and the sixth facial feature as fourth target feature information when the search result is a search for a sixth facial feature; and a fourth determination subunit, used to determine the third facial feature based on third combined information formed by combining the first target feature information, the second target feature information and the fourth target feature information.
[0124] In an exemplary embodiment, the feature determination module 730 may further include: a fourth determination unit, used to determine the third facial feature based on the first combined information when the first combined information includes all image acquisition devices deployed in the target scene area, or when it is determined that there is no corresponding peer object identification information for the fourth facial feature.
[0125] In an exemplary embodiment, the video clip acquisition device may also include: an image acquisition module, used to acquire a facial image of each face in the scene image respectively acquired by each image acquisition device; a feature extraction module, used to extract, for each image acquisition device, facial features of each facial image corresponding to the image acquisition device; and a feature information generation module, used to determine the correspondence between the image acquisition device and the corresponding facial features as feature information, and save the feature information in a target feature library.
[0126] In an exemplary embodiment, the video clip acquisition device may further include: an information marking module, which is used to determine the pixel distance between each face in the scene image, and mark the facial features corresponding to the faces whose pixel distance is less than a preset distance threshold with the same peer object identification information.
[0127] Figure 8 An example of a structural diagram of an electronic device is shown in FIG. Figure 8As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the video clip acquisition method provided by any of the above method embodiments.
[0128] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0129] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the video clip acquisition method provided by any of the above method embodiments.
[0130] On the other hand, the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the video clip acquisition method provided by the above-mentioned method embodiments is implemented.
[0131] Illustratively, the computer-readable storage medium comprises a non-transitory computer-readable storage medium.
[0132] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0133] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for obtaining a video clip, characterized in that: include: Searching, from a target feature library corresponding to the target scene area, first target feature information matching a first facial feature of the target object extracted from the selfie image; The target feature library is used to store feature information, and the feature information includes the corresponding relationship between each image acquisition device deployed in the target scene area and the facial features in the corresponding acquired facial image; Acquire a second facial feature having the highest similarity to the first facial feature from the first target feature information, and search the target feature library for second target feature information matching the second facial feature; Based on the first target feature information and the second target feature information, determining the third facial feature with the highest similarity corresponding to each of the image acquisition devices; Based on each of the third facial features, a target video segment corresponding to the target object is obtained from a video captured by an image capture device corresponding to each of the third facial features.
2. The video clip acquisition method according to claim 1, characterized in that: The determining, based on the first target feature information and the second target feature information, the third facial feature with the highest similarity corresponding to each of the image acquisition devices comprises: In a case where the first combined information formed by combining the first target feature information and the second target feature information does not include all image acquisition devices deployed in the target scene area, determining whether there is corresponding peer object identification information for the fourth facial feature with the highest similarity in the first combined information; In the case where it is determined that the fourth facial feature has the corresponding peer object identification information, obtaining a fifth facial feature corresponding to the peer object identification information, and determining a target image acquisition device that is not included in the first combination information; Search for a sixth facial feature that matches the fifth facial feature among the facial features corresponding to the target image acquisition device in the target feature library, and determine the third facial feature based on the search result and the first target feature information and the second target feature information.
3. The video clip acquisition method according to claim 2, characterized in that: The determining the third facial feature based on the search results and the first target feature information and the second target feature information includes: In the case that the search result shows that the sixth facial feature is not found, searching for an eighth facial feature matching the seventh facial feature among the facial features corresponding to the target image acquisition device in the target feature library; the seventh facial feature is the facial feature corresponding to the second-highest similarity after sorting the similarities between the facial features in the first target feature information and the first facial feature from largest to smallest; In the case where the eighth facial feature is searched, determining the corresponding relationship between the eighth facial feature and the target image acquisition device as third target feature information; The third facial feature is determined based on second combined information formed by combining the first target feature information, the second target feature information and the third target feature information.
4. The video clip acquisition method according to claim 3, characterized in that: Also includes: In a case where the search result is the sixth facial feature, determining the target image acquisition device and the sixth facial feature as fourth target feature information; The third facial feature is determined based on third combined information formed by combining the first target feature information, the second target feature information and the fourth target feature information.
5. The video clip acquisition method according to claim 2, characterized in that: Also includes: When the first combined information includes all image acquisition devices deployed in the target scene area, or when it is determined that the fourth facial feature does not have corresponding peer object identification information, the third facial feature is determined based on the first combined information.
6. The video clip acquisition method according to any one of claims 1 to 5, characterized in that: Also includes: Acquire a facial image of each face in the scene image respectively acquired by each of the image acquisition devices; For each of the image acquisition devices, extracting facial features of each of the facial images corresponding to the image acquisition device; The corresponding relationship between the image acquisition device and the corresponding facial features is determined as the feature information, and the feature information is saved in the target feature library.
7. The video clip acquisition method according to claim 6, characterized in that: Also includes: Determining the pixel distance between each of the faces in the scene image; The facial features corresponding to the faces whose pixel distance is less than a preset distance threshold are marked with the same peer object identification information.
8. A video clip acquisition device, characterized in that: include: A first search module is used to search, from a target feature library corresponding to the target scene area, first target feature information that matches a first facial feature of a target object extracted from the selfie image; The target feature library is used to store feature information, and the feature information includes the corresponding relationship between each image acquisition device deployed in the target scene area and the facial features in the corresponding acquired facial image; A second search module is used to obtain a second facial feature having the highest similarity to the first facial feature from the first target feature information, and search the target feature library for second target feature information matching the second facial feature; A feature determination module, used for determining the third facial feature with the highest similarity corresponding to each of the image acquisition devices based on the first target feature information and the second target feature information; The video segment acquisition module is used to acquire the target video segment corresponding to the target object from the video captured by the image acquisition device corresponding to each of the third facial features based on each of the third facial features.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the video clip acquisition method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the video clip acquisition method according to any one of claims 1 to 7 is implemented.