Mirror operation recommendation method and device and electronic equipment
Through the image feature and attribute feature extraction model, suitable camera movement modes are recommended for video shooting, which solves the problem of poor combination of camera movement templates and actual scenes in the existing technology, and improves the quality of video shooting.
Patent Information
- Application Number
- CN202411044361.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-10-29
AI Technical Summary
When existing video shooting software combines the camera movement template with the actual shooting scene, the effect is blunt, resulting in low film quality.
Through the image feature extraction model and attribute feature extraction model, combined with the overall characteristics of the real-time shooting scene and the attribute features filtered by reference keywords, a suitable camera movement mode is pushed to the user, realizing the natural integration of the camera movement mode and the shooting scene, and highlighting the shooting object.
It improves the quality of video shooting, allows the camera movement mode to naturally integrate with the scene, highlights the subject, and improves the shooting effect.
Smart Images

Figure CN118870181A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of image technology, and specifically relates to a camera movement recommendation method, device and electronic equipment. Background Art
[0002] With the popularization of electronic devices, the shooting function of electronic devices has become an important function of electronic devices.
[0003] At present, Internet technology is well developed, and various video shooting software has emerged. Video shooting software can help users shoot high-quality and expressive videos, for example, by adding camera movements to the captured videos to improve the video quality. Specifically, in the video shooting software, some application videos of camera movements are presented to users as templates. After the user sees the camera movement effect presented in the video in the template, the user can select the camera movement template when shooting, so that a smooth camera movement effect can be automatically achieved in the captured video.
[0004] In the prior art, there are differences between the actual shooting scene of the user and the example scene in the camera movement template. If the camera movement effect presented by the template is rigidly combined with the actual shooting scene of the user, the resulting film will be of low quality. Summary of the invention
[0005] The purpose of the embodiment of the present application is to provide a camera movement recommendation method, which can combine the overall characteristics of the real-time shooting scene and the attribute characteristics based on reference keyword screening to push a camera movement mode suitable for the current shooting scene to the user, which not only makes the camera movement mode and the shooting scene naturally integrated, but also based on the application of the camera movement mode, it can also highlight the individual shooting subjects in the shooting scene, thereby improving the quality of the film.
[0006] In a first aspect, an embodiment of the present application provides a camera movement recommendation method, the method comprising: outputting image feature information of a preprocessed image through an image feature extraction model; outputting attribute feature information of the preprocessed image based on reference keywords through an attribute feature extraction model; inputting the image feature information and the attribute feature information into a camera movement recommendation model, and outputting camera movement recommendation information through the camera movement recommendation model; wherein the camera movement recommendation information comprises a recommended camera movement mode, and the camera movement mode is a camera movement mode suitable for a video shooting scene corresponding to the preprocessed image.
[0007] In a second aspect, an embodiment of the present application provides a camera movement recommendation device, which includes: a processing module, used to output image feature information of a preprocessed image through an image feature extraction model; output attribute feature information of the preprocessed image based on reference keywords through an attribute feature extraction model; input the image feature information and the attribute feature information into a camera movement recommendation model, and output camera movement recommendation information through the camera movement recommendation model; wherein the camera movement recommendation information includes a recommended camera movement mode, and the camera movement mode is a camera movement mode suitable for the video shooting scene corresponding to the preprocessed image.
[0008] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps described in the first aspect are implemented.
[0009] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0010] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0011] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0012] In an embodiment of the present application, in a video shooting scene, a preprocessed image that can represent the current shooting scene is obtained, and an image feature extraction model is used to output image feature information of the preprocessed image, and the image feature information is used to represent the feature information of the overall image content; then, an attribute feature extraction model is used to output attribute feature information of the preprocessed image based on reference keywords, and the attribute feature information is used to represent the feature information extracted from the image content for the reference keywords, and specifically, it can be the feature information of individual related shooting objects; thereby, the two feature information are input into a camera movement recommendation model, and the camera movement recommendation model uses the two feature information to fully analyze and understand the overall shooting scene and individual shooting objects, and then outputs a camera movement mode suitable for the video shooting scene corresponding to the preprocessed image. It can be seen that in an embodiment of the present application, the camera movement mode suitable for the current shooting scene is pushed to the user in combination with the overall features of the real-time shooting scene and the attribute features selected based on the reference keywords, which not only makes the camera movement mode naturally integrated with the shooting scene, but also based on the application of the camera movement mode, it can also highlight the individual shooting objects in the shooting scene, thereby improving the quality of the film. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 is a flow chart of a camera movement recommendation method according to some embodiments of the present application;
[0014] Figure 2 is a flow chart of a camera movement recommendation method according to some embodiments of the present application;
[0015] Figure 3 is a flow chart of a camera movement recommendation method according to some embodiments of the present application;
[0016] Figure 4 is a flow chart of a camera movement recommendation method according to some embodiments of the present application;
[0017] Figure 5 is a display schematic diagram of an electronic device in some embodiments of the present application;
[0018] Figure 6 is a display schematic diagram of an electronic device in some embodiments of the present application;
[0019] Figure 7 is a flow chart of a camera movement recommendation method according to some embodiments of the present application;
[0020] Figure 8 is a flow chart of a camera movement recommendation method according to some embodiments of the present application;
[0021] Fig. 9 is a flow chart of a camera movement recommendation method according to some embodiments of the present application;
[0022] Fig.10is a block diagram of a camera movement recommendation device in some embodiments of the present application;
[0023] Fig.11 Schematic diagram of the hardware structure of the electronic device of some embodiments of the present application;
[0024] Fig.12 It is a schematic diagram of the hardware structure of an electronic device of some embodiments of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings of the embodiments of the present application to clearly describe the technical solutions of the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present application belong to the scope of protection of this application.
[0026] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally a class, and the number of objects is not limited. For example, the target object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0027] The following is a detailed description of the camera movement recommendation method provided in the embodiment of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0028] It should be noted that the camera movement recommendation method provided in the embodiments of the present application can be executed by electronic devices such as mobile phones, tablet computers, laptop computers, PDAs, and vehicle-mounted electronic devices. In some embodiments of the present application, the camera movement recommendation method provided in the embodiments of the present application is described by taking the electronic device as the execution subject to execute the camera movement recommendation method.
[0029] The camera motion recommendation method provided in the embodiment of the present application can be applied to the scene of shooting videos. One specific application scenario is that after the user enters the camera program, he selects a mode such as a micro-movie. In this mode, a suitable camera motion mode can be recommended to the user before or during the user shoots a video; another specific application scenario is that after the user enters the camera program, he selects a video recording mode. In addition, the user needs to enable the camera motion recommendation function in advance in the settings page, so that a suitable camera motion mode can be recommended to the user before or during the user shoots a video.
[0030] like Figure 1 FIG. 1 is a flowchart of a method for recommending camera movement according to an embodiment of the present application. The method is applied to an electronic device as an example. The method includes:
[0031] Step 110: Output image feature information of the preprocessed image through an image feature extraction model.
[0032] Optionally, the image feature extraction model is a MobilenetV2 model.
[0033] Optionally, the image feature information is image depth feature information, which at least includes feature information such as color, contour, scene, etc. The image feature information may be output in the form of a semantic feature vector.
[0034] like Figure 2 As shown, the preprocessed image 201 is input into the MobilenetV2 model. After being trained with a large amount of image data, the model can effectively extract complex and rich image depth feature information from the preprocessed image 201. For example, for a portrait image, the model can extract the color feature information of the portrait image, including color distribution, such as the average color value; it can also extract the contour feature information of the portrait image, such as the edge strength and edge direction of the portrait; it can also extract the scene feature information of the portrait image, such as indoors, outdoors, etc. Further, these depth feature information are converted into a semantic feature vector 202, which is a multidimensional vector containing rich semantic information. Exemplarily, for a portrait image, the feature vector can represent information such as the portrait's movements, expressions, and environment.
[0035] The semantic feature vector outputted by this step is an eighty-dimensional semantic feature vector, which is used to represent the overall feature information of the image.
[0036] The application scenario of this embodiment is that after the user enters the camera program, he selects a mode such as a micro-movie. In this mode, before the user clicks the shooting button, a shooting preview interface is displayed on the screen, thereby obtaining a frame image displayed in the shooting preview interface as a pre-processed image.
[0037] The application scenario of this embodiment is that after the user enters the camera program, he selects the video recording mode. In addition, the user turns on the camera movement recommendation function in the setting page in advance, so that before the user clicks the shooting button, the shooting preview interface is displayed on the screen, and a frame image displayed in the shooting preview interface is obtained as a pre-processed image.
[0038] Furthermore, based on the above two application scenarios, before the user shoots, the camera movement mode can be recommended to the user in the shooting preview interface, so that the user can click the shooting button under the guidance of the camera movement mode to shoot a video using the camera movement. Furthermore, during the user's shooting process, the camera movement mode can continue to be recommended to the user to continuously guide the user to shoot the video.
[0039] Step 120: Outputting attribute feature information of the preprocessed image based on the reference keywords through the attribute feature extraction model.
[0040] Optionally, the attribute feature information of the preprocessed image is an 80-dimensional attribute feature vector, and the attribute feature vector is used to represent the attribute feature information related to the reference keyword in the preprocessed image. The reference keyword can be used to identify the photographed object in the preprocessed image, so that the attribute feature vector is used to represent the attribute feature information of the photographed object in the preprocessed image.
[0041] For example, based on the reference keywords, the human subject in the portrait image can be identified, and attribute feature information of the human subject can be output, such as the attribute feature information describing that the posture of the human subject is half body.
[0042] For another example, based on reference keywords, the food photography object in the food image can be identified, thereby outputting attribute feature information of the food photography object, such as the attribute feature information describing that the food photography object is a table full of food.
[0043] Step 130: input the image feature information and the attribute feature information into the camera movement recommendation model, and output the camera movement recommendation information through the camera movement recommendation model.
[0044] The camera movement recommendation information includes a recommended camera movement mode, where the camera movement mode is a camera movement mode suitable for the video shooting scene corresponding to the pre-processed image.
[0045] Optionally, the camera motion recommendation model consists of two fully connected layers, such as Figure 3 As shown, the semantic feature vector 301 and the attribute feature vector 302 outputted in the previous steps are fused to obtain a fused feature vector 303, which is a 160-dimensional feature vector. The fused feature vector 303 is inputted into the camera movement recommendation model, and the camera movement recommendation model outputs the camera movement recommendation information.
[0046] In more embodiments, the image feature information is fused with the attribute feature information to obtain fused feature information. This process can be output in more forms, not limited to vector form.
[0047] like Figure 4As shown, the preprocessed image 401 is an image of a girl posing sideways, and a semantic feature vector and an attribute feature vector are output. After fusion, a fused feature vector is obtained, and the fused feature vector is input into the camera movement recommendation model 402, which outputs a surround camera movement mode to recommend to the user.
[0048] In an embodiment of the present application, in a video shooting scene, a preprocessed image that can represent the current shooting scene is obtained, and an image feature extraction model is used to output image feature information of the preprocessed image, and the image feature information is used to represent the feature information of the overall image content; then, an attribute feature extraction model is used to output attribute feature information of the preprocessed image based on reference keywords, and the attribute feature information is used to represent the feature information extracted from the image content for the reference keywords, and specifically, it can be the feature information of individual related shooting objects; thereby, the two feature information are input into a camera movement recommendation model, and the camera movement recommendation model uses the two feature information to fully analyze and understand the overall shooting scene and individual shooting objects, and then outputs a camera movement mode suitable for the video shooting scene corresponding to the preprocessed image. It can be seen that in an embodiment of the present application, the camera movement mode suitable for the current shooting scene is pushed to the user in combination with the overall features of the real-time shooting scene and the attribute features selected based on the reference keywords, which not only makes the camera movement mode naturally integrated with the shooting scene, but also based on the application of the camera movement mode, it can also highlight the individual shooting objects in the shooting scene, thereby improving the quality of the film.
[0049] In the process of the camera movement recommendation method of another embodiment of the present application, step 130 includes:
[0050] Sub-step A1: In the shooting preview interface, a camera movement prompt window is displayed.
[0051] In an exemplary display scheme, as Figure 5 As shown in FIG. 6 , a pop-up window is displayed in the shooting preview interface, and the pop-up window is a camera movement prompt window 501 ; and as shown in FIG. 6 , a pop-up window is displayed in the shooting preview interface, and the pop-up window is a camera movement prompt window 601 .
[0052] Sub-step A2: During the video shooting process, in the camera movement prompt window, video shooting guidance information corresponding to the camera movement mode and a camera movement reference video identifier are displayed.
[0053] In this step, the video shooting guidance information is used to guide the user on how to operate during the shooting process so that the captured video has the camera movement effect corresponding to the camera movement mode.
[0054] In an exemplary display scheme, as Figure 5As shown, the camera movement prompt window 501 displays text content: Push the camera forward, and displays a recommendation label to indicate that the camera movement mode of pushing the camera forward is recommended; at the same time, it also displays text content: Keep balance and aim at the subject to be photographed and slowly move the phone forward, as video shooting guidance information to guide the user on how to operate during the shooting process. Figure 6 As shown, in the camera movement prompt window 601, text content is displayed: Bird's-eye view shooting, and a recommendation label is displayed to indicate that the bird's-eye view shooting mode is recommended; at the same time, text content is also displayed: The lens is higher than the food subject, and the phone is tilted downward to shoot, which serves as video shooting guidance information to guide users on how to operate during the shooting process.
[0055] The camera movement reference video identifier is used to indicate the camera movement reference video of the recommended camera movement mode.
[0056] When receiving a play control input of a camera movement reference video identifier from a user, the camera movement reference video is played.
[0057] In this step, the camera movement reference video is used to show the camera movement effect of the camera movement mode applied in the example video to the user in the form of a video. Optionally, the camera movement reference video identifier is the first frame of the camera movement reference video, wherein the playback control is displayed in the first frame.
[0058] In some embodiments of the present application, the above-mentioned playback control input is used to trigger the playback of the camera movement reference video. The first input can be a first operation. Exemplarily, the above-mentioned first input includes but is not limited to: the user's touch input to the controls on the screen or the screen area through a touch device such as a finger or a stylus, or a voice command input by the user, or a specific gesture input by the user, or other feasible inputs, which can be determined according to actual use requirements, and the embodiments of the present invention are not limited. The specific gesture in the embodiment of the present application can be any one of a single-click gesture, a sliding gesture, a drag gesture, a pressure recognition gesture, a long press gesture, an area change gesture, a double-press gesture, and a double-click gesture; the click input in the embodiment of the present application can be a single-click input, a double-click input, or any number of click inputs, etc., and can also be a long press input or a short press input.
[0059] like Figure 6 As shown, the camera movement reference video identifier, that is, the first frame of the camera movement reference video, is displayed in the camera movement prompt window 601. The above-mentioned playback control input is: the user clicks the playback control 602 displayed above, thereby playing the camera movement reference video in the camera movement prompt window 601.
[0060] In one display scheme, a camera movement prompt window is displayed in the shooting preview interface, and video shooting guidance information and camera movement reference video logo are displayed in the camera movement prompt window, so that users can understand the video shooting guidance information and watch the camera movement reference video before shooting; further, during the video shooting process, the camera movement prompt window is displayed from time to time, so that users can understand the video shooting guidance information and watch the camera movement reference video at any time.
[0061] In this embodiment, based on recommending a camera movement mode for a user based on the current shooting scene, a method for displaying the recommendation result is provided. A camera movement prompt window can be displayed in the interface. The camera movement prompt window is used to display the video shooting guidance information and the camera movement reference video mark corresponding to the recommended camera movement mode. The user can read the video shooting guidance information, and under the guidance of the information, perform operations during the shooting process, such as zooming in the lens, etc., so as to assist the user to complete the camera movement operation in the video shooting; in addition, the user can also watch the camera movement reference video indicated by the camera movement reference video mark to watch the actual application effect of the camera movement mode. Among them, the interface for displaying the camera movement prompt window can be a shooting preview interface before shooting, or it can be a shooting interface during shooting. It can be seen that based on the display scheme provided by this embodiment, it can well assist the user to complete the video shooting, so as to help the user shoot a high-quality video with a natural fusion of the camera movement effect and the shooting scene.
[0062] In the process of the camera movement recommendation method of another embodiment of the present application, step 130 includes:
[0063] Sub-step B1: Determine the probability value of the preprocessed image matching each camera movement mode through the camera movement recommendation model, and output at least one camera movement mode whose probability value meets the camera movement recommendation condition.
[0064] The camera movement recommendation model uses a multi-classification network, which outputs probability values of different camera movement modes to measure the suitability of each camera movement mode for the current preprocessed image. For example, when the probability value exceeds a fixed threshold σ, such as "0.5", it means that the probability value meets the camera movement recommendation condition, and thus the camera movement mode corresponding to the probability value is output.
[0065] Furthermore, a variety of common camera movement modes are pre-established in the camera movement recommendation model, so as to output probability values of the preprocessed image matching various camera movement modes. The probability values are sorted, and the highest three probability values that are greater than a fixed threshold σ meet the camera movement recommendation conditions.
[0066] Optionally, output one to three camera movement modes. Figure 5 and Figure 6 As shown, in the camera movement prompt window, the user can slide left and right to switch the currently recommended camera movement mode.
[0067] In this embodiment, a method for determining the camera movement mode that is ultimately recommended to the user is provided. In the camera movement recommendation model, the suitability of each camera movement mode for the current shooting scene can be calculated and represented by the probability value of the preprocessed image matching each camera movement mode. Based on such an algorithm, at least one camera movement mode with a higher suitability can be output for recommendation to the user, so that the recommendation result is more accurate.
[0068] In the process of the camera movement recommendation method of another embodiment of the present application, the method further includes:
[0069] Step C1: determining a frame of preview image displayed on the shooting preview interface as a pre-processed image.
[0070] In this embodiment, an application scenario is provided. Before a user clicks a shooting button, that is, before shooting a video, a frame of preview image is selected as a pre-processed image based on the shooting scene presented in the shooting preview interface. The pre-processed image can represent the current shooting scene, so that a camera movement mode can be recommended to the user in advance before the user shoots, so as to assist the user's subsequent shooting operation.
[0071] In the process of the camera movement recommendation method of another embodiment of the present application, the reference keywords include human body keywords and food keywords; step 120 includes:
[0072] Sub-step D1: using the detection model, based on the human keywords and the food keywords, in the pre-processed image, respectively identifying the human subjects that match the human keywords and the food subjects that match the food keywords.
[0073] In this step, the preprocessed image is input into the detection model. The detection model identifies the image content matching the human body keywords in the preprocessed image, that is, the human body object, based on the human body keywords. At the same time, the detection model identifies the image content matching the food keywords in the preprocessed image, that is, the food object, based on the food keywords.
[0074] Sub-step D2: Marking the human subjects and food subjects that meet the marking conditions through the detection frame, wherein the marking conditions include: the area of the detection frame is greater than the area threshold and the distance between the detection frame and the center of the pre-processed image is less than the distance threshold.
[0075] Optionally, the detection box is a rectangular detection box.
[0076] In the preprocessed image, each time a human subject is identified, the human subject is marked with a detection frame so that the human subject is located within the detection frame; at the same time, each time a food subject is identified, the food subject is marked with a detection frame so that the food subject is located within the detection frame. For example, a human subject is a person, and a food subject is a type of food.
[0077] Furthermore, after the marking is completed, the detection frames need to be screened to retain the detection frames that meet the marking conditions.
[0078] First, when the area of a detection frame is less than or equal to a certain area threshold, the subject in the detection frame is considered to be not the main subject, and the detection frame is removed. Then, for the remaining detection frames, when the distance between the center point of a detection frame and the center point of the preprocessed image is greater than or equal to a certain distance threshold, the subject in the detection frame is considered to be not the main subject, and the detection frame is removed. Finally, the detection frames that remain are the detection frames that meet the marking conditions.
[0079] Sub-step D3: When all detection frames mark human subjects, or at least one detection frame marks a food subject, or at least one detection frame marks a human subject, and the maximum area of the detection frame marking the human subject is greater than or equal to N times the maximum area of the detection frame marking the food subject, output human attribute feature information through the human attribute feature extraction sub-model. The attribute feature extraction model includes the human attribute feature extraction sub-model.
[0080] Wherein, N is a positive integer greater than 1.
[0081] First, all detection frames contain human subjects and enter the output branch of human attribute feature information, and the human attribute feature information is output through the human attribute feature extraction sub-model.
[0082] Secondly, some detection frames contain human subjects, while others contain food subjects, which need further confirmation. Specifically, all detection frames that are food subjects are found as the first group, and all detection frames that are human subjects are found as the second group; the maximum area of the detection frame in the first group is confirmed, recorded as area one, and the maximum area of the detection frame in the second group is confirmed, recorded as area two, and area one and area two are compared; if area two is greater than or equal to N times area one, the output branch of human attribute feature information is entered, and the human attribute feature information is output through the human attribute feature extraction submodel.
[0083] Optionally, in order to avoid the two maximum areas being close to each other and being unable to determine whether the human body object or the food object is the subject, the value of N can be slightly larger, such as N=3.
[0084] Sub-step D4: When all detection frames mark the food photography object, or at least one detection frame marks the food photography object, at least one detection frame marks the human photography object, and the maximum area of the detection frame marking the human photography object is less than N times the maximum area of the detection frame marking the food photography object, the food attribute feature information is output through the food attribute feature extraction sub-model. The attribute feature extraction model includes the food attribute feature extraction sub-model.
[0085] First, all detection frames contain food photography objects and enter the output branch of food attribute feature information, and the food attribute feature information is output through the food attribute feature extraction sub-model.
[0086] Secondly, some detection frames contain human subjects, while others contain food subjects, which need further confirmation. Specifically, all detection frames that are food subjects are found as the first group, and all detection frames that are human subjects are found as the second group; the maximum area of the detection frame in the first group is confirmed, recorded as area one, and the maximum area of the detection frame in the second group is confirmed, recorded as area two, and area one and area two are compared; if area two is less than N times area one, the output branch of food attribute feature information is entered, and the food attribute feature information is output through the food attribute feature extraction submodel.
[0087] In this embodiment, the detection frames where the human body is located and the detection frames where the food is located are marked in the pre-processed image, and then redundant detection frames are eliminated according to the detection frame area and the detection frame position, and then it is determined whether to output food attribute feature information or human body attribute feature information based on the remaining detection frames. Therefore, after identifying whether the current shooting scene is a food shooting scene or a portrait shooting scene, the attribute feature information of the current shooting scene can be output specifically, so that the recommended camera movement mode is combined with the attribute feature information of the shooting scene, thereby enabling the camera movement mode to be better integrated with the shooting scene.
[0088] In the process of the camera movement recommendation method of another embodiment of the present application, step D3 includes:
[0089] Sub-step E1: Outputting human attribute feature information through a human attribute feature extraction sub-model according to the image content in the detection frame where the marked human subject is located and the number of detection frames where the marked human subject is located.
[0090] Optionally, a detection frame where the human subject is located is cropped out from the preprocessed image.
[0091] like Figure 7 As shown, a human attribute feature extraction sub-model PARNet is constructed. Each detection frame image 701 is resized and normalized and then sent to the model network. After passing through different modules as shown in the figure, such as various convolutions, BatchNormolize, global pooling, and fully connected layers, an eight-dimensional feature vector is finally output. The eight dimensions correspond to eight human attribute features. Before the eight-dimensional feature vector is output through two fully connected layers, an eighty-dimensional feature vector 702 is obtained. The eighty-dimensional feature vector represents the output human attribute feature information.
[0092] Furthermore, after step E1, the method further comprises:
[0093] Step E2: Based on the human attribute feature information, output the probability value of the pre-processed image matching each human attribute feature.
[0094] Among them, the human body attribute characteristics include at least one of the following: full body front, full body side, full body back, half body front, half body side, half body back, close-up, and multiple people.
[0095] The human attribute feature extraction sub-model is trained by training images marked with human attribute feature labels. During the training process, the human attribute feature extraction sub-model is used to output the probability value of the training image matching each human attribute feature, and the training image includes a human subject.
[0096] The human attribute feature extraction sub-model finally outputs an eight-dimensional feature vector. The eight dimensions correspond to eight human attribute features in order, namely: full body front, full body side, full body back, half body front, half body side, half body back, close-up, and multiple people.
[0097] The values of each dimension in the eight-dimensional feature vector respectively represent the probability values of the preprocessed image matching various human attribute features.
[0098] For example, the value of the first dimension is "0.8", which means that the probability value of a single human subject in the pre-processed image output by the model is "80%".
[0099] For reference, in the process of defining human attribute features, eight human attribute features are defined based on the number of detection frames, the orientation of the human subject in the detection frame, and the scene in the detection frame.
[0100] Before using the human attribute feature extraction sub-model to output human attribute feature information, the human attribute feature extraction sub-model needs to be trained.
[0101] During the training process, a training data set is first constructed, which includes a large number of training images, which are portrait images of human subjects. Then, human attribute feature labels are marked on a large number of training images according to the algorithm.
[0102] For reference, the algorithm will mark training images in which multiple people appear as human body attribute feature labels of multiple people; the algorithm will mark training images in which single portraits appear at the calf and below as full-body human body attribute feature labels; the algorithm will mark training images in which single portraits appear from the chest to the knee as half-body human body attribute feature labels; the algorithm will mark training images in which single portraits appear above the chest as close-up human body attribute feature labels; the algorithm will mark training images in which single portraits appear between "45" degrees on the left side and "45" degrees on the right side of the body torso as front human body attribute feature labels; the algorithm will mark training images in which single portraits appear between 45 degrees and "135" degrees on the left side of the body torso as side human body attribute feature labels; the algorithm will mark training images in which single portraits appear between "45" degrees and "135" degrees on the right side of the body torso as side human body attribute feature labels; the algorithm will mark training images in which single portraits appear at other angles of the body torso as back human body attribute feature labels. Based on this, the training images in the training data set are marked with human attribute feature labels, which can be human attribute feature labels for the front of the whole body, human attribute feature labels for the side of the whole body, human attribute feature labels for the back of the whole body, human attribute feature labels for the front of half body, human attribute feature labels for the side of half body, human attribute feature labels for the back of half body, human attribute feature labels for close-up, and human attribute feature labels for multiple people.
[0103] Next, a human attribute feature extraction sub-model is constructed, and the size of the training image is resized to the network input size M×M. Taking the "224×224" size as an example, it is sent to the model network after normalization. After passing through different modules, such as various convolutions, global pooling, and fully connected layers, an eight-dimensional feature vector is obtained. These eight dimensions correspond to eight human attribute features, in the following order: full body front, full body side, full body back, half body front, half body face, half body back, close-up, and multiple people. This vector is used to represent the probability value of the training image matching various human attribute features.
[0104] Finally, the training reference of a training image is that the reference probability value of the human attribute feature indicated by the human attribute feature label of the training image is one, and the reference probability values of the other human attribute features are zero, so as to calculate the loss function by combining the output eight-dimensional feature vector, and update the weight by gradient descent method. Among them, the loss function uses the cross entropy loss function. Repeat the training for a large number of training images until the final loss function converges and the training is completed.
[0105] Based on this, after training the human attribute feature extraction sub-model, the model counts the number of detection frames cropped out from the preprocessed image. If the number is multiple, the probability value of the output human attribute features of multiple people is close to one or even one; conversely, if the number is one, it is necessary to output the probability values matching various human attribute features based on the orientation and scene type of the human subject in one detection frame.
[0106] In this embodiment, the human attribute feature extraction sub-model is used to output the probability value of the pre-processed image matching various human attribute features, and the 80-dimensional feature vector obtained before the probability value is output is used as the output human attribute feature information for splicing with the image feature information. In addition, the model is trained by combining the human attribute feature labels of the training image and the probability value of the human attribute feature of the training image output by the model, so that the trained model can accurately output the probability value of the pre-processed image matching the human attribute feature, and can also output accurate human attribute feature information.
[0107] In the process of the camera movement recommendation method of another embodiment of the present application, step D4 includes:
[0108] Sub-step F1: through the food attribute feature extraction sub-model, output the food attribute feature information according to the number of detection frames where the marked food photography objects are located and the area ratio of the detection frames where the marked food photography objects are located in the pre-processed image.
[0109] like Figure 8 As shown in the figure, a food attribute feature extraction sub-model FoodNet is constructed, and the pre-processed image 801 is sent to the model network after resizing and normalization. After passing through different modules as shown in the figure, such as various convolutions, Batch Normolize, global pooling, and fully connected layers, a four-dimensional feature vector is finally output. The four dimensions correspond to the four food attribute features. Among them, before outputting the four-dimensional feature vector through two fully connected layers, an eighty-dimensional feature vector 802 will be obtained, and the eighty-dimensional feature vector represents the output food attribute feature information.
[0110] When there are multiple detection frames, it is necessary to calculate the ratio of the sum of the areas of all detection frames to the area of the preprocessed image to obtain the area ratio.
[0111] Furthermore, after step F1, the method further comprises:
[0112] Step F2: Based on the food attribute feature information, output the probability value of the pre-processed image matching each food attribute feature.
[0113] Among them, the food attribute characteristics include at least one of the following: a table full of food, small food, a single food, and a close-up.
[0114] The food attribute feature extraction sub-model is trained with training images marked with food attribute feature labels. During the training process, the food attribute feature extraction sub-model is used to output the probability value of the training image matching each food attribute feature, and the training image includes the food photography object.
[0115] The food attribute feature extraction sub-model finally outputs a four-dimensional feature vector. The four dimensions correspond to the four food attribute features in order, namely: a table full of food, small food, single food, and close-up.
[0116] The values of each dimension in the four-dimensional feature vector represent the probability value of the preprocessed image matching each food attribute feature.
[0117] For example, the value of the first dimension is "0.8", which means that the probability value of the preprocessed image output by the model is "80%".
[0118] For reference, in the process of defining food attribute features, four food attribute features are defined based on the number of detection frames and the size of the detection frames.
[0119] Before using the food attribute feature extraction sub-model to output food attribute feature information, the food attribute feature extraction sub-model needs to be trained.
[0120] In the training process, a training data set is first constructed, which includes a large number of training images, and the training images are food images including food photography objects. Then, the food attribute feature labels are marked on the large number of training images according to the algorithm.
[0121] For reference, the algorithm will mark training images in which one kind of food appears and the food occupies an area larger than half of the image area as close-up food attribute feature labels; the algorithm will mark training images in which multiple kinds of food appear and the multiple kinds of food occupy an area larger than half of the image area as table full of food attribute feature labels; the algorithm will mark training images in which one kind of food appears and the food occupies less than half of the image area as single food attribute feature labels; the algorithm will mark training images in which multiple kinds of food appear and the multiple kinds of food occupy less than half of the image area as small food attribute feature labels.
[0122] Next, we build a sub-model for extracting food attribute features and resize the training image to the network input size M×M. Taking the size of "224×224" as an example, we send it to the model network after normalization. After going through different modules, such as various convolutions, global pooling, and fully connected layers, a four-dimensional feature vector is output through softmax. These four dimensions correspond to four types of food attribute features, in the following order: a table full of food, small food, a single food, and a close-up. This vector is used to represent the probability value of the training image matching various food attribute features.
[0123] Finally, the training reference of a training image is that the reference probability value of the food attribute feature indicated by the food attribute feature label of the training image is one, and the reference probability values of the other food attribute features are zero, so as to calculate the loss function by combining the output four-dimensional feature vector, and update the weight by gradient descent method. Among them, the loss function uses the cross entropy loss function. Repeat the training for a large number of training images until the final loss function converges and the training is completed.
[0124] Based on this, after training the food attribute feature extraction sub-model, the model counts the number of detection frames where the food photography subjects in the preprocessed image are located. If the number is multiple, it corresponds to multiple foods; conversely, if the number is one, it corresponds to one food. At the same time, the model also compares the area ratio of the detection frame where the food photography objects in the preprocessed image are located, and the relationship between the area ratio and a certain area threshold, such as half of the area of the preprocessed image. The model combines the number and area ratio to finally output the probability value that matches various food attribute features.
[0125] In this embodiment, the food attribute feature extraction sub-model is used to output the probability value of the pre-processed image matching various food attribute features, and the 80-dimensional feature vector obtained before the probability value is output is used as the output food attribute feature information for splicing with the image feature information. In addition, the model is trained by combining the food attribute feature labels of the training image and the probability value of the food attribute feature of the training image output by the model, so that the trained model can accurately output the probability value of the pre-processed image matching the food attribute feature, and can also output accurate food attribute feature information.
[0126] In the process of the camera movement recommendation method of another embodiment of the present application, before step 130, the method further includes:
[0127] Step G1: Based on the reference keyword, a training video is obtained, wherein the training video satisfies at least one of the following conditions: the training video is of the reference duration, and the resolution of the training video is greater than a resolution threshold.
[0128] Optionally, high-quality portrait videos and food videos are crawled from high-quality video databases, such as major video websites, based on reference keywords, such as human body keywords and food keywords, and the crawled videos are cut into five-second video clips, with one video clip serving as a training video.
[0129] For reference, the video clips need to be screened according to the preset rules to obtain the screened training videos. For example, video clips with a resolution less than or equal to the resolution threshold are eliminated, and video clips with a duration less than five seconds are eliminated. For example, a video with a duration of 18 seconds is cut into four video clips, the first three video clips are five seconds long, and the last video clip with a duration less than five seconds is eliminated. Among them, the resolution threshold can be "720p".
[0130] Step G2: Based on the reference keyword, determine the shooting training object in the first frame of the training video.
[0131] First, based on the reference keywords, identify the human subject or food subject in the first frame of the training video. If no subject is identified, the training video is discarded; if a subject is identified, determine whether the area ratio of the rectangular detection frame where the subject is located exceeds the ratio threshold. If it exceeds the ratio threshold, the subject is determined as the training subject. Otherwise, it means that the subject is not the subject of the shooting and the training video is discarded.
[0132] Among them, different detection frame area ratio thresholds can be set for human subjects and food subjects.
[0133] Step G3: respectively obtain the coordinate information of the training object in each frame of the training video.
[0134] In this step, the coordinate information of the photographed training object in each frame of the training video is obtained respectively to track the photographed training object.
[0135] The coordinate information of the photographed training object in each frame of the training video may be the coordinate information of a detection frame marking the photographed training object.
[0136] For reference, starting from the second frame, the coordinate information of the detection frame in the second frame is calculated based on the coordinate information of the detection frame in the previous frame and the image information of the current frame. In this process, the coordinate information of the detection frame in each frame of continuous tracking is accumulated and saved to record the motion trajectory of the training object in the training video sequence.
[0137] Among them, the coordinate information of the detection frame where the shooting training object is located in the frame is obtained every few frames, and the coordinate information of the detection frame in the remaining frames is calculated based on the coordinate information of the detection frame in the previous frame. For example, the coordinate information of the detection frame where the shooting training object is located in the first frame and the fifth frame is obtained, and the coordinate information of the detection frame where the shooting training object is located in the second frame, the third frame, and the fourth frame is calculated. In this way, the number of times the coordinate information is directly obtained from the video frame can be reduced, and the processing amount can be reduced.
[0138] Step G4: acquiring motion data of the photographed training object according to the coordinate information of the photographed training object in each frame of the video image, wherein the motion data includes at least one of the following: acceleration sub-data and speed sub-data.
[0139] In this step, the coordinate information of the photographed training object in each frame of video image is sent to the camera motion judgment module, so that the camera motion judgment module can obtain the motion data of the photographed training object according to the coordinate information of the photographed training object in each frame of video image.
[0140] Optionally, the motion data includes acceleration sub-data and speed sub-data of the photographed training object.
[0141] For example, the motion data includes: the average speed value and the average acceleration value of the training object in the xyz axis direction, which are obtained by performing differential calculation on the coordinate information of the detection frame of multiple consecutive frames.
[0142] Step G5: Based on the motion data of the training object, the training video is marked with a camera movement label that matches the motion data, wherein the camera movement label is used to indicate a camera movement mode suitable for the training video.
[0143] In this step, twelve camera movement modes are pre-defined, namely: forward push camera movement, backward pull camera movement, follow camera movement, horizontal movement camera movement, vertical movement camera movement, lifting camera movement, lowering camera movement, surrounding camera movement, fixed camera movement, shaking camera movement, looking down camera movement, and looking up camera movement.
[0144] Based on this, combined with the shooting scenes and preset rules in the training videos, the training videos are marked with camera movement labels that match the motion data.
[0145] For example, in the portrait shooting scene, the following rules are included but not limited to:
[0146] If the forward speed of a single human subject in the z-axis direction exceeds the speed threshold, it is marked as a propulsion camera movement label; if the acceleration of a single human subject in the horizontal direction exceeds the acceleration threshold, it is marked as a translation camera movement label.
[0147] Step G6: Output the actual probability value of the first frame image matching each camera movement mode through the camera movement recommendation model.
[0148] In this step, the first frame of the training video is extracted as the training material, and the camera movement label of the training video is used as the camera movement label of the training material. For example, if the training video is marked as a driving camera movement label, the first frame of the training video is used as the training material and marked as the driving camera movement label.
[0149] In this step, the training material is input into the camera movement recommendation model, and the camera movement recommendation model outputs the actual probability value of the training material being adapted to each camera movement mode.
[0150] Step G7: When the reference probability value of the camera movement mode indicated by the camera movement label is one and the reference probability values of other camera movement modes are zero, the camera movement recommendation model is trained according to the reference probability value and actual probability value of each camera movement mode.
[0151] In this step, the training reference is that the reference probability value of the camera movement mode indicated by the camera movement label of the training material is one, and the reference probability values of the other camera movement modes are zero. Combined with the actual probability values of various camera movement modes output, the camera movement recommendation model is trained. The model is trained repeatedly using a large number of training videos until the model converges.
[0152] In this embodiment, a method for training a camera movement recommendation model is provided, in which training videos are collected, and then based on the dynamic data of the subject in the training video, camera movement labels suitable for the dynamic data are marked for the training video, and then the first frame of the training video is used as training material, and the training material is marked according to the camera movement label of the training video, so as to train the camera movement recommendation model in combination with the actual probability values of various camera movement modes output by the camera movement recommendation model for the training material, so that the trained camera movement recommendation model can accurately recommend camera movement modes to users.
[0153] like Fig. 9 As shown, a reference process of a recommended camera movement mode from inputting a pre-processed image to outputting a pre-processed image is provided.
[0154] In summary, the purpose of this application is to provide a camera movement recommendation method using multi-dimensional feature fusion, and to recommend camera movement modes to users when they shoot videos for common life scenes such as portraits and food, so as to improve the professionalism and accuracy of camera movement, thereby helping users improve the quality of the film and meet their shooting needs. Among them, this application specifically designs a self-developed end-side human attribute extraction model (PARNet) and a food attribute extraction model (FoodNet), which can accurately extract the attribute feature information of the human body and food according to the previewed picture content, and further, fuse the overall content features of the picture with the extracted attribute feature information, and recommend camera movement modes based on the fused multi-dimensional features, which can improve the rationality and accuracy of camera movement recommendations. In addition, before recommending the camera movement mode, based on the object detection and tracking algorithm, a solution for automatically constructing a camera movement data set is designed. In the camera movement data set, the camera movement mode is automatically matched according to the motion data of the object, without manual labeling, thereby solving the problem of data shortage at a low cost.
[0155] The camera movement recommendation method provided in the embodiment of the present application may be executed by a camera movement recommendation device. In the embodiment of the present application, the camera movement recommendation device executing the camera movement recommendation method is taken as an example to illustrate the camera movement recommendation device provided in the embodiment of the present application.
[0156] Fig.10 A block diagram of a camera movement recommendation device according to an embodiment of the present application is shown, the device comprising:
[0157] The processing module 10 is used to output the image feature information of the preprocessed image through the image feature extraction model; output the attribute feature information of the preprocessed image based on the reference keywords through the attribute feature extraction model; input the image feature information and the attribute feature information into the camera movement recommendation model, and output the camera movement recommendation information through the camera movement recommendation model; wherein the camera movement recommendation information includes a recommended camera movement mode, and the camera movement mode is a camera movement mode suitable for the video shooting scene corresponding to the preprocessed image.
[0158] In an embodiment of the present application, in a video shooting scene, a preprocessed image that can represent the current shooting scene is obtained, and an image feature extraction model is used to output image feature information of the preprocessed image, and the image feature information is used to represent the feature information of the overall image content; then, an attribute feature extraction model is used to output attribute feature information of the preprocessed image based on reference keywords, and the attribute feature information is used to represent the feature information extracted from the image content for the reference keywords, and specifically, it can be the feature information of individual related shooting objects; thereby, the two feature information are input into a camera movement recommendation model, and the camera movement recommendation model uses the two feature information to fully analyze and understand the overall shooting scene and individual shooting objects, and then outputs a camera movement mode suitable for the video shooting scene corresponding to the preprocessed image. It can be seen that in an embodiment of the present application, the camera movement mode suitable for the current shooting scene is pushed to the user in combination with the overall features of the real-time shooting scene and the attribute features selected based on the reference keywords, which not only makes the camera movement mode naturally integrated with the shooting scene, but also based on the application of the camera movement mode, it can also highlight the individual shooting objects in the shooting scene, thereby improving the quality of the film.
[0159] Optionally, the device further comprises:
[0160] A display module is used to display a camera movement prompt window in the shooting preview interface; during the video shooting process, the camera movement prompt window displays video shooting guidance information and camera movement reference video identification corresponding to the camera movement mode;
[0161] The camera movement reference video identifier is used to indicate the camera movement reference video of the recommended camera movement mode;
[0162] The processing module 10 is specifically configured to play the camera movement reference video upon receiving a play control input of the camera movement reference video identifier from the user.
[0163] Optionally, the processing module 10 is specifically configured to determine, through a camera movement recommendation model, a probability value of the preprocessed image matching each camera movement mode, and output at least one camera movement mode whose probability value satisfies a camera movement recommendation condition.
[0164] Optionally, the processing module 10 is specifically configured to determine a frame of preview image displayed on the shooting preview interface as a pre-processed image.
[0165] Optionally, the reference keywords include human body keywords and food keywords;
[0166] The processing module 10 is specifically used to identify the human subjects that match the human keywords and the food subjects that match the food keywords in the preprocessed image through the detection model based on the human keywords and the food keywords; mark the human subjects and the food subjects that meet the marking conditions through the detection frame; wherein the marking conditions include: the area of the detection frame is greater than the area threshold and the distance between the detection frame and the center of the preprocessed image is less than the distance threshold; all the detection frames are marked with human subjects, or at least one detection frame is marked with a food subject, at least one detection frame is marked with a human subject, and the maximum area of the detection frame marking the human subject is greater than or equal to the area of the detection frame marking the food subject. When the maximum area of the detection frame of the photographed object is N times that of the maximum area of the detection frame of the photographed object, the human attribute feature information is output through the human attribute feature extraction sub-model; wherein the attribute feature extraction model includes the human attribute feature extraction sub-model; when all detection frames mark the food photographed object, or at least one detection frame marks the food photographed object, at least one detection frame marks the human photographed object, and the maximum area of the detection frame marking the human photographed object is less than N times the maximum area of the detection frame marking the food photographed object, the food attribute feature information is output through the food attribute feature extraction sub-model; wherein the attribute feature extraction model includes the food attribute feature extraction sub-model; wherein N is a positive integer greater than 1.
[0167] Optionally, the processing module 10 is specifically configured to extract a sub-model of human attribute features, output human attribute feature information according to the image content in the detection frame where the marked human subject is located and the number of detection frames where the marked human subject is located; and output a probability value of the preprocessed image matching each human attribute feature according to the human attribute feature information;
[0168] Among them, the human body attribute features include at least one of the following: full body front, full body side, full body back, half body front, half body side, half body back, close-up, and multiple people; the human body attribute feature extraction sub-model is obtained by training training images marked with human body attribute feature labels. During the training process, the human body attribute feature extraction sub-model is used to output the probability value of the training image matching each human body attribute feature, and the training image includes a human body object.
[0169] Optionally, the processing module 10 is specifically configured to output food attribute feature information according to the number of detection frames where the marked food photographed objects are located and the area ratio of the detection frames where the marked food photographed objects are located in the preprocessed image through the food attribute feature extraction sub-model; and output a probability value of the preprocessed image matching each food attribute feature according to the food attribute feature information;
[0170] Among them, the food attribute features include at least one of the following: a table full of food, small food, a single food, and a close-up; the food attribute feature extraction sub-model is trained using training images marked with food attribute feature labels. During the training process, the food attribute feature extraction sub-model is used to output the probability value of the training image matching each food attribute feature, and the training image includes the food shooting object.
[0171] Optionally, the processing module 10 is further used to obtain a training video based on a reference keyword; wherein the training video satisfies at least one of the following conditions: the training video is of a reference duration and the resolution of the training video is greater than a resolution threshold; based on the reference keyword, in the first frame of the training video, determine the shooting training object; obtain the coordinate information of the shooting training object in each frame of the training video respectively; obtain the motion data of the shooting training object according to the coordinate information of the shooting training object in each frame of the video; wherein the motion data includes at least one of the following: acceleration sub-data and speed sub-data; according to the motion data of the shooting training object, mark the training video with a camera movement label that matches the motion data; wherein the camera movement label is used to indicate a camera movement mode suitable for the training video; through a camera movement recommendation model, output the actual probability value of the first frame image matching each camera movement mode; when the reference probability value of the camera movement mode indicated by the camera movement label is one and the reference probability values of other camera movement modes are zero, train the camera movement recommendation model according to the reference probability value and the actual probability value of each camera movement mode.
[0172] The device in the application embodiment can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the present application embodiment is not specifically limited.
[0173] The device of the embodiment of the present application may be a device having an action system. The action system may be an Android action system, an iOS action system, or other possible action systems, which are not specifically limited in the embodiment of the present application.
[0174] The device provided in the embodiment of the present application can implement each process implemented in the above method embodiment and achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0175] Alternatively, if Fig.11 As shown, an embodiment of the present application further provides an electronic device 100, including a processor 101, a memory 102, and a program or instruction stored in the memory 102 and executable on the processor 101. When the program or instruction is executed by the processor 101, each step of any of the above-mentioned camera movement recommendation method embodiments is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0176] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0177] Fig.12 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0178] The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, a processor 1010, a camera 1011 and other components.
[0179] Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.12 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0180] Among them, the processor 1010 is used to output the image feature information of the preprocessed image through the image feature extraction model; output the attribute feature information of the preprocessed image based on the reference keywords through the attribute feature extraction model; input the image feature information and the attribute feature information into the camera movement recommendation model, and output the camera movement recommendation information through the camera movement recommendation model; wherein the camera movement recommendation information includes a recommended camera movement mode, and the camera movement mode is a camera movement mode suitable for the video shooting scene corresponding to the preprocessed image.
[0181] In an embodiment of the present application, in a video shooting scene, a preprocessed image that can represent the current shooting scene is obtained, and an image feature extraction model is used to output image feature information of the preprocessed image, and the image feature information is used to represent the feature information of the overall image content; then, an attribute feature extraction model is used to output attribute feature information of the preprocessed image based on reference keywords, and the attribute feature information is used to represent the feature information extracted from the image content for the reference keywords, and specifically, it can be the feature information of individual related shooting objects; thereby, the two feature information are input into a camera movement recommendation model, and the camera movement recommendation model uses the two feature information to fully analyze and understand the overall shooting scene and individual shooting objects, and then outputs a camera movement mode suitable for the video shooting scene corresponding to the preprocessed image. It can be seen that in an embodiment of the present application, the camera movement mode suitable for the current shooting scene is pushed to the user in combination with the overall features of the real-time shooting scene and the attribute features selected based on the reference keywords, which not only makes the camera movement mode naturally integrated with the shooting scene, but also based on the application of the camera movement mode, it can also highlight the individual shooting objects in the shooting scene, thereby improving the quality of the film.
[0182] Optionally, the display unit 1006 is used to display a camera movement prompt window in the shooting preview interface; during the video shooting process, the video shooting guidance information and the camera movement reference video identifier corresponding to the camera movement mode are displayed in the camera movement prompt window; wherein the camera movement reference video identifier is used to indicate the recommended camera movement reference video of the camera movement mode; the processor 1010 is specifically used to play the camera movement reference video when receiving the user's playback control input for the camera movement reference video identifier.
[0183] Optionally, the processor 1010 is specifically configured to determine, through the camera movement recommendation model, a probability value of the preprocessed image matching each camera movement mode, and output at least one camera movement mode whose probability value satisfies a camera movement recommendation condition.
[0184] Optionally, the processor 1010 is specifically configured to determine a frame of preview image displayed on the shooting preview interface as a pre-processed image.
[0185] Optionally, the reference keywords include human keywords and food keywords; the processor 1010 is specifically used to identify, in the preprocessed image, a human subject matching the human keyword and a food subject matching the food keyword, respectively, through a detection model based on the human keyword and the food keyword; and mark the human subject and food subject that meet the marking conditions through a detection frame; wherein the marking conditions include: the area of the detection frame is greater than an area threshold and the distance between the detection frame and the center of the preprocessed image is less than a distance threshold; all detection frames are marked with human subjects, or at least one detection frame is marked with a food subject, at least one detection frame is marked with a human subject, and the detection frame marking the human subject When the maximum area of the detection frame marking the food photography object is greater than or equal to N times the maximum area of the detection frame marking the food photography object, the food attribute feature information is output through the food attribute feature extraction sub-model; wherein the attribute feature extraction model includes the food attribute feature extraction sub-model; when all detection frames mark the food photography object, or at least one detection frame marks the food photography object, at least one detection frame marks the human photography object, and the maximum area of the detection frame marking the human photography object is less than N times the maximum area of the detection frame marking the food photography object, the food attribute feature information is output through the food attribute feature extraction sub-model; wherein the attribute feature extraction model includes the food attribute feature extraction sub-model; wherein N is a positive integer greater than 1.
[0186] Optionally, the processor 1010 is specifically used to output human attribute feature information through a human attribute feature extraction sub-model according to the image content in the detection frame where the marked human subject is located and the number of detection frames where the marked human subject is located; based on the human attribute feature information, output the probability value of the preprocessed image matching each human attribute feature; wherein the human attribute feature includes at least one of the following: full body front, full body side, full body back, half body front, half body side, half body back, close-up, and multiple people; the human attribute feature extraction sub-model is obtained by training with training images marked with human attribute feature labels, and during the training process, the human attribute feature extraction sub-model is used to output the probability value of the training image matching each human attribute feature, and the training image includes the human subject.
[0187] Optionally, the processor 1010 is specifically used to output food attribute feature information through a food attribute feature extraction sub-model according to the number of detection frames where the marked food photography objects are located and the area ratio of the detection frames where the marked food photography objects are located in the preprocessed image; based on the food attribute feature information, output a probability value that the preprocessed image matches each food attribute feature; wherein the food attribute feature includes at least one of the following: a table full of food, small food, a single food, a close-up; the food attribute feature extraction sub-model is trained using training images marked with food attribute feature labels, and during the training process, the food attribute feature extraction sub-model is used to output the probability value that the training image matches each food attribute feature, and the training image includes the food photography objects.
[0188] Optionally, the processor 1010 is further configured to obtain a training video based on a reference keyword; wherein the training video satisfies at least one of the following conditions: the training video is of reference duration, and the resolution of the training video is greater than a resolution threshold; based on the reference keyword, in the first frame of the training video, determine the shooting training object; respectively obtain the coordinate information of the shooting training object in each frame of the training video; obtain the motion data of the shooting training object according to the coordinate information of the shooting training object in each frame of the training video; wherein the motion data includes at least one of the following: acceleration sub-data and speed sub-data; according to the motion data of the shooting training object, mark the training video with a camera movement label matching the motion data; wherein the camera movement label is used to indicate a camera movement mode suitable for the training video; output the actual probability value of the first frame image matching each camera movement mode through the camera movement recommendation model; when the reference probability value of the camera movement mode indicated by the camera movement label is one and the reference probability values of other camera movement modes are zero, train the camera movement recommendation model according to the reference probability value and the actual probability value of each camera movement mode. .
[0189] In summary, the purpose of this application is to provide a camera movement recommendation method using multi-dimensional feature fusion, and recommend camera movement modes to users when they shoot videos for common life scenes such as portraits and food, so as to improve the professionalism and accuracy of camera movement, thereby helping users improve the quality of the film and meet their shooting needs. Among them, this application specifically designs a self-developed end-side human attribute extraction model (PARNet) and a food attribute extraction model (FoodNet), which can accurately extract the attribute feature information of the human body and food according to the previewed picture content, and further, fuse the overall content features of the picture with the extracted attribute feature information, and recommend camera movement modes based on the fused multi-dimensional features, which can improve the rationality and accuracy of camera movement recommendations. In addition, before recommending the camera movement mode, based on the object detection and tracking algorithm, a solution for automatically constructing a camera movement data set is designed. In the camera movement data set, the camera movement mode is automatically matched according to the motion data of the object, without manual labeling, thereby solving the problem of data shortage at a lower cost.
[0190] It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video image obtained by the image capture device (such as a camera) in the video image capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and an action rod, which will not be repeated here. The memory 1009 can be used to store software programs and various data, including but not limited to applications and action systems. The processor 1010 may integrate an application processor and a modem processor, wherein the application processor mainly processes the action system, user pages and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 1010.
[0191] The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0192] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.
[0193] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned camera movement recommendation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0194] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0195] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned camera movement recommendation method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0196] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0197] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned camera movement recommendation method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0198] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0199] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0200] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A camera movement recommendation method, It is characterized in that The method comprises: Output the image feature information of the preprocessed image through the image feature extraction model; Outputting attribute feature information of the preprocessed image based on reference keywords through an attribute feature extraction model; The image feature information and the attribute feature information are input into a camera movement recommendation model, and the camera movement recommendation model is used to output camera movement recommendation information; wherein the camera movement recommendation information includes a recommended camera movement mode, and the camera movement mode is a camera movement mode suitable for the video shooting scene corresponding to the preprocessed image.
2. The method according to claim 1, It is characterized in that The outputting the camera movement recommendation information includes: In the shooting preview interface, the camera movement prompt window is displayed; During the video shooting process, in the camera movement prompt window, video shooting guidance information corresponding to the camera movement mode and a camera movement reference video identifier are displayed; The camera movement reference video identifier is used to indicate the recommended camera movement reference video of the camera movement mode; When receiving a play control input of the user for the camera movement reference video identifier, the camera movement reference video is played.
3. The method according to claim 1, It is characterized in that Outputting the camera movement recommendation information through the camera movement recommendation model includes: The camera movement recommendation model is used to determine the probability value of the preprocessed image matching each camera movement mode, and at least one camera movement mode whose probability value meets the camera movement recommendation condition is output.
4. The method according to claim 1, It is characterized in that The method further comprises: A frame of preview image displayed on the shooting preview interface is determined as a pre-processed image.
5. The method according to claim 1, It is characterized in that The reference keywords include human body keywords and food keywords; The step of outputting the attribute feature information of the preprocessed image based on the reference keyword by using the attribute feature extraction model includes: Based on the human keyword and the food keyword, the human subject matching the human keyword and the food subject matching the food keyword are respectively identified in the preprocessed image by using a detection model; Marking the human subjects and food subjects that meet the marking conditions through the detection frame; wherein the marking conditions include: the area of the detection frame is greater than the area threshold and the distance between the detection frame and the center of the preprocessed image is less than the distance threshold; When all detection frames mark human subjects, or at least one detection frame marks a food subject, or at least one detection frame marks a human subject, and the maximum area of the detection frame marking the human subject is greater than or equal to N times the maximum area of the detection frame marking the food subject, output human attribute feature information through a human attribute feature extraction sub-model; wherein the attribute feature extraction model includes the human attribute feature extraction sub-model; When all detection frames mark the food photography object, or at least one detection frame marks the food photography object, at least one detection frame marks the human photography object, and the maximum area of the detection frame marking the human photography object is smaller than N times the maximum area of the detection frame marking the food photography object, outputting food attribute feature information through a food attribute feature extraction sub-model; wherein the attribute feature extraction model includes the food attribute feature extraction sub-model; Wherein, N is a positive integer greater than 1.
6. The method according to claim 5, It is characterized in that The method of extracting the sub-model of human attribute characteristics and outputting human attribute characteristic information includes: Outputting human attribute feature information according to the image content in the detection frame where the marked human subject is located and the number of detection frames where the marked human subject is located through the human attribute feature extraction sub-model; After the human body attribute feature extraction sub-model is used to output the human body attribute feature information, the method further includes: Outputting the probability value of the preprocessed image matching each human attribute feature according to the human attribute feature information; Among them, the human body attribute features include at least one of the following: full body front, full body side, full body back, half body front, half body side, half body back, close-up, and multiple people; the human body attribute feature extraction sub-model is obtained by training with training images marked with human body attribute feature labels. During the training process, the human body attribute feature extraction sub-model is used to output the probability value of the training image matching each human body attribute feature, and the training image includes a human body photographed object.
7. The method according to claim 5, It is characterized in that The method of extracting the food attribute feature sub-model to output food attribute feature information includes: Outputting food attribute feature information through a food attribute feature extraction sub-model according to the number of detection frames where the marked food photographed objects are located and the area ratio of the detection frames where the marked food photographed objects are located in the pre-processed image; After outputting the food attribute feature information through the food attribute feature extraction sub-model, the method further includes: Outputting the probability value of the pre-processed image matching each food attribute feature according to the food attribute feature information; Among them, the food attribute features include at least one of the following: a table full of food, small food, a single food, a close-up; the food attribute feature extraction sub-model is trained with training images marked with food attribute feature labels. During the training process, the food attribute feature extraction sub-model is used to output the probability value of the training image matching each food attribute feature, and the training image includes the food shooting object.
8. The method according to claim 1, It is characterized in that Before inputting the image feature information and the attribute feature information into a camera movement recommendation model and outputting camera movement recommendation information through the camera movement recommendation model, the method further includes: Based on the reference keyword, a training video is obtained; wherein the training video satisfies at least one of the following conditions: the training video is of reference duration, and the resolution of the training video is greater than a resolution threshold; Based on the reference keyword, determining a shooting training object in a first frame of the training video; Respectively obtaining coordinate information of the photographed training object in each frame of the training video; According to the coordinate information of the photographed training object in each frame of the video image, the motion data of the photographed training object is obtained; wherein the motion data includes at least one of the following: acceleration sub-data and speed sub-data; According to the motion data of the training object, marking the training video with a camera movement label that matches the motion data; wherein the camera movement label is used to indicate a camera movement mode suitable for the training video; Outputting, by means of a camera motion recommendation model, an actual probability value of the first frame image matching each camera motion mode; When the reference probability value of the camera movement mode indicated by the camera movement label is one and the reference probability values of other camera movement modes are zero, the camera movement recommendation model is trained according to the reference probability value and the actual probability value of each camera movement mode.
9. A camera movement recommendation device, It is characterized in that The device comprises: A processing module is used to output image feature information of a preprocessed image through an image feature extraction model; output attribute feature information of the preprocessed image based on reference keywords through an attribute feature extraction model; input the image feature information and the attribute feature information into a camera movement recommendation model, and output camera movement recommendation information through the camera movement recommendation model; wherein the camera movement recommendation information includes a recommended camera movement mode, and the camera movement mode is a camera movement mode suitable for a video shooting scene corresponding to the preprocessed image.
10. The device according to claim 9, It is characterized in that The device also includes: A display module is used to display a camera movement prompt window in the shooting preview interface; during the video shooting process, the video shooting guidance information and the camera movement reference video mark corresponding to the camera movement mode are displayed in the camera movement prompt window; The camera movement reference video identifier is used to indicate the recommended camera movement reference video of the camera movement mode; The processing module is specifically configured to play the camera movement reference video upon receiving a playback control input from a user for the camera movement reference video identifier.
11. The device according to claim 9, It is characterized in that The processing module is specifically used to determine the probability value of the preprocessed image matching each camera movement mode through the camera movement recommendation model, and output at least one camera movement mode whose probability value meets the camera movement recommendation condition.
12. The device according to claim 9, It is characterized in that The processing module is specifically used to determine a frame of preview image displayed on the shooting preview interface as a pre-processed image.
13. The device according to claim 9, It is characterized in that The reference keywords include human body keywords and food keywords; The processing module is specifically configured to respectively identify a human subject that matches the human keyword and a food subject that matches the food keyword in the pre-processed image through a detection model based on the human keyword and the food keyword; By means of a detection frame, human subjects and food subjects that meet a marking condition are marked; wherein the marking condition includes: an area of the detection frame is greater than an area threshold and a distance between the detection frame and the center of the preprocessed image is less than a distance threshold; when all detection frames mark human subjects, or at least one detection frame marks a food subject, at least one detection frame marks a human subject, and the maximum area of the detection frame marking the human subject is greater than or equal to N times the maximum area of the detection frame marking the food subject, by means of a human attribute feature extraction submodel, human attribute feature information is output; wherein the attribute feature extraction model includes the human attribute feature extraction submodel; when all detection frames mark food subjects, or at least one detection frame marks a food subject, at least one detection frame marks a human subject, and the maximum area of the detection frame marking the human subject is less than N times the maximum area of the detection frame marking the food subject, food attribute feature information is output by means of a food attribute feature extraction submodel; wherein the attribute feature extraction model includes the food attribute feature extraction submodel; wherein N is a positive integer greater than 1.
14. The device according to claim 13, It is characterized in that The processing module is specifically used to extract the sub-model of human attribute features, output human attribute feature information according to the image content in the detection frame where the marked human subject is located and the number of detection frames where the marked human subject is located; and output the probability value of the pre-processed image matching each human attribute feature according to the human attribute feature information; Among them, the human body attribute features include at least one of the following: full body front, full body side, full body back, half body front, half body side, half body back, close-up, and multiple people; the human body attribute feature extraction sub-model is obtained by training with training images marked with human body attribute feature labels. During the training process, the human body attribute feature extraction sub-model is used to output the probability value of the training image matching each human body attribute feature, and the training image includes a human body photographed object.
15. The device according to claim 13, It is characterized in that The processing module is specifically used to output food attribute feature information according to the number of detection frames where the marked food photographed objects are located and the area proportion of the detection frames where the marked food photographed objects are located in the pre-processed image through the food attribute feature extraction sub-model; and output the probability value of the pre-processed image matching each food attribute feature according to the food attribute feature information; Among them, the food attribute features include at least one of the following: a table full of food, small food, a single food, a close-up; the food attribute feature extraction sub-model is trained with training images marked with food attribute feature labels. During the training process, the food attribute feature extraction sub-model is used to output the probability value of the training image matching each food attribute feature, and the training image includes the food shooting object.
16. The device according to claim 9, It is characterized in that The processing module is further used to obtain a training video based on a reference keyword; wherein the training video satisfies at least one of the following conditions: the training video is of reference duration and the resolution of the training video is greater than a resolution threshold; based on the reference keyword, a shooting training object is determined in the first frame of the training video; coordinate information of the shooting training object in each frame of the training video is obtained respectively; motion data of the shooting training object is obtained according to the coordinate information of the shooting training object in each frame of the training video; wherein the motion data includes at least one of the following: acceleration sub-data and speed sub-data; according to the motion data of the shooting training object, a camera movement label matching the motion data is marked on the training video; wherein the camera movement label is used to indicate a camera movement mode suitable for the training video; through a camera movement recommendation model, an actual probability value of the first frame image matching each camera movement mode is output; when the reference probability value of the camera movement mode indicated by the camera movement label is one and the reference probability values of other camera movement modes are zero, the camera movement recommendation model is trained according to the reference probability value and the actual probability value of each camera movement mode.
17. An electronic device, It is characterized in that The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the camera movement recommendation method according to any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Panoramic video camera movement method and electronic device
WO2026156616A1
Display method for photographic material, and terminal device
WO2026193672A1
