A video viewing angle classification method, device, equipment and storage medium
By extracting multi-frame images in the video analysis system and using a single-frame image classification model to calculate the viewing angle probability value, the problem of poor video analysis results from different viewing angles is solved, and accurate automatic classification of video viewing angles is achieved and the effect of the intelligent analysis system is improved.
Patent Information
- Application Number
- CN202110008444.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-05
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-01-05
AI Technical Summary
Existing video analysis systems are not ideal when processing videos from different viewing angles, especially due to differences in installation locations and angles of motorcycle on-board cameras, resulting in poor driver behavior recognition.
By obtaining the target video, extract multiple frame images and input them into the pre-trained single-frame image classification model, calculate the probability value of each frame image belonging to different perspectives, determine the perspective probability value of the video based on specific and common features, and compare it with the threshold to determine Perspective classification results.
It achieves accurate automatic classification of video angles, reduces manual classification work, improves classification speed, avoids the impact of light differences, driver presence and location on classification results, and improves the analysis effect of the intelligent analysis system.
Smart Images

Figure CN112668533B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and more specifically, to a video viewing angle classification method, device, equipment and storage medium. Background Art
[0002] In recent years, with the development of video analysis technology, the analysis and identification of locomotive driver behavior is gradually shifting from manual analysis to intelligent analysis. One of the intelligent analysis methods requires the use of video surveillance equipment in the existing locomotive on-board safety protection system (6A system).
[0003] At present, the driver behavior recognition system based on 6A video has achieved good results in the early trials, but it is based on the premise of analyzing videos with similar perspectives. The differences in the installation position and angle of the 6A camera on the locomotive will cause the 6A video to have different perspectives. Taking the Harmony electric locomotive as an example, there are two common perspectives of the right and right rear. Using the same model to analyze the pictures of different perspectives is not ideal. Therefore, in order to improve the effect of intelligent analysis systems such as driver behavior recognition, how to classify video perspectives is a problem that technicians in this field need to solve. Summary of the invention
[0004] The purpose of the present invention is to provide a method, device, equipment and storage medium for classifying video viewing angles, so as to achieve accurate classification of video viewing angles.
[0005] To achieve the above object, the present invention provides a video viewing angle classification method, comprising:
[0006] Get the target video;
[0007] Extracting a first predetermined number of frames of images from the target video at time intervals of a predetermined duration;
[0008] Input each frame of image into the pre-trained single-frame image classification model to obtain the probability value of each frame of image belonging to different perspectives;
[0009] Based on the specific features and common features between images, the probability value of each frame image in the target video belonging to different perspectives is used to calculate the target probability value of the target video belonging to each perspective;
[0010] The target probability value of the target video belonging to each perspective is compared with the probability value threshold of the corresponding perspective, and the perspective classification result of the target video is determined according to the comparison result.
[0011] Before obtaining the target video, the method further includes:
[0012] A probability value threshold corresponding to each viewing angle is determined.
[0013] The step of determining a probability value threshold corresponding to each viewing angle includes:
[0014] determining training videos; wherein each training video has an identified viewing angle;
[0015] Extracting a second predetermined number of frames of training images from each training video at time intervals of a predetermined duration, and obtaining a probability value of each frame of training image belonging to a different perspective through the single-frame image classification model;
[0016] Update the probability value of each frame of training image in each training video belonging to the corresponding perspective;
[0017] Using the updated probability values, calculating a first total probability value of each training video corresponding to each viewing angle; the first total probability value is the sum of the updated probability values of each frame of training image in the same training video belonging to the corresponding viewing angle;
[0018] A probability value threshold corresponding to each viewing angle is determined according to the first total probability value and the second predetermined number of frames.
[0019] The updating of the probability value of each frame of training image in each training video belonging to the corresponding viewing angle includes:
[0020] Obtaining a training probability value that each training image frame of the current training video belongs to the viewing angle of the current training video, and determining whether the training probability value is greater than a first determination threshold;
[0021] If it is greater than, the probability value of the training image is retained; otherwise, the probability value of the training image is modified to zero to obtain an updated probability value that each frame of each training image in each training video belongs to the corresponding perspective.
[0022] The step of determining the probability value threshold corresponding to each viewing angle according to the first total probability value and the second predetermined number of frames includes:
[0023] Determining a target total probability value corresponding to each perspective from a first total probability value of at least one training video of each perspective;
[0024] The probability value threshold corresponding to each viewing angle is determined by using the target total probability value of each viewing angle and the second predetermined number of frames.
[0025] The step of determining a target total probability value corresponding to each perspective from the first total probability value of at least one training video of each perspective comprises:
[0026] From the first total probability values of at least one training video of each perspective, a first total probability value with the smallest value is selected as a target total probability value of each perspective.
[0027] The step of determining a target total probability value corresponding to each perspective from the first total probability value of at least one training video of each perspective comprises:
[0028] An average of the first total probability values of all training videos corresponding to each viewing angle is calculated, and the average value is used as the target total probability value of the corresponding viewing angle.
[0029] Wherein, obtaining the target video includes:
[0030] A target video to be classified is obtained from a locomotive onboard safety protection system to classify the cab perspective in the target video.
[0031] After determining the view classification result of the target video according to the comparison result, the method further includes:
[0032] The target video is analyzed by an intelligent analysis system corresponding to the view classification result.
[0033] The step of analyzing the target video by an intelligent analysis system corresponding to the view classification result includes:
[0034] The target video is analyzed by a driver behavior analysis system corresponding to the view classification result.
[0035] The step of comparing the target probability value of the target video belonging to each perspective with the probability value threshold of the corresponding perspective, and determining the perspective classification result of the target video according to the comparison result, includes:
[0036] The target probability value of the target video belonging to each perspective is compared with the corresponding probability value threshold of the same perspective. If the comparison result is: only one target perspective has a target probability value greater than or equal to the probability value threshold of the target perspective, then the perspective of the target video is determined to be the target perspective; otherwise, it is determined that the classification of the target video perspective has failed.
[0037] The method of calculating the target probability value of the target video belonging to each perspective based on the specific features and common features between images and using the probability value of each frame image in the target video belonging to different perspectives includes:
[0038] Based on the specific features between the images, the probability value of each frame of the target video belonging to each perspective is updated;
[0039] Based on the common features between the images, a second total probability value of the target video belonging to each viewing angle is calculated; the second total probability value is the sum of updated probability values of each frame image in the target video belonging to the same viewing angle;
[0040] The target probability value of the target video belonging to each perspective is calculated according to the second total probability value and the first predetermined number of frames.
[0041] The updating of the probability value of each frame image in the target video belonging to each viewing angle includes:
[0042] Determine whether the probability value of each frame image in the target video belonging to the current viewing angle is greater than a second determination threshold;
[0043] If it is greater than the second determination threshold, the probability value of the image belonging to the current viewing angle is retained; otherwise, the probability value of the image belonging to the current viewing angle is modified to zero to obtain an updated probability value of each frame image belonging to each viewing angle.
[0044] To achieve the above object, the present invention further provides a video viewing angle classification device, comprising:
[0045] A target video acquisition module is used to acquire a target video;
[0046] An image extraction module, used to extract a first predetermined number of frames of images from the target video at time intervals of a predetermined duration;
[0047] A probability value acquisition module is used to input each frame of image into a pre-trained single-frame image classification model to obtain the probability value of each frame of image belonging to different perspectives;
[0048] A calculation module, for calculating a target probability value of the target video belonging to each perspective based on the specific features and common features between images and using the probability value of each frame image in the target video belonging to different perspectives;
[0049] The classification module is used to compare the target probability value of the target video belonging to each perspective with the probability value threshold of the corresponding perspective, and determine the perspective classification result of the target video according to the comparison result.
[0050] To achieve the above object, the present invention further provides an electronic device, comprising:
[0051] Memory for storing computer programs;
[0052] A processor is used to implement the steps of the above-mentioned view classification method when executing the computer program.
[0053] To achieve the above objectives, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned view classification method are implemented.
[0054] It can be seen from the above scheme that an embodiment of the present invention provides a method for classifying the perspective of a video. In this method, when classifying the perspective of a target video, it is first necessary to extract multiple frames of images from the target video and input a pre-trained single-frame image classification model to obtain the probability value of each frame of the image belonging to a different perspective. The target probability value of the target video belonging to each perspective is obtained based on the specific features and common features between each frame of the image, and the perspective classification result of the target video is automatically obtained by comparing the target probability value belonging to the same perspective with the probability value threshold. It can be seen that the present application can realize automatic classification of video perspectives, reduce the work of manual classification, and improve the classification speed. Moreover, when the present application calculates the target probability value of the target video belonging to each perspective, it is determined by the probability value of the single-frame image of the target video belonging to each perspective. In this way, both the common features between different frames and the specific features between different frames are taken into account, thereby greatly avoiding the influence of light differences, the presence or absence of a driver, and the different positions of the driver on the classification results, and realizing accurate classification of perspectives. The present invention also discloses a video perspective classification device, equipment and readable storage medium. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 A schematic diagram of a flow chart of a method for classifying video viewing angles disclosed in an embodiment of the present invention;
[0057] Figure 2 A schematic diagram of a method for determining a probability value threshold value according to an embodiment of the present invention;
[0058] Figure 3 A schematic diagram of the implementation flow of the cab view classification method based on 6A video disclosed in an embodiment of the present invention;
[0059] Figure 4 A schematic diagram of the structure of a video view classification model disclosed in an embodiment of the present invention;
[0060] Figure 5 The core logic of the video view classification model disclosed in the embodiment of the present invention;
[0061] Figure 6 A schematic diagram of the structure of a video viewing angle classification device disclosed in an embodiment of the present invention;
[0062] Figure 7The present invention is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0063] Traditional video classification or image classification methods cannot accurately classify video perspectives due to their insufficient feature resolution and weak connection between image semantics and image feature expression. Taking the perspective classification of 6A videos of the locomotive vehicle-mounted safety protection system (6A system) as an example, the image features of the locomotive cab in the 6A video present different image features due to differences in lighting (such as: intensity differences of daytime light, intensity differences of infrared light during night imaging), the presence or absence of a driver, and the different positions of the driver when there is a driver. However, the objects of the video screen are all locomotive cabs, and videos from different perspectives will also present certain common features. Therefore, for the same perspective, while enhancing the common features, how to eliminate specific features becomes the key. Therefore, the embodiment of the present invention discloses a video perspective classification method, device, equipment and storage medium to achieve accurate classification of video perspectives.
[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] It should be noted that, since the present application needs to classify each frame of the target video through a single-frame image classification model when classifying the target video perspective, in this embodiment, the training process of the single-frame image classification model is first described, so that each frame of the image can be directly classified through the trained single-frame image classification model to obtain the probability value of each frame of the image belonging to a different perspective. In addition, the present application uses 6A video as an example to illustrate this solution, and other videos are also acceptable, so it is not specifically limited here.
[0066] Specifically, the single-frame image classification model in this application can be a model based on a deep convolutional neural network (Deep Convolutional Neural Network, DCNN), and the simple construction process of the model includes the preparation, training, and test evaluation of the data set. Among them, for the preparation process of the data set, it is first necessary to classify a certain number of 6A videos by viewing angle, then extract frames from the video, and then select normal pictures covering different image features, and ensure that the number of pictures under each viewing angle reaches a certain number, and the number of repeated pictures should be as small as possible, and finally divide the training set and the test set according to a certain ratio. For the training process of the model, the existing mature model can be used in combination with the training set for training. In addition to focusing on the loss function, the training also needs to be combined with the test set to evaluate the model effect. After several tests and evaluations, a version of the appropriate model is selected as the trained single-frame image classification model. After the single-frame picture is input into the trained model, the viewing angle corresponding to the picture and the probability value belonging to the viewing angle can be output.
[0067] See also Figure 1 , a schematic diagram of a flow chart of a method for classifying video viewing angles provided by an embodiment of the present invention; Figure 1 It can be seen that the method comprises the following steps:
[0068] S101, obtaining a target video;
[0069] Specifically, the target video in the present application represents the video to be classified, which can be a target video of different perspectives of a concert, a target video of different perspectives of a teacher's lecture, or a target video of different perspectives in the cab. If the target video is a target video of different perspectives in the cab, then the target video can be a cab environment video of a passenger locomotive, a cab environment video of a freight locomotive, and can also be a subway cab environment video, an urban rail cab environment video, etc., which is not specifically limited here.
[0070] In this application, the target video is a locomotive cab environment video as an example to illustrate this solution. Among them, if the target video is a video in the locomotive cab environment, since the locomotive onboard safety protection system (i.e., 6A system) has a video monitoring device, when obtaining the target video, this application specifically obtains the target video to be classified from the locomotive onboard safety protection system to achieve classification of the cab perspective in the target video.
[0071] S102, extracting a first predetermined number of frames of images from the target video at predetermined time intervals;
[0072] Specifically, in order to accurately classify the target video, the present application needs to obtain the probability value of the target video belonging to each perspective through the probability value of a single frame image of the target video belonging to each perspective. Therefore, in this embodiment, it is necessary to continuously extract frame images from the target video at time intervals with a predetermined duration, and the number of images is a first predetermined number of frames, such as: the total duration of the target video is 5 minutes, and the predetermined duration is 30s, that is: 1 frame of image is extracted from the target video every 30s, so as to obtain the first predetermined number of frames of image.
[0073] S103, inputting each frame of image into a pre-trained single-frame image classification model to obtain a probability value of each frame of image belonging to a different perspective;
[0074] In this embodiment, after obtaining the first predetermined number of frames of images, it is necessary to input the first predetermined number of frames of images into a pre-trained single-frame image classification model to obtain a preliminary classification result, which is the probability value of each frame of image belonging to a different perspective, such as: the types of perspective include: right perspective, right rear perspective 1, right rear perspective 2, so the preliminary classification result obtained by inputting each frame of image into the single-frame image classification model can be: the probability value of image 1 belonging to the right perspective is 80%, the probability value of image 1 belonging to the right rear perspective 1 is 10%, the probability value of image 1 belonging to the right rear perspective 2 is 10%, and so on, to obtain the probability value of each frame of image belonging to each perspective.
[0075] S104, based on the specific features and common features between the images, using the probability values of each frame image in the target video belonging to different perspectives, calculating the target probability value of the target video belonging to each perspective;
[0076] It should be noted that, since the present application extracts frame images of the same target video at different times, there are specific features and common features in the frame images corresponding to the same target video, such as: the dynamically changing features in the video are specific features, and the static features are common features. Therefore, the present application uses the probability value of each frame image in the target video belonging to different perspectives to calculate the target probability value of the target video belonging to each perspective. The calculation can be based on the specific features and common features between images. For example, in order to eliminate the negative impact of the specific features between each frame image on the classification result, the probability value of each frame image can be reassigned, or, since there are common features between images, the probability values of different frame images can be summarized as a probability value representing the current video, and so on. Of course, the target probability value of the target video can also be determined based on the specific features and common features between images in other ways, which is not limited to the above two methods.
[0077] S105 , comparing the target probability value that the target video belongs to each perspective with the probability value threshold of the corresponding perspective, and determining the perspective classification result of the target video according to the comparison result.
[0078] Among them, the present application compares the target probability value of the target video belonging to each perspective with the probability value threshold of the corresponding perspective, and determines the perspective classification result of the target video according to the comparison result, specifically including the following operations: comparing the target probability value of the target video belonging to each perspective with the corresponding probability value threshold of the same perspective. If the comparison result is: only one target perspective has a target probability value greater than or equal to the probability value threshold of the target perspective, then the perspective of the target video is determined to be the target perspective; otherwise, it is determined that the classification of the target video perspective has failed.
[0079] It should be noted that in the present application, each perspective has a corresponding probability value threshold. The method for determining the probability value threshold can be customized by the user, or it can be set through data set training based on the specific features and common features between images. The acquisition method is not specifically limited here, and technical personnel in this field can make a choice based on actual conditions.
[0080] In addition, after the present application obtains the target probability value that the target video belongs to each video, it is necessary to compare the target probability value with the probability value threshold of the corresponding perspective. It can be understood that the probability value threshold of the corresponding perspective in the present application is the probability value threshold of the same perspective as the target probability value. For example, the perspective includes: right perspective, right rear perspective 1, and right rear perspective 2. The target probability value includes: target probability value 1 of the right perspective, target probability value 2 of the right rear perspective 1, and target probability value 3 of the right rear perspective 2. The probability value threshold includes: probability value threshold 1 of the right perspective, probability value threshold 2 of the right rear perspective 1, and probability value threshold 3 of the right rear perspective 2. When comparing, comparing the target probability value with the probability value threshold of the corresponding perspective is specifically: comparing the target probability value 1 with the probability value threshold 1, comparing the target probability value 2 with the probability value threshold 2, and comparing the target probability value 3 with the probability value threshold 3.
[0081] Furthermore, the comparison results obtained by the present application may include the following: Comparison result 1: only one target probability value is greater than or equal to the corresponding probability value threshold; Comparison result 2: multiple target probability values are greater than or equal to the corresponding probability value threshold; Comparison result 3: the target probability value is less than the corresponding probability value threshold; Among them, for the above three comparison results, only comparison result 1 indicates that the current perspective classification is successful, that is: the perspective of the target video is the only target perspective with a target probability value greater than or equal to the corresponding probability value threshold, and for comparison results 2 and 3, both are determined to be classification failures and are abnormal. If the classification result is an abnormal class, a corresponding reminder message can be generated to inform the user, and the reminder message can include various data in the classification process and the reasons for the classification failure, etc., to help the user analyze the reasons for the failure.
[0082] It is understandable that when the current intelligent analysis system analyzes the video, the effect is not ideal because videos from different angles are analyzed through the same model to analyze the pictures from different perspectives. Therefore, in the present application, after determining the perspective classification result of the target video according to the comparison result, it also includes: analyzing the target video through the intelligent analysis system corresponding to the perspective classification result. In this way, the videos with different perspectives identified can be analyzed through the intelligent analysis system of the corresponding perspective, thereby improving the analysis effect of the intelligent analysis system, such as: after analyzing the target video through the driver behavior analysis system corresponding to the perspective classification result, accurate driver behavior analysis results can be obtained, which better solves the problems existing in traditional algorithms, thereby promoting the promotion and application of intelligent analysis systems similar to driver behavior recognition in the field of rail transit.
[0083] In summary, it can be seen that the video perspective classification method described in this application can realize automatic classification of video perspectives, reduce the work of manual classification, and improve classification speed; and, when the application calculates the target probability value of the target video belonging to each perspective, it is determined by the probability value of the single frame image of the target video belonging to each perspective. In this way, the common characteristics between different frames are taken into account, and the specific characteristics between different frames are taken into account, thereby greatly avoiding the influence of light differences, the presence or absence of drivers, and the different positions of drivers on the classification results, and realizing accurate classification of perspectives. Moreover, when the present application is applied to the cab video of 6A video, the problem of unsatisfactory effects of intelligent analysis systems such as driver behavior recognition caused by differences in the perspective of 6A video can be solved, and the present embodiment adopts a method based on deep learning to perform correlation analysis on the front and back frames of the video, and completes the classification of the locomotive 6A video by analyzing the common characteristics and specific characteristics of different frames, which can better solve the problems existing in traditional algorithms, thereby promoting the promotion and application of intelligent analysis systems similar to driver behavior recognition in the field of rail transit.
[0084] Based on the above embodiment, in this embodiment, before acquiring the target video, it is also necessary to determine the probability value threshold corresponding to each viewing angle. Figure 2 , which is a flow chart of a method for determining a probability value threshold provided by an embodiment of the present invention. It can be seen that the process of determining a probability value threshold corresponding to each viewing angle in the present application specifically includes the following steps:
[0085] S201, determining training videos; wherein each training video has an identified viewing angle;
[0086] Specifically, the training videos determined in this application are training videos with determined viewing angles, which are right viewing angle, right rear viewing angle 1, right rear viewing angle 2, etc. In addition, the number of training videos in this application can be customized, but it is necessary to ensure that each viewing angle has a corresponding training video, and the number of training videos corresponding to each viewing angle can be set according to demand, such as the number of training videos for each viewing angle can be set to 20 or 30, etc.
[0087] S202, extracting a second predetermined number of frames of training images from each training video at a predetermined time interval, and obtaining a probability value of each frame of training image belonging to a different perspective through a single-frame image classification model;
[0088] In this embodiment, a certain number of training videos are selected from multiple videos that have been classified according to viewing angles, and then one frame of image is extracted from each training video at the same viewing angle at the same time interval as a training image. These frame training images are then input into a pre-trained single-frame image classification model, and the classification result and probability of each frame training image are output.
[0089] S203, updating the probability value of each frame of training image in each training video belonging to the corresponding viewing angle;
[0090] It should be noted that, in this embodiment, it is necessary to reassign the probability value of the training image in combination with the actual classification result of the video and the specific features of the current frame; specifically, the reassignment process includes: obtaining the training probability value of each frame of the current training video belonging to the perspective of the current training video, and determining whether the training probability value is greater than a first judgment threshold; if greater, retaining the probability value of the training image, otherwise, modifying the probability value of the training image to zero, so as to obtain an updated probability value that each frame of the training image of each training video belongs to the corresponding perspective.
[0091] It can be understood that for the sake of convenience of explanation, this application refers to the training video to be processed as the current training video, such as: for 10 training videos with the right perspective, if the first training video is currently being processed, then the first training video is the current training video; and, after each frame of training image of the current training video is input into the single-frame image classification model, the probability value of each frame of training image belonging to each perspective will be obtained, and then it is determined whether the probability value of each frame of training image belonging to the angle of the training video is greater than the first judgment threshold. If it is greater than the first judgment threshold, it means that the classification result of the frame of training image is accurate, and the probability value of the frame of training image is retained. Otherwise, it means that the classification result of the frame of training image is wrong, and the probability value is replaced with 0.
[0092] Here, we take the first frame of training image of the current training video as an example to illustrate: if the result obtained after the first frame of training image is input into the single-frame image classification model is: the probability value of belonging to the right perspective is 80%, the probability value of belonging to the right rear perspective 1 is 10%, and the probability value of belonging to the right rear perspective 2 is 10%, and the first judgment threshold is 70%. Since the first frame of training image belongs to the first training video, and the perspective of the first training video is the right perspective, therefore, for the first frame of training image, it is only necessary to judge whether the probability value of the first frame of training image belonging to the right perspective is greater than the first judgment threshold. It can be seen that the probability value of the first frame of training image belonging to the right perspective is 80%, which is greater than the first judgment threshold of 70%. Therefore, The classification result of 1 frame of training image is accurate, and the probability value of the 1st frame of training image is retained; it can be understood that if the result obtained after the 1st frame of training image is input into the single-frame image classification model is: the probability value of belonging to the right perspective is 10%, the probability value of belonging to the right rear perspective 1 is 80%, and the probability value of belonging to the right rear perspective 2 is 10%. Although the probability value of the right rear perspective 1 is greater than the first judgment threshold of 70%, since the perspective of the current training video to which the 1st frame of training image belongs is the right perspective, the probability value of belonging to the right rear perspective 1 is not considered, and since the probability value belonging to the right perspective is less than the first judgment threshold, the classification result of the 1st frame of training image is wrong, and the probability value is replaced by 0.
[0093] By updating the probability value of each frame of training image in each training video belonging to each viewing angle in the above manner, an updated probability value of each frame of training image in each training video belonging to the corresponding viewing angle is obtained.
[0094] S204, using the updated probability values, calculating a first total probability value of each training video corresponding to each viewing angle; the first total probability value is the sum of the updated probability values of each frame of training image in the same training video belonging to the corresponding viewing angle;
[0095] In this embodiment, considering that there are obvious common features between different frames of the same training video, in this embodiment, the probability values of these frames are summarized into a first total probability value representing the current video, and the first total probability value is the sum of the probability values of each frame of the training picture, such as: the viewing angle of training video 1 is the right viewing angle, and training video 1 has 30 frames of training pictures. After being updated through S203, the sum of the probability values of these 30 frames of training pictures is the first total probability value of training video 1. If there are multiple training videos corresponding to the same viewing angle, the generated first total probability value is the same as the number of training videos, which is also multiple.
[0096] S205: Determine a probability value threshold corresponding to each viewing angle according to the first total probability value and the second predetermined number of frames.
[0097] It should be noted that after obtaining the first total probability value of each training video corresponding to each perspective, the application needs to statistically distribute the first probability values of all training videos at each perspective to obtain a threshold parameter that allows most videos at each perspective to be correctly classified into that perspective. Each perspective corresponds to a threshold parameter, and multiple perspectives will have a set of threshold parameters. Specifically, the application determines the target total probability value corresponding to each perspective from the first total probability value of at least one training video at each perspective; then uses the target total probability value of each perspective and the second predetermined number of frames to determine the probability value threshold corresponding to each perspective.
[0098] That is to say, if there are multiple training videos for a perspective, there will also be multiple first total probability values. The present application needs to select a representative target total probability value from the multiple first total probability values in a pre-set manner, such as: the first total probability value with the smallest value can be selected from the first total probability value of at least one training video of each perspective as the target total probability value of each perspective. Alternatively, the average value of the first total probability values of all training videos corresponding to each perspective is calculated, and the average value is used as the target total probability value of the corresponding perspective. After determining the target total probability value of each perspective, the quotient of the target total probability value and the second predetermined number of frames can be calculated as the probability value threshold of the corresponding perspective.
[0099] It can be seen that when determining the probability value threshold for each perspective, the present application also takes into account the specific features and common features existing between different frames of the same training video, so that the probability value threshold obtained by training is set more accurately. The probability value threshold obtained in this way can more accurately classify the target video and improve the accuracy of classification.
[0100] Based on any of the above embodiments, in this embodiment, based on the specific features and common features between images, using the probability value of each frame image in the target video belonging to different perspectives, the target probability value of the target video belonging to each perspective is calculated, including:
[0101] Based on the specific features between images, the probability value of each frame image in the target video belonging to each perspective is updated; based on the common features between images, a second total probability value of the target video belonging to each perspective is calculated; the second total probability value is the sum of the updated probability values of each frame image in the target video belonging to the same perspective; the target probability value of the target video belonging to each perspective is calculated based on the second total probability value and the first predetermined number of frames.
[0102] In this embodiment, the process of calculating the target probability value of each viewing angle is similar to the process of determining the probability value threshold corresponding to each viewing angle in the previous embodiment. Specifically, this embodiment also needs to extract 1 frame of the target video to be classified at the same time interval, and then assume that the video belongs to a certain type of viewing angle. According to the processing process of the previous embodiment, the target probability value when the target video belongs to this type of viewing angle is calculated, and then a set of probability parameters can be obtained. The set of probability parameters includes the target probability value of the target video belonging to each viewing angle. Then, this set of probability parameters and the probability value threshold are logically judged, which not only realizes the association judgment of the previous and next frames, but also combines the logic of image matching.
[0103] Specifically, the present application updates the probability value of each frame image in the target video belonging to each perspective based on the specific features between images, specifically including: determining whether the probability value of each frame image in the target video belonging to the current perspective is greater than a second judgment threshold; if it is greater than the second judgment threshold, retaining the probability value of the image belonging to the current perspective, otherwise, modifying the probability value of the image belonging to the current perspective to zero, so as to obtain an updated probability value of each frame image belonging to each perspective.
[0104] It should be noted that the current perspective in this application is the perspective currently being processed, for example: the perspective includes the right perspective, the right rear perspective 1, and the right rear perspective 2. If the probability value is to be updated based on the right perspective at this time, the right perspective will be used as the current perspective to perform subsequent operations. For example, after the first frame image of the target video is input into the single-frame image classification model, the result obtained is: the probability value of belonging to the right perspective is 80%, the probability value of belonging to the right rear perspective 1 is 10%, and the probability value of belonging to the right rear perspective 2 is 10%. The second judgment threshold is 70%. If the current perspective is the right perspective, it can be seen that the probability value of the first frame image belonging to the right perspective 80% is greater than the second judgment threshold 70%, and the probability value of the first frame image belonging to the right perspective is retained; if the current perspective is the right rear perspective 1 or the right rear perspective 2, since the probability of the first frame image belonging to the right rear perspective 1 or the right rear perspective 2 is 10% less than the second judgment threshold 70%, the probability value of the first frame image belonging to the right rear perspective 1 or the right rear perspective 2 is modified to zero, that is, the probability value of the first frame image after update is: the probability value of belonging to the right perspective is 80%, the probability value of belonging to the right rear perspective 1 is 0%, and the probability value of belonging to the right rear perspective 2 is 0%. In the above manner, the updated probability value of each frame image in the target video belonging to each perspective can be obtained.
[0105] Then, based on the common features between images, the probability values of each frame in the target video belonging to the same perspective are added to obtain a second total probability value of the target video belonging to each perspective; the second total probability value of each perspective is divided by the first predetermined number of frames to obtain the target probability value of the target video belonging to each perspective, and the target probability value of each perspective is compared with the probability value threshold of the corresponding perspective to obtain the perspective classification result.
[0106] In this embodiment, in order to clearly explain this solution, the target video is a 6A video as an example to specifically explain this solution. Figure 3 , which is a schematic diagram of the implementation process of the cab perspective classification method based on 6A video provided by an embodiment of the present invention. It can be seen that for the 6A video to be classified, the classification result can be obtained after inputting the classification model; and for videos with the same perspective, the model can capture their common features and eliminate the negative impact caused by specific features. Among them, the video perspective classification model based on deep learning is the core content of the classification process.
[0107] See also Figure 4, is a schematic diagram of the structure of a video perspective classification model provided by an embodiment of the present invention, the model includes three parts: a single-frame classification model based on deep learning, a threshold determination module and a front and back frame association analysis module; wherein, the single-frame image classification model based on deep learning is the basis, which is used to obtain the classification result of each frame image; the threshold determination module is generated through the classified video, the single-frame image classification model, and part of the logic of the front and back frame association analysis module to determine the probability value thresholds of different angles; when the front and back frame association analysis module associates the front and back frames to classify the video, it is necessary to perform logical judgment through the probability value threshold group obtained above.
[0108] Specifically, this plan includes the following parts:
[0109] 1. Preparation of 6A video dataset.
[0110] Get 6A videos of M viewing angles of the driver's cab (M can be set to ≥ 2, and in this embodiment, M is set to 3, which are right viewing angle, right rear viewing angle 1, and right rear viewing angle 2 respectively). After classifying the videos by viewing angle, the number of videos for each viewing angle is N. v (In this embodiment, N is set v =400). The number of videos in each type of perspective is divided into data set 1, data set 2 and data set 3 according to a certain ratio (in this embodiment, the ratio can be: 5:4:1). Among them, data set 1 is used to build a single-frame image classification model, data set 2 is used to build a video classification model, and data set 3 is used to verify the video classification model. In addition, after extracting frames from data set 1, representative pictures from each perspective are manually selected. The so-called representative pictures must cover the following types of features: imaging during the day (sunny days, not sunny days), imaging at night (with or without lights in the driver's cab), and different positions and different postures in the driver's cab when there is no driver or with a driver (only focusing on regular positions and postures). There must be no less than N pictures from each perspective. t1 (In this embodiment, N can be set t1 =2000), and the number of repeated images should be as small as possible (such as adjacent frames with little change), and then the training set and test set are divided into two sets in the ratio of 8:2.
[0111] 2. Build a single-frame classification model.
[0112] In this embodiment, the sample data in data set 1 can be trained using VGG-16 with the help of the caffe platform. 1500 pictures are taken from the training set samples at each perspective as training samples, and 400 pictures are taken from the test set samples for testing. During the training process, the loss function loss and the accuracy of each batch will be output, and the weight file will be automatically saved; when the training set data presents good results, such as when the classification accuracy reaches a predetermined threshold, the test sample is combined for test evaluation, and finally the appropriate weight file is selected to complete the model construction. It should be noted that the single-frame image classification model based on deep learning in this embodiment includes but is not limited to the VGG-16 model in this embodiment, and a DCNN (Deep Convolutional Neural Network) model and the like can also be used.
[0113] 3. Obtain a set of probability value thresholds corresponding to different viewing angles.
[0114] In each view class of dataset 2, take N t2 Videos (in this embodiment, N can be set t2 =150), one frame of training image is extracted from each video at the same time interval (30s in this embodiment), and the total number of frames obtained from a single video is N f (In this embodiment, N f =30), input each frame of training image into the above single-frame image classification model, and make the following judgment after obtaining the classification result.
[0115] Specifically, in order to eliminate the negative impact of the specific features of certain frames on the classification results to a certain extent, this embodiment needs to reassign the accuracy probability of these frames. Taking the jth frame of the ith video at the kth perspective as an example, if the current frame is accurately classified, the corresponding probability value is assigned to the accuracy probability P of the frame. j Otherwise P j =0, the formula is as follows:
[0116]
[0117] Furthermore, considering that different frames of the same video have obvious common features, the accurate probabilities of these frames are summed up into a probability parameter representing the current video. In this embodiment, the accurate probabilities of the extracted frames of the current video are directly summed to obtain a first total probability value S i , represents the first total probability value of the i-th training video in the current perspective;
[0118] Finally, determine a threshold parameter T that allows most videos at the current viewing angle to be accurately divided into the current viewing angle.k , T k Represents the probability value threshold of the k-th perspective;
[0119]
[0120] By using Formula 3, we can obtain the probability value threshold {T1,...,T k ,...,T M In this embodiment, since the consistency is relatively ideal, S can be directly taken. i The minimum value is used for calculation. Of course, it can also be selected by other methods and can be appropriately deformed according to actual conditions.
[0121] 4. The previous and next frame correlation analysis module is used to classify the video.
[0122] Based on the above embodiment, it can be known that the present application calculates the second total probability value S' of the extracted frame when the 6A video to be classified belongs to the kth viewing angle according to the above formula 1, formula 2 and related logic: k , and then calculate the target probability value T of the 6A video to be classified belonging to the kth perspective according to formula 4 k ':
[0123]
[0124] Finally, the target probability value T of the kth perspective is k ' and the probability value threshold T of the kth perspective k For comparison, if we can find a unique k value that satisfies T k '≥T k , the video’s viewing angle is classified as the kth viewing angle; otherwise, it is classified as an abnormality. k The process and the final classification logic are the previous and next frame association analysis module. In this embodiment, only simple logical judgment is made. In other embodiments, the T k ' and T k The logical relationship can be used to make more complex association judgments.
[0125] 5. Model verification.
[0126] 30 samples are selected from each perspective of dataset 3 to test the classification model. The test results are shown in Table 1.
[0127] Table 1
[0128]
[0129] As can be seen from Table 1, for normal 6A video data, good results can be achieved. For the system that uses 6A video for intelligent analysis, it basically meets the application requirements. Among them, several videos belonging to the abnormal category can increase T k ' and T k See Figure 5 , which is the core logic of the video perspective classification model provided by the embodiment of the present invention, includes: inputting each frame image of the 6A video that has been classified by perspective into the single-frame image classification module to provide common features, strengthening the common features and eliminating the heterogeneous features through the previous and next frame correlation analysis module, obtaining model parameters after model training, and performing perspective recognition on the image to be classified based on the model parameters in actual use.
[0130] From the above, it can be seen that the intelligent classification method of this perspective provided by this embodiment can realize the automatic classification of the cab perspective of 6A video, reduce the work of manual classification, and contribute to the maintenance and standardization of the cab 6A camera. This method based on deep learning is applied to the classification of the cab perspective of locomotive 6A video. Compared with the traditional classification algorithm, this method can improve the accuracy of classification. In addition, this embodiment performs correlation analysis on the front and back frames. Compared with the traditional classification method, it can not only extract the common features between different frames, but also obtain the specific features between different frames, which greatly reduces the impact of light differences, the presence or absence of drivers, and the different positions when there are drivers on the classification results.
[0131] The following is an introduction to a viewing angle classification device provided in an embodiment of the present invention. The viewing angle classification device described below and the viewing angle classification method described above can be referenced to each other.
[0132] See also Figure 6 , a schematic diagram of the structure of a video viewing angle classification device provided by an embodiment of the present invention; through Figure 6 It can be seen that the device includes:
[0133] The target video acquisition module 100 is used to acquire the target video;
[0134] The image extraction module 200 is used to extract a first predetermined number of frames of images from the target video at time intervals of a predetermined duration;
[0135] The probability value acquisition module 300 is used to input each frame of image into a pre-trained single-frame image classification model to obtain the probability value of each frame of image belonging to different viewing angles;
[0136] A calculation module 400 is used to calculate a target probability value of the target video belonging to each perspective based on the specific features and common features between images and using the probability value of each frame image in the target video belonging to different perspectives;
[0137] The classification module 500 is used to compare the target probability value of the target video belonging to each perspective with the probability value threshold of the corresponding perspective, and determine the perspective classification result of the target video according to the comparison result.
[0138] The device further comprises:
[0139] The threshold determination module is used to determine the probability value threshold corresponding to each viewing angle.
[0140] Wherein, the threshold determination module includes:
[0141] A training video determination unit, used to determine training videos; wherein each training video has an identified viewing angle;
[0142] An image extraction unit, configured to extract a second predetermined number of frames of training images from each training video at time intervals of a predetermined duration;
[0143] A probability value determination unit, used to obtain the probability value of each frame of training image belonging to a different perspective through the single-frame image classification model;
[0144] A first updating unit, used for updating the probability value of each frame of training image in each training video belonging to a corresponding viewing angle;
[0145] A first total probability value calculation unit is used to calculate a first total probability value of each training video corresponding to each viewing angle using the updated probability value; the first total probability value is the sum of the updated probability values of each frame of training image in the same training video belonging to the corresponding viewing angle;
[0146] A probability value threshold determination unit is used to determine a probability value threshold corresponding to each viewing angle according to the first total probability value and the second predetermined number of frames.
[0147] Wherein, the first updating unit comprises:
[0148] A first judging subunit is used to obtain a training probability value that each training image frame of the current training video belongs to the viewing angle of the current training video, and to judge whether the training probability value is greater than a first judgment threshold;
[0149] The first updating subunit is used to retain the probability value of the training image when the training probability value is greater than the first judgment threshold, otherwise, modify the probability value of the training image to zero to obtain an updated probability value that each frame of each training image in each training video belongs to the corresponding perspective.
[0150] Wherein, the probability value threshold determination unit includes:
[0151] a target total probability value determination subunit, configured to determine a target total probability value corresponding to each viewing angle from a first total probability value of at least one training video of each viewing angle;
[0152] The probability value threshold determination subunit is used to determine the probability value threshold corresponding to each viewing angle by using the target total probability value of each viewing angle and the second predetermined number of frames.
[0153] Among them, the target total probability value determination subunit is specifically used to: select the first total probability value with the smallest value from the first total probability value of at least one training video of each perspective as the target total probability value of each perspective; or calculate the average value of the first total probability values of all training videos corresponding to each perspective, and use the average value as the target total probability value of the corresponding perspective.
[0154] The target video acquisition module is specifically used to acquire the target video to be classified from the locomotive onboard safety protection system to classify the cab perspective in the target video.
[0155] The device further includes: an analysis module, which is used to analyze the target video through an intelligent analysis system corresponding to the view classification result.
[0156] The analysis module is specifically used to analyze the target video through a driver behavior analysis system corresponding to the view classification result.
[0157] Among them, the classification module is specifically used to: compare the target probability value of the target video belonging to each perspective with the corresponding probability value threshold of the same perspective. If the comparison result is: only one target perspective has a target probability value greater than or equal to the probability value threshold of the target perspective, then the perspective of the target video is determined to be the target perspective; otherwise, it is determined that the classification of the target video perspective has failed.
[0158] The calculation module includes:
[0159] A second updating unit, configured to update the probability value of each frame of the target video belonging to each perspective based on the specific features between the images;
[0160] A second total probability value calculation unit is used to calculate a second total probability value that the target video belongs to each viewing angle based on common features between images; the second total probability value is the sum of updated probability values of each frame image in the target video belonging to the same viewing angle;
[0161] A target probability value calculation unit is used to calculate the target probability value of the target video belonging to each perspective according to the second total probability value and the first predetermined number of frames.
[0162] Wherein, the second updating unit comprises:
[0163] A second judgment subunit is used to judge whether the probability value of each frame image in the target video belonging to the current viewing angle is greater than a second judgment threshold;
[0164] The second updating subunit is used to retain the probability value of the image belonging to the current perspective if it is greater than the second judgment threshold, otherwise, modify the probability value of the image belonging to the current perspective to zero, so as to obtain an updated probability value of each frame image belonging to each perspective.
[0165] See also Figure 7 , an embodiment of the present invention provides a schematic diagram of the structure of an electronic device, including:
[0166] A memory 11, used for storing computer programs;
[0167] The processor 12 is used to implement the steps of the viewpoint classification method described in any of the above method embodiments when executing the computer program.
[0168] In this embodiment, the device may be a PC (Personal Computer), or may be a terminal device such as a smart phone, a tablet computer, a PDA, or a portable computer.
[0169] The device may include a memory 11 , a processor 12 , and a bus 13 .
[0170] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the device, such as a hard disk of the device. In other embodiments, the memory 11 can also be an external storage device of the device, such as a plug-in hard disk equipped on the device, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 11 can also include both an internal storage unit of the device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the device, such as program code for executing the perspective classification method, but also can be used to temporarily store data that has been output or is to be output.
[0171] In some embodiments, the processor 12 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip, used to run program codes or process data stored in the memory 11, such as program codes for executing a perspective classification method.
[0172] The bus 13 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0173] Furthermore, the device may also include a network interface 14, which may optionally include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the device and other electronic devices.
[0174] Optionally, the device may further include a user interface 15, which may include a display (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 15 may also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the device and to display a visual user interface.
[0175] Figure 7 Only the device with components 11-15 is shown, and it can be understood by those skilled in the art that Figure 7 The structure shown does not constitute a limitation of the device, and may include fewer or more components than shown, or combine certain components, or arrange the components differently.
[0176] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the perspective classification method described in any of the above method embodiments are implemented.
[0177] The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0178] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0179] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A video viewing angle classification method, characterized in that: include: Get the target video; Extracting a first predetermined number of frames of images from the target video at time intervals of a predetermined duration; Input each frame of image into the pre-trained single-frame image classification model to obtain the probability value of each frame of image belonging to different perspectives; Based on the specific features and common features between images, the probability value of each frame image in the target video belonging to different perspectives is used to calculate the target probability value of the target video belonging to each perspective; Compare the target probability value of the target video belonging to each perspective with the probability value threshold of the corresponding perspective, and determine the perspective classification result of the target video according to the comparison result; Correspondingly, before obtaining the target video, the method further includes: Determine a probability value threshold corresponding to each perspective; Correspondingly, determining the probability value threshold corresponding to each viewing angle includes: determining training videos; wherein each training video has an identified viewing angle; Extracting a second predetermined number of frames of training images from each training video at time intervals of a predetermined duration, and obtaining a probability value of each frame of training image belonging to a different perspective through the single-frame image classification model; Update the probability value of each frame of training image in each training video belonging to the corresponding perspective; Using the updated probability values, calculating a first total probability value of each training video corresponding to each viewing angle; the first total probability value is the sum of the updated probability values of each frame of training image in the same training video belonging to the corresponding viewing angle; A probability value threshold corresponding to each viewing angle is determined according to the first total probability value and the second predetermined number of frames.
2. The method for viewing angle classification according to claim 1, characterized in that: The updating of the probability value of each frame of training image in each training video belonging to the corresponding viewing angle includes: Obtaining a training probability value that each training image frame of the current training video belongs to the viewing angle of the current training video, and determining whether the training probability value is greater than a first determination threshold; If it is greater than, the probability value of the training image is retained; otherwise, the probability value of the training image is modified to zero to obtain an updated probability value that each frame of each training image in each training video belongs to the corresponding perspective.
3. The method for viewing angle classification according to claim 1, characterized in that: The determining, according to the first total probability value and the second predetermined number of frames, a probability value threshold corresponding to each viewing angle comprises: Determining a target total probability value corresponding to each perspective from a first total probability value of at least one training video of each perspective; The probability value threshold corresponding to each viewing angle is determined by using the target total probability value of each viewing angle and the second predetermined number of frames.
4. The method for viewing angle classification according to claim 3, characterized in that: Determining a target total probability value corresponding to each perspective from the first total probability value of at least one training video of each perspective comprises: From the first total probability values of at least one training video of each perspective, a first total probability value with the smallest value is selected as a target total probability value of each perspective.
5. The method for viewing angle classification according to claim 3, characterized in that: Determining a target total probability value corresponding to each perspective from the first total probability value of at least one training video of each perspective comprises: An average of the first total probability values of all training videos corresponding to each viewing angle is calculated, and the average value is used as the target total probability value of the corresponding viewing angle.
6. The method for viewing angle classification according to claim 1, characterized in that: The step of obtaining the target video comprises: A target video to be classified is obtained from a locomotive onboard safety protection system to classify the cab perspective in the target video.
7. The method for viewing angle classification according to claim 6, characterized in that: After determining the view classification result of the target video according to the comparison result, the method further includes: The target video is analyzed by an intelligent analysis system corresponding to the view classification result.
8. The method for viewing angle classification according to claim 7, characterized in that: The analyzing the target video by the intelligent analysis system corresponding to the view classification result includes: The target video is analyzed by a driver behavior analysis system corresponding to the view classification result.
9. The method for viewing angle classification according to claim 1, characterized in that: The step of comparing the target probability value of the target video belonging to each perspective with the probability value threshold of the corresponding perspective, and determining the perspective classification result of the target video according to the comparison result, comprises: The target probability value of the target video belonging to each perspective is compared with the corresponding probability value threshold of the same perspective. If the comparison result is: only one target perspective has a target probability value greater than or equal to the probability value threshold of the target perspective, then the perspective of the target video is determined to be the target perspective; otherwise, it is determined that the classification of the target video perspective has failed.
10. The viewpoint classification method according to any one of claims 1 to 9, characterized in that: The method of calculating the target probability value of the target video belonging to each perspective by using the probability value of each frame image in the target video belonging to different perspectives based on the specific features and common features between the images includes: Based on the specific features between the images, the probability value of each frame of the target video belonging to each perspective is updated; Based on the common features between the images, a second total probability value of the target video belonging to each viewing angle is calculated; the second total probability value is the sum of updated probability values of each frame image in the target video belonging to the same viewing angle; The target probability value of the target video belonging to each perspective is calculated according to the second total probability value and the first predetermined number of frames.
11. The method for viewing angle classification according to claim 10, characterized in that: The updating of the probability value of each frame image in the target video belonging to each viewing angle includes: Determine whether the probability value of each frame image in the target video belonging to the current viewing angle is greater than a second determination threshold; If it is greater than the second determination threshold, the probability value of the image belonging to the current viewing angle is retained; otherwise, the probability value of the image belonging to the current viewing angle is modified to zero to obtain an updated probability value of each frame image belonging to each viewing angle.
12. A video viewing angle classification device, characterized in that: include: A target video acquisition module is used to acquire a target video; An image extraction module, used to extract a first predetermined number of frames of images from the target video at time intervals of a predetermined duration; A probability value acquisition module is used to input each frame of image into a pre-trained single-frame image classification model to obtain the probability value of each frame of image belonging to different perspectives; A calculation module, for calculating a target probability value of the target video belonging to each perspective based on the specific features and common features between images and using the probability value of each frame image in the target video belonging to different perspectives; A classification module, used to compare the target probability value of the target video belonging to each perspective with the probability value threshold of the corresponding perspective, and determine the perspective classification result of the target video according to the comparison result; Correspondingly, before obtaining the target video, the method further includes: Determine a probability value threshold corresponding to each perspective; Correspondingly, determining the probability value threshold corresponding to each viewing angle includes: determining training videos; wherein each training video has an identified viewing angle; Extracting a second predetermined number of frames of training images from each training video at time intervals of a predetermined duration, and obtaining a probability value of each frame of training image belonging to a different perspective through the single-frame image classification model; Update the probability value of each frame of training image in each training video belonging to the corresponding perspective; Using the updated probability values, calculating a first total probability value of each training video corresponding to each viewing angle; the first total probability value is the sum of the updated probability values of each frame of training image in the same training video belonging to the corresponding viewing angle; A probability value threshold corresponding to each viewing angle is determined according to the first total probability value and the second predetermined number of frames.
13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the perspective classification method as described in any one of claims 1 to 11 when executing the computer program.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the perspective classification method according to any one of claims 1 to 11 are implemented.
