Content generation parameter generation method and device, vehicle and storage medium
By identifying and extracting action video features in vehicles, AIGC content parameters are automatically generated, which solves the problem of tedious AIGC parameter settings and improves user experience and the accuracy and efficiency of parameter settings.
Patent Information
- Application Number
- CN202410809010.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-09-17
AI Technical Summary
AIGC requires multiple parameter settings when generating content, making the process cumbersome and complex and reducing user experience.
By obtaining the action video of the target person in the vehicle cockpit, using the pre-trained action recognition model to extract the action feature vector, and mapping it with the content generation type input to the parameter generation model, the content generation parameters are automatically generated.
The parameter setting process is simplified, the accuracy and efficiency of parameter setting are improved, and the user experience is improved.
Smart Images

Figure CN118658145A
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicles, and more specifically, to a method, device, vehicle and storage medium for generating content generation parameters in the field of vehicles. Background Art
[0002] Artificial Intelligence Generated Content (AIGC) uses artificial intelligence technology to generate various forms of content, including but not limited to text, images, audio, video, etc. The rise of AIGC technology marks the gradual expansion of artificial intelligence from the traditional field of data processing and analysis to the new field of content creation and generation.
[0003] At present, AIGC requires many parameters and random parameters (such as seeds, etc.) in the process of generating content, and the settings of these parameters are usually specified manually. However, different application scenarios and user needs may require different parameter settings. Due to the large number of parameters and their possible correlation, the setting process of AIGC content generation parameters is cumbersome and complicated, which reduces the user's interest. Summary of the invention
[0004] The present application provides a method, device, vehicle and storage medium for generating content generation parameters, which can simplify the generation process of content generation parameters and better improve user experience.
[0005] In a first aspect, a method for generating content generation parameters is provided, the method comprising: obtaining an action video of a target person in a vehicle cabin; inputting the action video into a pre-trained action recognition model to extract action features, and obtaining a target action feature vector; obtaining an input content generation type, and inputting the content generation type and the target action feature vector into a pre-trained parameter generation model for parameter mapping, and obtaining a content generation parameter combination, wherein the content generation parameter combination is used to generate content corresponding to the content generation type.
[0006] By adopting the above technical scheme, the action video of the target person in the vehicle cabin is identified through a pre-trained action recognition model, and the target action feature vector is extracted; the input content generation type and the target action feature vector are parameter mapped through the pre-trained parameter generation model to obtain a content generation parameter combination, which can obtain the content generation parameters according to the actual action behavior of the target person, realize the automatic generation of content generation parameters, greatly simplify the process of users manually setting parameters, improve the user experience, and improve the accuracy and efficiency of parameter setting.
[0007] In combination with the first aspect, in some possible implementations, the content generation type and the target action feature vector are input into a pre-trained parameter generation model for parameter mapping to obtain a content generation parameter combination, including: determining a content generation parameter space in the parameter generation model according to the content generation type, the content generation parameter space including a mapping relationship between a pre-set action feature vector and a content generation parameter; mapping the target action feature vector into the content generation parameter space, and outputting the content generation parameter combination.
[0008] By adopting the above technical solution, by determining the content generation parameter space in the model according to the content generation type, it is possible to support different content generation types to determine different content generation parameter spaces, and meet the needs of various types of content generation scenarios. Through the pre-set content generation parameter space, the model can directly find the content generation parameters that match the target action feature vector, avoiding complex calculations or searches and improving processing efficiency.
[0009] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, obtaining an action video of a target person in a vehicle cabin includes: obtaining an interior image of the vehicle cabin; performing person detection on the interior image of the cabin to obtain a person detection result; if the person detection result is that the target person is in the vehicle cabin, recording a video of the target person to obtain an action video of the target person.
[0010] By adopting the above technical solution, through real-time acquisition of the interior image of the vehicle cabin and target person detection of the interior image of the cabin, it is possible to detect whether there is a target person in the vehicle cabin at the first time, so that video recording can be started when the target person is detected, ensuring the real-time and integrity of the action video while avoiding unnecessary waste of resources.
[0011] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, after obtaining the action video of the target person in the vehicle cabin, it also includes: detecting the action video of the target person based on the video recording standard; if the action video meets the video recording standard, executing the step of inputting the action video into a pre-trained action recognition model to extract action features.
[0012] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the action video of the target person is detected based on the video recording standard, including: extracting action video frames from the action video; converting the action video frames into grayscale images, and obtaining brightness information of the grayscale images; matching the brightness information with the video brightness threshold in the video recording standard; if the brightness information meets the video brightness threshold, determining that the action video meets the video recording standard.
[0013] By adopting the above technical solution, by extracting video frames from action videos and converting them into grayscale images, the brightness information of the video can be accurately evaluated; by matching the brightness information of the grayscale image with the video brightness threshold set in the video recording standard, standardized detection of video quality is achieved, ensuring that only videos that meet certain brightness standards will be determined to meet the requirements, thereby ensuring the accuracy and reliability of subsequent processing.
[0014] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, before obtaining the action video of the target person in the vehicle cabin, it also includes: obtaining a pre-collected training sample set, the training sample set including a number of video clips including action category labels; inputting the video clips into the action recognition model for feature extraction, and outputting a training action feature vector; based on the mapping relationship between the action feature vector and the action category, determining the action category corresponding to the training action feature vector; calculating a first loss value according to the action category and the action category label, and updating the model parameters of the action recognition model according to the first loss value to obtain a trained action recognition model.
[0015] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, before obtaining the action video of the target person in the vehicle cabin, it also includes: obtaining a number of pre-collected content generation samples, the content generation samples including content generation type samples, action feature vector samples and content generation parameter samples; inputting the content generation type samples into the parameter generation model to determine the content generation parameter space in the parameter generation model, the content generation parameter space including the mapping relationship between the preset action feature vectors and the content generation parameters; inputting the action feature vector samples into the parameter generation model to map the action feature vector samples to the content generation parameter space, and outputting a content generation parameter combination for training; calculating a second loss value based on the content generation parameter samples and the content generation parameter combination for training, updating the model parameters of the parameter generation model based on the second loss value, and obtaining a trained parameter generation model.
[0016] In a third aspect, a device for generating content generation parameters is provided, the device comprising:
[0017] A video acquisition unit, used to acquire a motion video of a target person in a vehicle cabin;
[0018] A feature extraction unit, used for inputting the action video into a pre-trained action recognition model to extract action features and obtain a target action feature vector;
[0019] A parameter generation unit is used to obtain the input content generation type, input the content generation type and the target action feature vector into a pre-trained parameter generation model for parameter mapping, and obtain a content generation parameter combination, which is used to generate content corresponding to the content generation type.
[0020] In a fourth aspect, a vehicle is provided, comprising a memory for storing executable program code; and a processor for calling and running the executable program code from the memory, so that the vehicle executes the method in the above-mentioned first aspect or any possible implementation of the first aspect.
[0021] In a fifth aspect, a computer program product is provided, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.
[0022] In a sixth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the method in the above-mentioned first aspect or any possible implementation manner of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a system architecture diagram of a method for generating content generation parameters provided in an embodiment of the present application;
[0024] Figure 2 It is a flowchart of a method for generating content generation parameters provided in an embodiment of the present application;
[0025] Figure 3 It is a flowchart of a method for generating content generation parameters provided in an embodiment of the present application;
[0026] Figure 4 It is a flowchart of a method for generating content generation parameters provided in an embodiment of the present application;
[0027] Figure 5is an example schematic diagram of a method for generating content generation parameters provided in an embodiment of the present application;
[0028] Figure 6 It is a structural diagram of a device for generating content generation parameters provided in an embodiment of the present application;
[0029] Figure 7 is a structural schematic diagram of a vehicle provided in an embodiment of the present application;
[0030] Figure 8 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0032] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0033] Please refer to Figure 1 , Figure 1 : This is a system architecture diagram of a method for generating content generation parameters provided in an embodiment of the present application. The system may include a device for generating content generation parameters and a camera device. The generating device may be a vehicle-mounted terminal, a parameter generating module in a vehicle terminal, or a server, mobile phone, computer or other device independent of the vehicle. The camera device may be a camera component configured on a vehicle, or a terminal device such as a mobile phone, a camera, or a handheld device with a real-time camera function.
[0034] The present application embodiment takes the system configured on a vehicle as an example. Figure 1As shown, the vehicle is equipped with a camera device and a content generation parameter generation device. The camera device is used to capture the action video of the target person in the vehicle cabin and transmit the action video to the generation device. The generation device is used to obtain the action video of the target person in the vehicle cabin; input the action video into a pre-trained action recognition model to extract action features and obtain a target action feature vector; obtain the input content generation type, input the content generation type and the target action feature vector into a pre-trained parameter generation model for parameter mapping, and obtain a content generation parameter combination, wherein the content generation parameter combination is used to generate content corresponding to the content generation type.
[0035] Optionally, the camera device can also be used to capture the interior image of the vehicle's cabin and transmit the interior image of the cabin to the generating device; receive the video recording signal returned by the generating device, and record the target person in the vehicle cabin based on the video recording signal to obtain an action video of the target person; and transmit the action video to the generating device.
[0036] Optionally, the generating device can also be used to obtain the interior image of the vehicle's cabin; perform person detection on the interior image of the cabin to obtain a person detection result; if the person detection result is that there is a target person in the vehicle cabin, a video recording signal is generated and sent to the camera device, so that the camera device can record the target person in the vehicle cabin based on the video recording signal, obtain the target person's action video and return it to the generating device. After obtaining the action video of the target person, the generating device detects the action video of the target person based on the video recording standard; if the action video meets the video recording standard, the action video is input into a pre-trained action recognition model for action feature extraction, and the action video is input into a pre-trained action recognition model for action feature extraction to obtain a target action feature vector; the input content generation type is obtained, and the content generation parameter space in the parameter generation model is determined according to the content generation type, wherein the content generation parameter space includes a mapping relationship between a pre-set action feature vector and a content generation parameter; the target action feature vector is mapped into the content generation parameter space, and the content generation parameter combination is output.
[0037] The system for generating content generation parameters in the embodiment of the present application recognizes the action video of the target person in the vehicle cabin through a pre-trained action recognition model, and extracts the target action feature vector; the input content generation type and the target action feature vector are parameter mapped through the pre-trained parameter generation model to obtain a content generation parameter combination, and the content generation parameters can be obtained according to the actual action behavior of the target person, thereby realizing the automatic generation of content generation parameters, greatly simplifying the process of users manually setting parameters, improving the user experience, and also improving the accuracy and efficiency of parameter setting.
[0038] based on Figure 1 The system architecture shown below will be combined with Figure 2-Figure 5 , a method for generating content generation parameters provided in an embodiment of the present application is introduced in detail.
[0039] See also Figure 2 , is a flow chart of a method for generating content generation parameters provided in an embodiment of the present application. Figure 2 As shown, the method of the embodiment of the present application may include the following steps S101-S103.
[0040] S101, obtaining an action video of a target person in a vehicle cabin;
[0041] The method provided in the embodiment of the present application can be implemented by a computer program and can be run on a vehicle terminal or a server, mobile phone, computer, drone, etc. that establishes a communication relationship with the vehicle. The embodiment of the present application takes the method applied to a vehicle terminal as an example.
[0042] In some embodiments, the vehicle-mounted terminal first obtains an action video of the target person in the vehicle cabin, wherein the action video may be obtained by obtaining an action video pre-stored in a storage unit belonging to the vehicle-mounted terminal, or by receiving an action video captured by a camera device configured on the vehicle, or by receiving an action video transmitted by a server, mobile phone, computer, drone or other device that has established a communication relationship with the vehicle.
[0043] According to some embodiments, a method for determining that the action video is an action video including a target person may be, for example, after acquiring the action video in the vehicle cabin, performing person recognition on the action video in combination with image analysis technology to determine that the person included in the action video is the target person.
[0044] According to some embodiments, the method of determining that the action video is an action video including the target person may be, for example, obtaining the interior image of the vehicle's cabin, wherein the method of obtaining the interior image of the cabin may be obtaining the interior image of the cabin pre-stored in the storage unit of the vehicle-mounted terminal, or receiving the interior image of the cabin taken by the camera device configured on the vehicle, or receiving the interior image of the cabin transmitted by a server, mobile phone, computer, drone and other equipment that has established a communication relationship with the vehicle. The interior image of the cabin is subjected to person detection in combination with image analysis technology to obtain a person detection result; if the person detection result is that the target person exists in the cabin of the vehicle, it indicates that the action video obtained by recording the target person is an action video containing the target person. At this time, the target person is recorded to obtain the action video of the target person.
[0045] S102, inputting the action video into a pre-trained action recognition model to extract action features, and obtaining a target action feature vector;
[0046] In some embodiments, for the acquired action video, the action video is input into a pre-trained action recognition model to extract action features and obtain a target action feature vector. The action recognition model can be constructed using a deep neural network, such as a convolutional neural network (CNN), a recurrent neural network (RNN), and RNN variants such as a long short-term memory network (LSTM), a temporal relation network (TRN), a temporal segment network (TSN), and a slow network (SlowFast Networks).
[0047] In some embodiments, before the acquired action video of the target person is input into the action recognition model, the action video of the target person may be detected based on a video recording standard, wherein the video recording standard may include but is not limited to a video brightness threshold, a video length threshold, a video clarity threshold, a ratio of the person's size in the video screen, etc. When it is detected that the action video meets the video recording standard, the action video is input into the pre-trained action recognition model to extract action features, and obtain a target action feature vector.
[0048] According to some embodiments, the method of detecting action videos based on video recording standards may be, for example, if the video recording standard includes a video length threshold, then obtaining the video duration of the action video; matching the video duration with the video length threshold, and if the video duration satisfies the video length threshold, determining that the action video meets the video recording standard.
[0049] According to some embodiments, the method of detecting action videos based on video recording standards may also be, for example, if the video recording standard includes the ratio of the size of a person in the video screen, then an action video frame is extracted from the action video; the target person in the action video frame is detected in combination with image analysis technology to obtain the screen size of the target person in the video frame; based on the screen size of the target person in the video frame, the ratio of the screen size in the video frame is determined; the ratio of the screen size in the video frame is matched with the ratio of the size of the person in the video screen included in the video recording standard; if the ratio of the screen size in the video frame meets the ratio of the size of the person in the video screen, then it is determined that the action video meets the video recording standard.
[0050] According to some embodiments, the method of detecting action video based on video recording standards may also be, for example, if the video recording standard includes a video brightness threshold, then extracting an action video frame from the action video; converting the action video frame into a grayscale image, and obtaining brightness information of the grayscale image; matching the brightness information with the video brightness threshold included in the video recording standard; and if the brightness information satisfies the video brightness threshold, determining that the action video meets the video recording standard.
[0051] In some embodiments, before the acquired action video of the target person is input into the action recognition model, a step of training the action recognition model may be included. For example, it may be that a training sample set acquired in advance is acquired, wherein the training sample set includes several video clips including action category labels; the video clips are input into the action recognition model for feature extraction, and the action feature vector for training is obtained as output; based on the mapping relationship between the preset action feature vector and the action category, the action category corresponding to the action feature vector for training is determined; a first loss value is calculated based on the action category and the action category label, and the model parameters of the action recognition model are updated based on the first loss value to obtain the trained action recognition model.
[0052] More specifically, in the process of training the action recognition model, firstly, a pre-collected training sample set is obtained, and the training sample set includes several video clips including various actions; the video clips in the training sample set are pre-processed, including video cropping, scaling, normalization and other processing to ensure that the format and size of the video clips input into the model can meet the requirements of the model; the corresponding action category labels are labeled on the pre-processed video clips to obtain a training sample set for model training. Among them, the action category labels may include but are not limited to eye movements, head movements, mouth movements, body movements, facial expression movements and other category labels. Then, an initial action recognition model is constructed or determined, and the video clips included in the training sample set are input into the action recognition model for feature extraction, and the action feature vector for training is obtained through forward propagation output. Based on the mapping relationship between the pre-set action feature vector and the action category, the action category corresponding to the training action feature vector is determined; and a first loss value is calculated based on the action category and the action category label labeled by the video clip. The gradient is calculated based on the first loss value, and the parameters of the action recognition model are updated through back propagation. Repeat the steps of forward propagation and back propagation to iterate the model until the preset number of iterations is reached or the minimum loss value is met, and the trained action recognition model is obtained.
[0053] Afterwards, the acquired action video is input into the trained action recognition model to extract action features, thereby obtaining a target action feature vector.
[0054] S103, obtaining the input content generation type, inputting the content generation type and the target action feature vector into a pre-trained parameter generation model for parameter mapping, and obtaining a content generation parameter combination, wherein the content generation parameter combination is used to generate content corresponding to the content generation type.
[0055] In some embodiments, the input content generation type is obtained, wherein the content generation type may include but is not limited to text, image, video, audio, virtual human image, etc. The content generation type may be obtained by obtaining the content generation type preset and stored in the storage unit of the vehicle terminal; or by obtaining the content generation type input by the user by operating the content generation application interface of the vehicle terminal; or by receiving the content generation type transmitted by a server, mobile phone, computer, or other device that has established a communication relationship with the vehicle.
[0056] According to some embodiments, content generation parameters refer to key input values used to control, guide or adjust the content generation process, such as text generation parameters, image generation parameters, video generation parameters, audio generation parameters, and virtual human generation parameters.
[0057] According to some embodiments, the acquired content generation type and the target action feature vector output by the action recognition model are input into a pre-trained parameter generation model for parameter mapping to obtain a content generation parameter combination. The content generation parameter combination is used to generate content corresponding to the content generation type. Among them, the parameter generation model can be constructed using a deep neural network, such as a fully connected neural network (MLP), a recurrent neural network (RNN), a long short-term memory network (LSTM), a transformer (Transformer) or a convolutional neural network (CNN) combined with a fully connected layer, etc.
[0058] According to some embodiments, the content generation type and the target action feature vector are input into a pre-trained parameter generation model for parameter mapping. For example, the content generation parameter space in the parameter generation model is determined according to the content generation type of the input model, wherein the content generation parameter space includes a mapping relationship between a preset action feature vector and a content generation parameter; the target action feature vector in the input model is mapped into the content generation parameter space, and a content generation parameter combination is output.
[0059] More specifically, the content generation parameter space in the parameter generation model is determined according to the content generation type. For example, according to the input content generation type, the parameter generation model will access the predefined parameter space library, match the content generation parameter space corresponding to the content generation type from the parameter space library, and determine the mapping relationship between the action feature vector set in the content generation parameter space and the content generation parameter. It should be noted that the parameter space library contains the definition of the content generation parameter space required for each content generation type. Each content generation parameter space contains a series of content generation parameters that can affect the content generation process and the final generated content, as well as the mapping relationship between different action feature vectors and the content generation parameters. For example, in the video generation type, the parameters contained in the corresponding content generation parameter space can be video scenes, lighting conditions, character actions, etc.
[0060] In some embodiments, before the content generation type and the target action feature vector are input into the parameter generation model, a step of training the parameter generation model may be included. For example, a number of pre-collected content generation samples may be obtained, wherein the content generation sample includes a content generation type sample, an action feature vector sample, and a content generation parameter sample; the content generation type sample is input into the parameter generation model to determine the content generation parameter space in the parameter generation model, wherein the content generation parameter space includes a mapping relationship between a pre-set action feature vector and a content generation parameter; the obtained action feature vector sample is input into the parameter generation model to map the action feature vector sample into the content generation parameter space, and a content generation parameter combination for training is obtained as output; a second loss value is calculated based on the obtained content generation parameter sample and the content generation parameter combination for training, and the model parameters of the parameter generation model are updated based on the second loss value to obtain a trained parameter generation model.
[0061] More specifically, in the process of training the parameter generation model, we first obtain several pre-collected content generation samples, where each content generation sample includes a content generation type sample, an action feature vector sample and a content generation parameter sample; the content generation sample is encoded to obtain the encoded content generation sample, so as to be more suitable as the input of the model.
[0062] Then, an initial parameter generation model is constructed or determined, and the acquired content generation type sample is input into the parameter generation model so that the model accesses a predefined parameter space library and matches the content generation parameter space corresponding to the content generation type from the parameter space library, wherein the content generation parameter space includes a mapping relationship between a pre-set action feature vector and a content generation parameter.
[0063] Afterwards, the acquired action feature vector sample is input into the parameter generation model to map the action feature vector sample to the content generation parameter space of the parameter generation model, match one or more corresponding content generation parameters, integrate the content generation parameters into a content generation parameter combination for training and output it.
[0064] The second loss value is calculated based on the obtained content generation parameter sample and the content generation parameter used for training. The model parameters of the parameter generation model are updated according to the second loss value by combining optimization algorithms, such as gradient descent method and Adam optimizer, with back propagation technology. Through multiple iterative training, the parameters of the model are gradually optimized until the model performance meets the requirements or reaches the preset number of iterations, and the trained parameter generation model is obtained.
[0065] Afterwards, for the acquired content generation type, the content generation type and the target action feature vector are input into the trained parameter generation model for parameter mapping to obtain a content generation parameter combination.
[0066] The embodiment of the present application uses a pre-trained action recognition model to identify the action video of a target person in a vehicle cabin and extracts a target action feature vector; a pre-trained parameter generation model is used to perform parameter mapping on the input content generation type and the target action feature vector to obtain a content generation parameter combination, and the content generation parameters can be obtained according to the actual action behavior of the target person, thereby realizing the automatic generation of content generation parameters, greatly simplifying the process of users manually setting parameters, improving the user experience, and also improving the accuracy and efficiency of parameter setting.
[0067] See also Figure 3 , is a flow chart of a method for generating content generation parameters provided in an embodiment of the present application. Figure 3 As shown, the method of the embodiment of the present application may include the following steps S201-S211.
[0068] S201, obtaining a pre-collected training sample set, wherein the training sample set includes a plurality of video clips including action category labels;
[0069] In some embodiments, a pre-collected training sample set is obtained, and the training sample set includes several video clips including various actions; the video clips in the training sample set are pre-processed, including video cropping, scaling, normalization, etc., to ensure that the format and size of the video clips input into the model meet the requirements of the model; the pre-processed video clips are labeled with corresponding action category labels to obtain a training sample set for model training. The action category labels may include, but are not limited to, category labels such as eye movements, head movements, mouth movements, body movements, and facial expression movements.
[0070] S202, inputting the video clip into an action recognition model to extract features, and outputting an action feature vector for training;
[0071] In some embodiments, an initial action recognition model is constructed or determined, wherein the action recognition model can be constructed using a deep neural network, such as a convolutional neural network (CNN), a recurrent neural network (RNN), and variants of RNN such as a long short-term memory network (LSTM), a temporal relation network (TRN), a temporal segment network (TSN), and a slow network (SlowFast Networks), etc. Afterwards, the video clips included in the training sample set are input into the action recognition model for feature extraction, and the action feature vector for training is obtained through forward propagation output.
[0072] S203, determining the action category corresponding to the action feature vector for training based on the mapping relationship between the action feature vector and the action category;
[0073] S204, calculating a first loss value according to the action category and the action category label, and updating a model parameter of the action recognition model according to the first loss value to obtain a trained action recognition model;
[0074] In some embodiments, based on the mapping relationship between the pre-set action feature vector and the action category, the action category corresponding to the training action feature vector is determined. A first loss value is calculated based on the action category and the action category label marked by the video clip. A gradient is calculated based on the first loss value, and the parameters of the action recognition model are updated by back propagation. The steps of forward propagation and back propagation are repeated to iterate the model until a preset number of iterations is reached or the loss value is minimized, thereby obtaining a trained action recognition model.
[0075] S205, acquiring an image of the interior of the vehicle's cabin;
[0076] S206, performing person detection on the cabin interior image to obtain a person detection result;
[0077] S207, if the person detection result is that there is a target person in the vehicle cabin, recording a video of the target person to obtain an action video of the target person;
[0078] In some embodiments, an image of the interior of the vehicle's cabin is obtained, wherein the method for obtaining the image of the interior of the cabin may be to obtain an image of the interior of the cabin pre-stored in a storage unit of the vehicle-mounted terminal, or to receive an image of the interior of the cabin taken by a camera device configured on the vehicle, or to receive an image of the interior of the cabin transmitted by a server, mobile phone, computer, drone, or other device that has established a communication relationship with the vehicle. The image of the interior of the cabin is used to perform person detection in combination with image analysis technology to obtain a person detection result; if the person detection result is that there is a target person in the cabin of the vehicle, it indicates that the action video obtained by recording the target person is an action video containing the target person. At this time, the target person is recorded to obtain an action video of the target person.
[0079] The embodiment of the present application can detect whether there is a target person in the vehicle cabin in the first time by acquiring the interior image of the vehicle cabin in real time and detecting the target person in the interior image of the cabin, so as to start video recording when the target person is detected, thereby ensuring the real-time and integrity of the action video and avoiding unnecessary waste of resources.
[0080] S208, detecting the action video of the target person based on the video recording standard;
[0081] In some embodiments, the action video of the target person is detected based on a video recording standard, wherein the video recording standard may include but is not limited to a video brightness threshold, a video length threshold, a video clarity threshold, a ratio of the person's size in the video screen, etc.
[0082] According to some embodiments, the method of detecting action videos based on video recording standards may be, for example, if the video recording standard includes a video length threshold, then obtaining the video duration of the action video; matching the video duration with the video length threshold, and if the video duration satisfies the video length threshold, determining that the action video meets the video recording standard.
[0083] According to some embodiments, the method of detecting action videos based on video recording standards may also be, for example, if the video recording standard includes the ratio of the size of a person in the video screen, then an action video frame is extracted from the action video; the target person in the action video frame is detected in combination with image analysis technology to obtain the screen size of the target person in the video frame; based on the screen size of the target person in the video frame, the ratio of the screen size in the video frame is determined; the ratio of the screen size in the video frame is matched with the ratio of the size of the person in the video screen included in the video recording standard; if the ratio of the screen size in the video frame meets the ratio of the size of the person in the video screen, then it is determined that the action video meets the video recording standard.
[0084] According to some embodiments, the method of detecting action video based on video recording standards may also be, for example, if the video recording standard includes a video brightness threshold, then extracting an action video frame from the action video; converting the action video frame into a grayscale image, and obtaining brightness information of the grayscale image; matching the brightness information with the video brightness threshold included in the video recording standard; and if the brightness information satisfies the video brightness threshold, determining that the action video meets the video recording standard.
[0085] S209, if the action video meets the video recording standard, input the action video into a pre-trained action recognition model to extract action features to obtain a target action feature vector;
[0086] In some embodiments, when it is determined that the action video meets the video recording standard, the action video is input into a pre-trained action recognition model to extract action features to obtain a target action feature vector.
[0087] S210, obtaining an input content generation type, and determining a content generation parameter space in the parameter generation model according to the content generation type, wherein the content generation parameter space includes a mapping relationship between a preset action feature vector and a content generation parameter;
[0088] S211, mapping the target action feature vector to the content generation parameter space, and outputting a content generation parameter combination, wherein the content generation parameter combination is used to generate content corresponding to the content generation type.
[0089] In some embodiments, the input content generation type is obtained, wherein the content generation type may include but is not limited to text, image, video, audio, virtual human image, etc. The content generation type may be obtained by obtaining the content generation type preset and stored in the storage unit of the vehicle terminal; or by obtaining the content generation type input by the user by operating the content generation application interface of the vehicle terminal; or by receiving the content generation type transmitted by a server, mobile phone, computer, or other device that has established a communication relationship with the vehicle.
[0090] According to some embodiments, according to the input content generation type, the parameter generation model will access a predefined parameter space library, match the content generation parameter space corresponding to the content generation type from the parameter space library, wherein the content generation parameter space includes a mapping relationship between a preset action feature vector and a content generation parameter; the target action feature vector in the input model is mapped to the content generation parameter space, and a content generation parameter combination is output. The content generation parameter combination is used to generate content corresponding to the content generation type.
[0091] It should be noted that the parameter space library includes the definition of the content generation parameter space required for each content generation type. Each content generation parameter space includes a series of content generation parameters that can affect the content generation process and the final generated content, as well as the mapping relationship between different action feature vectors and the content generation parameters. For example, in the video generation type, the parameters included in the corresponding content generation parameter space can be video scenes, lighting conditions, character actions, etc.
[0092] The embodiment of the present application determines the content generation parameter space in the model according to the content generation type, and can support different content generation types to determine different content generation parameter spaces, meeting the needs of various types of content generation scenarios. Through the pre-set content generation parameter space, the model can directly find the content generation parameters that match the target action feature vector, avoiding complex calculations or searches and improving processing efficiency.
[0093] See also Figure 4 , is a flow chart of a method for generating content generation parameters provided in an embodiment of the present application. Figure 4 As shown, the method of the embodiment of the present application may include the following steps S301-S311.
[0094] S301, obtaining a plurality of pre-collected content generation samples, wherein the content generation samples include content generation type samples, action feature vector samples, and content generation parameter samples;
[0095] In some embodiments, several pre-collected content generation samples are obtained, wherein each content generation sample includes a content generation type sample, an action feature vector sample, and a content generation parameter sample; the content generation sample is encoded to obtain an encoded content generation sample so as to be more suitable as an input to the model.
[0096] S302, inputting the content generation type sample into a parameter generation model, determining a content generation parameter space in the parameter generation model, wherein the content generation parameter space includes a mapping relationship between a preset action feature vector and a content generation parameter;
[0097] In some embodiments, an initial parameter generation model is constructed or determined, wherein the content generation parameter combination is used to generate content corresponding to the content generation type. The parameter generation model can be constructed using a deep neural network, such as a fully connected neural network (MLP), a recurrent neural network (RNN), a long short-term memory network (LSTM), a transformer (Transformer) or a convolutional neural network (CNN) combined with a fully connected layer.
[0098] According to some embodiments, the acquired content generation type sample is input into the parameter generation model so that the model accesses a predefined parameter space library and matches the content generation parameter space corresponding to the content generation type from the parameter space library, wherein the content generation parameter space includes a mapping relationship between pre-set action feature vectors and content generation parameters.
[0099] S303, inputting the action feature vector sample into the parameter generation model to map the action feature vector sample into the content generation parameter space, and outputting a content generation parameter combination for training;
[0100] In some embodiments, the acquired action feature vector sample is input into the parameter generation model to map the action feature vector sample to the content generation parameter space of the parameter generation model, match one or more corresponding content generation parameters, integrate the content generation parameters into a content generation parameter combination for training and output it.
[0101] S304, calculating a second loss value according to the content generation parameter sample and the content generation parameter combination for training, and updating the model parameters of the parameter generation model according to the second loss value to obtain a trained parameter generation model;
[0102] In some embodiments, the second loss value is calculated based on the acquired content generation parameter sample and the content generation parameter for training, and the model parameters of the parameter generation model are updated according to the second loss value by combining the optimization algorithm, such as the gradient descent method and the Adam optimizer, with the back propagation technology. Through multiple iterative training, the parameters of the model are gradually optimized until the model performance meets the requirements or reaches the preset number of iterations, and the trained parameter generation model is obtained.
[0103] S305, acquiring an image of the interior of the vehicle's cabin;
[0104] S306, performing person detection on the cabin interior image to obtain a person detection result;
[0105] S307, if the person detection result is that there is a target person in the vehicle cabin, recording a video of the target person to obtain an action video of the target person;
[0106] Specifically, for the specific process of steps S305-S307, please refer to the description of steps S205-S207 in the above embodiment, which will not be repeated here.
[0107] S308, detecting the action video of the target person based on the video recording standard;
[0108] In some embodiments, the action video of the target person is detected based on the video recording standard, wherein the video recording standard may include but is not limited to a video brightness threshold. Specifically, an action video frame is extracted from the action video; the action video frame is converted into a grayscale image, and the brightness information of the grayscale image is obtained; the brightness information is matched with the video brightness threshold included in the video recording standard; if the brightness information meets the video brightness threshold, it is determined that the action video meets the video recording standard.
[0109] The embodiment of the present application can accurately evaluate the brightness information of the video by extracting video frames from the action video and converting them into grayscale images; by matching the brightness information of the grayscale image with the video brightness threshold set in the video recording standard, standardized detection of video quality is achieved, ensuring that only videos that meet certain brightness standards will be determined to meet the requirements, thereby ensuring the accuracy and reliability of subsequent processing.
[0110] S309, if the action video meets the video recording standard, input the action video into a pre-trained action recognition model to extract action features to obtain a target action feature vector;
[0111] S310, obtaining an input content generation type, and determining a content generation parameter space in the parameter generation model according to the content generation type, wherein the content generation parameter space includes a mapping relationship between a preset action feature vector and a content generation parameter;
[0112] S311, mapping the target action feature vector to the content generation parameter space, and outputting a content generation parameter combination, wherein the content generation parameter combination is used to generate content corresponding to the content generation type.
[0113] Specifically, for the specific process of steps S309-S311, please refer to the description of steps S209-S211 in the above embodiment, which will not be repeated here.
[0114] For example, see Figure 5 A camera is installed inside the cockpit of a certain vehicle to detect the target person, record video, and recognize the actions of the passengers in the cockpit. In order to automatically generate content generation parameters for AIGC applications based on the actions and posture information of the passengers, first, the camera inside the cockpit of the vehicle obtains the interior image of the cockpit of the vehicle; the image of the interior of the cockpit is detected to obtain the result of the person detection. If the result of the person detection is that there is no target person in the cockpit of the vehicle, the image of the interior of the cockpit of the vehicle is obtained again.
[0115] If the person detection result indicates that there is a target person in the vehicle cabin, a video of the target person is recorded to obtain an action video of the target person. The action video of the target person is detected based on the video recording standard; if the action video does not meet the video recording standard, the interior image of the vehicle cabin is reacquired.
[0116] If the action video meets the video recording standard, the action video is input into the pre-trained action recognition model to extract action features and obtain the target action feature vector. The input content generation type is obtained, and the content generation type and the target action feature vector are input into the pre-trained parameter generation model for parameter mapping to obtain a content generation parameter combination. Afterwards, the AIGC content corresponding to the content generation type is generated according to the content generation parameter combination.
[0117] based on Figure 1 The system architecture will be combined with the attached Figure 6 , the device provided in the embodiment of the present application is described in detail. It should be noted that the attached Figure 6 The device in the present application is used to execute Figure 1-Figure 5 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 1-Figure 5 The embodiment shown.
[0118] See also Figure 6 , which shows a schematic diagram of the structure of the device provided by the exemplary embodiment of this specification. The device can be implemented as all or part of the device through software, hardware or a combination of both. The device 10 at least includes a video acquisition unit 10, a feature extraction unit 20 and a parameter generation unit 30.
[0119] A video acquisition unit 10 is used to acquire a motion video of a target person in a vehicle cabin;
[0120] A feature extraction unit 20 is used to input the action video into a pre-trained action recognition model to extract action features and obtain a target action feature vector;
[0121] The parameter generation unit 30 is used to obtain the input content generation type, input the content generation type and the target action feature vector into a pre-trained parameter generation model for parameter mapping, and obtain a content generation parameter combination, which is used to generate content corresponding to the content generation type.
[0122] According to some embodiments, the parameter generation unit 30 may include a space determination subunit 301 and a parameter mapping subunit 302, wherein the parameter generation unit 30 is used to input the content generation type and the target action feature vector into a pre-trained parameter generation model for parameter mapping, and obtain a content generation parameter combination:
[0123] A space determination subunit 301 is used to determine a content generation parameter space in the parameter generation model according to the content generation type, wherein the content generation parameter space includes a mapping relationship between a preset action feature vector and a content generation parameter;
[0124] The parameter mapping subunit 302 is used to map the target action feature vector into the content generation parameter space and output a content generation parameter combination.
[0125] According to some embodiments, the video acquisition unit 10 may include an image acquisition subunit 101, a person detection subunit 102, and a video recording subunit 103, wherein the video acquisition unit 10 is used to acquire an action video of a target person in a vehicle cabin:
[0126] The image acquisition subunit 101 is used to acquire the interior image of the vehicle cabin;
[0127] A person detection subunit 102 is used to perform person detection on the cabin interior image to obtain a person detection result;
[0128] The video recording subunit 103 is configured to record a video of the target person if the person detection result indicates that there is a target person in the vehicle cabin, so as to obtain an action video of the target person.
[0129] According to some embodiments, the device 10 may further include a standard detection unit 40, wherein, after the video acquisition unit 10 is used to acquire the action video of the target person in the vehicle cabin, the standard detection unit 40 is used to detect the action video of the target person based on the video recording standard; if the action video meets the video recording standard, the step of inputting the action video into a pre-trained action recognition model for action feature extraction is executed.
[0130] According to some embodiments, the standard detection unit 40 may include a video frame extraction subunit 401, a brightness acquisition subunit 402, a threshold matching subunit 403 and a standard detection subunit 404, wherein the standard detection unit 40 is used to detect the action video of the target person based on the video recording standard:
[0131] The video frame extraction subunit 401 is used to extract action video frames from the action video;
[0132] The brightness acquisition subunit 402 is used to convert the action video frame into a grayscale image and acquire brightness information of the grayscale image;
[0133] A threshold matching subunit 403, configured to match the brightness information with a video brightness threshold in the video recording standard;
[0134] The standard detection subunit 404 is configured to determine whether the action video meets the video recording standard if the brightness information meets the video brightness threshold.
[0135] According to some embodiments, the apparatus 10 may further include a first model training unit 50, wherein before the video acquisition unit 10 is used to acquire the action video of the target person in the vehicle cabin, the first model training unit 50 is used to acquire a pre-collected training sample set, wherein the training sample set includes a plurality of video clips including action category labels;
[0136] Inputting the video clip into an action recognition model to extract features, and outputting an action feature vector for training;
[0137] Based on the mapping relationship between the action feature vector and the action category, determining the action category corresponding to the action feature vector for training;
[0138] A first loss value is calculated according to the action category and the action category label, and a model parameter of the action recognition model is updated according to the first loss value to obtain a trained action recognition model.
[0139] According to some embodiments, the device 10 may further include a second model training unit 60, wherein before the video acquisition unit 10 is used to acquire the action video of the target person in the vehicle cabin, the second model training unit 60 is used to acquire a plurality of pre-collected content generation samples, wherein the content generation samples include content generation type samples, action feature vector samples, and content generation parameter samples;
[0140] Inputting the content generation type sample into a parameter generation model, determining a content generation parameter space in the parameter generation model, wherein the content generation parameter space includes a mapping relationship between a preset action feature vector and a content generation parameter;
[0141] Inputting the action feature vector sample into the parameter generation model to map the action feature vector sample into the content generation parameter space, and outputting a content generation parameter combination for training;
[0142] A second loss value is calculated based on the content generation parameter sample and the content generation parameter combination for training, and the model parameters of the parameter generation model are updated based on the second loss value to obtain a trained parameter generation model.
[0143] The embodiment of the present application uses a pre-trained action recognition model to identify the action video of a target person in a vehicle cabin and extracts a target action feature vector; a pre-trained parameter generation model is used to perform parameter mapping on the input content generation type and the target action feature vector to obtain a content generation parameter combination, and the content generation parameters can be obtained according to the actual action behavior of the target person, thereby realizing the automatic generation of content generation parameters, greatly simplifying the process of users manually setting parameters, improving the user experience, and also improving the accuracy and efficiency of parameter setting.
[0144] See also Figure 7 , which is a schematic diagram of the structure of a vehicle provided in the embodiment of the present application. Figure 7 As shown, the vehicle 500 includes a processor 501 and a memory 502. The processor 501 is electrically connected to the memory 502.
[0145] The processor 501 is the control center of the electronic device 500 and may include one or more processing cores. The processor 501 uses various interfaces and lines to connect the various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or calling the computer program stored in the memory 502, and calling the data stored in the memory 502, so as to control the electronic device as a whole. Optionally, the processor 501 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 501 can integrate one or a combination of CPU, graphics processing unit (GPU), modem, etc. Among them, the CPU mainly processes the operating system, user pages and applications, etc.; the GPU is responsible for rendering and drawing the display content; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 501, but implemented separately through a communication chip.
[0146] The memory 502 can be used to store software programs and modules, and the processor 501 executes various functional applications and data processing by running the computer programs and modules stored in the memory 502. The memory 502 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, a computer program required for at least one function, etc.; the data storage area can store data created according to the use of the electronic device, etc.
[0147] In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.
[0148] In this embodiment, the processor 501 in the electronic device 500 also loads instructions corresponding to the processes of one or more computer programs into the memory 502 according to the following steps, and the processor 501 runs the computer program stored in the memory 502 to implement various functions, as follows:
[0149] Obtain action video of the target person in the vehicle cabin;
[0150] Inputting the action video into a pre-trained action recognition model to extract action features and obtain a target action feature vector;
[0151] The input content generation type is obtained, and the content generation type and the target action feature vector are input into a pre-trained parameter generation model for parameter mapping to obtain a content generation parameter combination, which is used to generate content corresponding to the content generation type.
[0152] Optionally, when the processor 501 inputs the content generation type and the target action feature vector into a pre-trained parameter generation model for parameter mapping to obtain a content generation parameter combination, the processor 501 specifically executes:
[0153] Determining a content generation parameter space in the parameter generation model according to the content generation type, the content generation parameter space including a mapping relationship between a preset action feature vector and a content generation parameter;
[0154] The target action feature vector is mapped into the content generation parameter space, and a content generation parameter combination is obtained as output.
[0155] Optionally, when the processor 501 acquires the action video of the target person in the vehicle cabin, it specifically executes:
[0156] Acquire the interior image of the vehicle's cabin;
[0157] Performing person detection on the cabin interior image to obtain a person detection result;
[0158] If the person detection result is that there is a target person in the vehicle cabin, a video of the target person is recorded to obtain an action video of the target person.
[0159] Optionally, after acquiring the action video of the target person in the vehicle cabin, the processor 501 may further execute:
[0160] Detecting the action video of the target person based on a video recording standard;
[0161] If the action video meets the video recording standard, the step of inputting the action video into a pre-trained action recognition model to extract action features is performed.
[0162] Optionally, when the processor 501 detects the action video of the target person based on the video recording standard, the processor 501 specifically performs:
[0163] Extracting action video frames from the action video;
[0164] Convert the action video frame into a grayscale image, and obtain brightness information of the grayscale image;
[0165] Matching the brightness information with a video brightness threshold in the video recording standard;
[0166] If the brightness information meets the video brightness threshold, it is determined that the action video meets the video recording standard.
[0167] Optionally, before acquiring the action video of the target person in the vehicle cabin, the processor 501 may further execute:
[0168] Acquire a pre-collected training sample set, wherein the training sample set includes a plurality of video clips including action category labels;
[0169] Inputting the video clip into an action recognition model to extract features, and outputting an action feature vector for training;
[0170] Based on the mapping relationship between the action feature vector and the action category, determining the action category corresponding to the action feature vector for training;
[0171] A first loss value is calculated according to the action category and the action category label, and a model parameter of the action recognition model is updated according to the first loss value to obtain a trained action recognition model.
[0172] Optionally, before acquiring the action video of the target person in the vehicle cabin, the processor 501 may further execute:
[0173] Acquire a plurality of pre-collected content generation samples, wherein the content generation samples include content generation type samples, action feature vector samples, and content generation parameter samples;
[0174] Inputting the content generation type sample into a parameter generation model, determining a content generation parameter space in the parameter generation model, wherein the content generation parameter space includes a mapping relationship between a preset action feature vector and a content generation parameter;
[0175] Inputting the action feature vector sample into the parameter generation model to map the action feature vector sample into the content generation parameter space, and outputting a content generation parameter combination for training;
[0176] A second loss value is calculated based on the content generation parameter sample and the content generation parameter combination for training, and the model parameters of the parameter generation model are updated based on the second loss value to obtain a trained parameter generation model.
[0177] See also Figure 8 , which is a schematic diagram of the structure of a vehicle provided in the embodiment of the present application. Figure 8As shown, the vehicle 500 includes: a processor 501, a memory 502, a display screen 503, a camera component 504, an audio circuit 505, a sensor 506 and a power supply 507. The processor 501 is electrically connected to the display 503, the camera component 504, the audio circuit 505, the sensor 506 and the power supply 507 respectively.
[0178] The display screen 503 may be used to display information input by a user or information provided to a user and various graphical user interfaces of the electronic device. These graphical user interfaces may be composed of images, texts, icons, videos and any combination thereof.
[0179] The camera assembly 504 may include an image processing circuit, which may be implemented using hardware and / or software components and may include various processing units that define an image signal processing pipeline. The image processing circuit may include at least: multiple cameras, an image signal processor (ISP processor), a control logic, and an image memory, etc. Each camera may include at least one or more lenses and an image sensor. The image sensor may include a color filter array (such as a Bayer filter). The image sensor may obtain light intensity and wavelength information captured by each imaging pixel of the image sensor, and provide a set of raw image data that can be processed by an image signal processor.
[0180] The audio circuit 505 can be used to provide an audio interface between a user and an electronic device through a speaker and a microphone. The audio circuit 505 includes a microphone. The microphone is electrically connected to the processor 501. The microphone is used to receive voice information input by the user.
[0181] The sensor 506 is used to collect information of the electronic device itself, the user's information, or the external environment information. For example, the sensor 506 may include one or more of a vibration sensor, a temperature sensor, a distance sensor, a magnetic field sensor, a light sensor, an acceleration sensor, a fingerprint sensor, a Hall sensor, a position sensor, a gyroscope, an inertial sensor, a posture sensor, a barometer, a heart rate sensor, and the like.
[0182] The power supply 507 is used to supply power to various components of the electronic device 500. In some embodiments, the power supply 507 may be logically connected to the processor 501 through a power management system, so that the power management system can manage charging, discharging, power consumption, and other functions.
[0183] It should be understood that the device provided in the embodiment of the present application is used to execute the above-mentioned method for generating content generation parameters, and thus can achieve the same effect as the above-mentioned implementation method.
[0184] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to a vehicle, the processing module may be used to control and manage the actions of the vehicle. The storage module may be used to support the vehicle in executing relevant program codes, etc.
[0185] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.
[0186] In addition, the device provided in the embodiment of the present application may specifically be a chip, a component or a module, and the chip may include a connected processor and a memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a method for generating content generation parameters provided in the above embodiment.
[0187] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement a method for generating content generation parameters provided in the above embodiment.
[0188] This embodiment further provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement a method for generating content generation parameters provided in the above embodiment.
[0189] Among them, the device, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0190] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0191] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0192] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for generating content generation parameters, characterized in that: The method comprises: Obtain action video of the target person in the vehicle cabin; Inputting the action video into a pre-trained action recognition model to extract action features and obtain a target action feature vector; The input content generation type is obtained, and the content generation type and the target action feature vector are input into a pre-trained parameter generation model for parameter mapping to obtain a content generation parameter combination, which is used to generate content corresponding to the content generation type.
2. The method according to claim 1, characterized in that: The step of inputting the content generation type and the target action feature vector into a pre-trained parameter generation model for parameter mapping to obtain a content generation parameter combination includes: Determining a content generation parameter space in the parameter generation model according to the content generation type, the content generation parameter space including a mapping relationship between a preset action feature vector and a content generation parameter; The target action feature vector is mapped into the content generation parameter space, and a content generation parameter combination is obtained as output.
3. The method according to claim 1, characterized in that The step of obtaining the action video of the target person in the vehicle cabin includes: Acquire the interior image of the vehicle's cabin; Performing person detection on the cabin interior image to obtain a person detection result; If the person detection result is that there is a target person in the vehicle cabin, a video of the target person is recorded to obtain an action video of the target person.
4. The method according to claim 1, characterized in that: After obtaining the action video of the target person in the vehicle cabin, the method further includes: Detecting the action video of the target person based on a video recording standard; If the action video meets the video recording standard, the step of inputting the action video into a pre-trained action recognition model to extract action features is performed.
5. The method according to claim 4, characterized in that The detecting the action video of the target person based on the video recording standard includes: Extracting action video frames from the action video; Convert the action video frame into a grayscale image, and obtain brightness information of the grayscale image; Matching the brightness information with a video brightness threshold in the video recording standard; If the brightness information meets the video brightness threshold, it is determined that the action video meets the video recording standard.
6. The method according to claim 1, characterized in that Before obtaining the action video of the target person in the vehicle cabin, the method further includes: Acquire a pre-collected training sample set, wherein the training sample set includes a plurality of video clips including action category labels; Inputting the video clip into an action recognition model to extract features, and outputting an action feature vector for training; Based on the mapping relationship between the action feature vector and the action category, determining the action category corresponding to the action feature vector for training; A first loss value is calculated according to the action category and the action category label, and a model parameter of the action recognition model is updated according to the first loss value to obtain a trained action recognition model.
7. The method according to claim 1, characterized in that Before obtaining the action video of the target person in the vehicle cabin, the method further includes: Acquire a plurality of pre-collected content generation samples, wherein the content generation samples include content generation type samples, action feature vector samples, and content generation parameter samples; Inputting the content generation type sample into a parameter generation model, determining a content generation parameter space in the parameter generation model, wherein the content generation parameter space includes a mapping relationship between a preset action feature vector and a content generation parameter; Inputting the action feature vector sample into the parameter generation model to map the action feature vector sample into the content generation parameter space, and outputting a content generation parameter combination for training; A second loss value is calculated based on the content generation parameter sample and the content generation parameter combination for training, and the model parameters of the parameter generation model are updated based on the second loss value to obtain a trained parameter generation model.
8. A device for generating content generation parameters, characterized in that: The device comprises: A video acquisition unit, used to acquire a motion video of a target person in a vehicle cabin; A feature extraction unit, used for inputting the action video into a pre-trained action recognition model to extract action features and obtain a target action feature vector; A parameter generation unit is used to obtain the input content generation type, input the content generation type and the target action feature vector into a pre-trained parameter generation model for parameter mapping, and obtain a content generation parameter combination, which is used to generate content corresponding to the content generation type.
9. A vehicle, characterized in that: The vehicle comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the vehicle executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Vehicle electric tail door opening method based on target detection and motion recognition
CN109882019A
Home video tracking and monitoring method, device, equipment and storage medium
CN115086527A
Video cover determination method and device, equipment and medium
CN116343097A
Video acquisition method and device, storage medium and electronic equipment
CN116664726A
Touchless image-based input interface
CN118235103A
