Loading rate identification method, device, computer equipment and storage medium
Through the loading rate recognition method in the logistics field, two neural networks are used to extract the characteristics of the car body and the image sequence inside the car and fuse them for recognition. This solves the problem of low loading rate recognition accuracy in the existing technology and achieves a more efficient Logistics resource utilization and cost reduction.
Patent Information
- Application Number
- CN201910827892.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-03
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2039-09-03
AI Technical Summary
In the loading rate recognition in the logistics field, the existing technology relies on measuring equipment or manual measurement, which has the problems of high cost and slow speed, and neural networks usually use a single image for recognition, resulting in low recognition accuracy.
Two neural networks are used to extract features from the car body image sequence and the car interior image sequence respectively. The timing features and loading rate classification features are extracted through the middle layer, and then fused and input into the third neural network to improve the recognition accuracy of the loading rate.
By using image sequences as input, more image information is obtained, which enhances the feature expression ability of the neural network, improves the recognition accuracy of the loading rate, and reduces labor costs and measurement speed.
Smart Images

Figure CN112446403B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a loading rate identification method, device, computer equipment and storage medium. Background Art
[0002] In the field of logistics, loading rate generally refers to the actual volume of cargo carried divided by the maximum cargo volume of the carriage. Loading rate can be divided into instantaneous loading rate and process loading rate. The instantaneous loading rate refers to the loading rate value of the carriage given when the carriage arrives at or leaves the port, and the process loading rate refers to the real-time loading rate of the carriage during the cargo loading and unloading process. Loading rate is a method of evaluating operational efficiency and can be used to reflect the working conditions of logistics transfer stations. Therefore, vehicles can be reasonably dispatched according to the loading rate to make full use of vehicle resources, reduce logistics costs and improve operating efficiency.
[0003] The loading rate is traditionally measured by measuring equipment or manually. The use of measuring equipment not only requires the construction of a dedicated measuring platform, but also has certain requirements for the site. Moreover, whether it relies on measuring equipment or manual measurement, it requires a large manpower cost, which is not only costly but also slow. However, with the development of artificial intelligence, and in order to save labor costs and increase the speed of measurement, the use of neural networks to identify loading rates has become a new method. However, existing neural networks usually extract information from a single image to identify the loading rate, resulting in low recognition accuracy. Summary of the invention
[0004] Based on this, it is necessary to provide a loading rate identification method, device, computer equipment and storage medium that can improve the identification accuracy in response to the above technical problems.
[0005] A method for identifying a loading rate, the method comprising:
[0006] Acquire a compartment image sequence of a cargo compartment and a compartment interior image sequence corresponding to the compartment image sequence;
[0007] Inputting the box image sequence into a trained first neural network, and extracting the temporal features of the box image sequence through an intermediate layer of the first neural network;
[0008] Inputting the in-cabin image sequence into a trained second neural network, and extracting the loading rate classification features of the in-cabin image sequence through the middle layer of the second neural network; wherein the middle layer of the first neural network has the same size as the middle layer of the second neural network;
[0009] Fusion of the time series feature and the loading rate classification feature to obtain a fusion feature;
[0010] The fusion features are input into a trained third neural network to obtain a loading rate classification result of the cabin image sequence.
[0011] A loading rate identification device, the device comprising:
[0012] An acquisition module, used for acquiring a compartment image sequence of a cargo compartment and a compartment interior image sequence corresponding to the compartment image sequence;
[0013] An extraction module, used for inputting the cabin image sequence into a trained first neural network, and extracting the temporal features of the cabin image sequence through an intermediate layer of the first neural network;
[0014] The extraction module is also used to input the cabin image sequence into a trained second neural network, and extract the loading rate classification features of the cabin image sequence through the middle layer of the second neural network; wherein the middle layer of the first neural network has the same size as the middle layer of the second neural network;
[0015] A fusion module, used for fusing the time series feature and the loading rate classification feature to obtain a fusion feature;
[0016] The recognition module is used to input the fusion features into the trained third neural network to obtain the loading rate classification result of the cabin image sequence.
[0017] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above-mentioned loading rate identification methods when executing the computer program.
[0018] A computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements any one of the steps of the loading rate identification method.
[0019] The above-mentioned loading rate recognition method, device, computer equipment and storage medium respectively extract features of the compartment image sequence and the compartment image sequence through two neural networks to obtain the temporal features of the compartment image sequence and the loading rate classification features of the compartment image sequence, and then fuse the temporal features and the loading rate classification features and input them into the neural network to obtain the loading rate classification results. The loading rate classification features are global features of each image in the compartment image sequence, and the temporal features are the temporal relationships between each image in the compartment image sequence, which can reflect the contextual information between each image. This method uses an image sequence as input, and can obtain more image information than the traditional method of using a single image as the network input. In addition, since the fused features have features of multiple dimensions, the expressive power of the features input into the neural network is enhanced, and the recognition accuracy of the loading rate can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A diagram showing an application environment of a method for identifying a loading rate in an embodiment;
[0021] Figure 2 A schematic diagram of a flow chart of a method for identifying a loading rate in an embodiment;
[0022] Figure 3 is a schematic diagram of a compartment image sequence in one embodiment;
[0023] Figure 4 is a schematic diagram of an image sequence in a compartment in one embodiment;
[0024] Figure 5 A schematic flow chart of the steps of removing images that do not include a cargo compartment or whose overlap does not meet the requirement in an image sequence to obtain a new image sequence in one embodiment;
[0025] Figure 6 A schematic diagram of the structure of a neural network in one embodiment;
[0026] Figure 7 is a structural block diagram of a loading rate identification device in one embodiment;
[0027] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0029] The loading rate identification method provided in this application can be applied to Figure 1In the application environment shown. The application environment involves a terminal 102, a server 104 and a camera 106, wherein the terminal 102 communicates with the server 104 through a network, and the terminal 102, the server 104 and the camera 106 communicate with each other through a network. Among them, the camera 106 refers to a device with a camera function, which can be used by a staff member to hold a camera to shoot the cargo compartment with the door opened, or it can be set at a fixed location, such as a parking point of the cargo compartment, to collect the image sequence of the cargo compartment with the door opened at a fixed time. After the camera 106 collects the image sequence of the cargo compartment when the door is open, the camera 106 sends the image sequence to the terminal 102, and the terminal 102 can obtain the compartment image sequence of the cargo compartment and the compartment image sequence corresponding to the compartment image sequence from the image sequence, and then the terminal 102 implements the loading rate recognition method separately according to the obtained compartment image sequence and the corresponding compartment image sequence. The terminal 102 can also send the image sequence received from the camera 106 to the server 104. Alternatively, the camera device 106 directly sends the image sequence of the cargo compartment when the compartment door is open to the server 104, and the loading rate recognition method is implemented by the server 104. Specifically, the server 104 obtains the compartment image sequence of the cargo compartment from the image sequence, and the compartment image sequence corresponding to the compartment image sequence. The server 104 inputs the compartment image sequence into the trained first neural network, and extracts the time series features of the compartment image sequence through the middle layer of the first neural network; the server 104 inputs the compartment image sequence into the trained second neural network, and extracts the loading rate classification features of the compartment image sequence through the middle layer of the second neural network; wherein the middle layer of the first neural network is the same size as the middle layer of the second neural network; the server 104 fuses the time series features and the loading rate classification features to obtain the fused features; the server 104 inputs the fused features into the trained third neural network to obtain the loading rate classification results of the compartment image sequence. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers. The camera device 106 refers to a device with a camera function, which may be, but is not limited to, a camera, a camcorder, and a smart phone.
[0030] In one embodiment, Figure 2 As shown, a loading rate identification method is provided, which is applied to Figure 1 The server in the example is used to illustrate the following steps:
[0031] Step S202: acquiring a compartment image sequence of the cargo compartment and a compartment interior image sequence corresponding to the compartment image sequence.
[0032] Among them, the cargo compartment refers to an item with a certain volume that can be used to load items. For example, a compartment or container used to carry cargo. An image sequence refers to a series of images of the target object acquired in sequence and continuously at different times and different orientations. The compartment image sequence is a collection of multiple continuous compartment images, and the compartment image refers to an image that includes the cargo compartment. The interior image sequence refers to a collection of multiple continuous interior images, and the interior image refers to an image of the interior space of the cargo compartment. The interior image should reflect the complete volume of the cargo compartment. Moreover, the compartment image should reflect the complete volume of the cargo compartment like the interior image. It’s just that the objects in the interior image do not include other objects except the complete volume of the cargo compartment. The compartment image includes other objects besides the complete volume of the cargo compartment. It can be understood that the interior image is an image cropped from the compartment image. Figure 3-4 As shown, reference Figure 3 , provides a schematic diagram of a compartment image sequence. Figure 4 , a schematic diagram of an intra-compartment image sequence is provided. Figure 3 and Figure 4 The image sequences shown are all images taken when the door of the cargo compartment is facing the cargo compartment and the door is open, which can reflect the complete volume of the cargo compartment. Figure 3 The compartment images in the compartment image sequence shown include not only the cargo compartment but also the scenes around the cargo compartment. Figure 4 The interior images in the sequence of interior images shown do not include any other objects except the cargo compartment.
[0033] Specifically, after obtaining the compartment image sequence of the cargo compartment and the compartment image sequence corresponding to the compartment image sequence, the compartment image sequence and the compartment image sequence are identified by using the trained neural network to obtain the loading rate classification result of the compartment image. The loading rate classification result of the compartment image is the current loading rate of the corresponding cargo compartment. For example, in practical applications, a camera device with a camera function is installed at a position where the cargo compartment can be photographed, such as at a position installed at a stop point of the cargo compartment. Assuming that the cargo compartment is a vehicle carrying goods, after the camera device is installed, the corresponding images are continuously collected during the vehicle's arrival or departure process to obtain an image sequence. Taking the arrival at the port as an example, the vehicle is continuously imaged from the beginning of the vehicle's arrival at the port to the completion of the arrival at the port. It can be understood that the camera device is controlled to continuously collect images from the beginning of the vehicle's reversing to the end of the vehicle's stopping at the checkpoint. It should be understood that when the camera device is controlled to capture images, the door of the cargo compartment should be in an open state. Then, the camera transmits the captured cabin image sequence to the terminal, and the terminal sends the cabin image sequence captured by the camera to the server, and the server cuts the cabin image sequence to obtain the corresponding cabin interior image sequence. Then, the loading rate is identified based on the cabin image sequence and the cabin interior image sequence. If the camera is a terminal device with a camera function, the camera can directly send the captured cabin image sequence to the server.
[0034] Step S204: input the car body image sequence into the trained first neural network, and extract the temporal features of the car body image sequence through the middle layer of the first neural network.
[0035] Neural network is one of the main branches of intelligent control technology, also known as artificial neural network (ANNs) or connection model. It is an algorithmic mathematical model that imitates the behavioral characteristics of animal neural networks and performs distributed parallel information processing. Neural network relies on the complexity of the system to adjust the interconnected relationship between a large number of internal nodes to achieve the purpose of processing information. The middle layer refers to the convolution layer of any layer in the first neural network. The temporal feature is the image feature that can characterize the relationship between images extracted by the first neural network from each image in the compartment image sequence. It can be understood that the contextual relationship between images can be known through the temporal features between each image in the compartment image sequence, and the images can be classified by combining the contextual relationship between images to improve the classification accuracy.
[0036] The first neural network is a video understanding network that is pre-trained through image sequences and is used to classify video images. It can be understood as an action classification network that analyzes and recognizes video clips, i.e., continuous images. The first neural network includes but is not limited to ECO-lite network (Efficient convolutional Network Foronline video understanding), SlowFast network, etc.
[0037] Specifically, after the server obtains the compartment image sequence of the cargo compartment, the trained first neural network is called. The compartment image sequence is input into the first neural network, and the time sequence information between each compartment image in the compartment image sequence is extracted through the convolution layer of the first neural network to obtain the corresponding time sequence features. For example, taking the ECO-lite network as an example, the network structure of the ECO-lite network mainly includes a 2D convolution network and a 3D convolution network, wherein the 2D convolution network and the 3D convolution network include multiple layers of convolution layers. The 2D features of the input image are mainly obtained through the 2D convolution network, and the 2D features are stacked according to time and sent to the 3D convolution network to obtain the final classification result. That is, after the server obtains the compartment image sequence of the cargo compartment, the compartment image sequence is input into the ECO-lite network, and the features extracted by any convolution layer in the ECO-lite network are obtained, which are the time sequence features. It can be understood that the obtained time sequence features can be the features output by any convolution layer in the 2D convolution network or the 3D convolution network.
[0038] Step S206, input the in-cabin image sequence into the trained second neural network, and extract the loading rate classification features of the in-cabin image sequence through the middle layer of the second neural network; wherein the middle layer of the first neural network has the same size as the middle layer of the second neural network.
[0039] Among them, the second neural network is a classification model that is pre-trained with images and used for image classification. Image classification refers to an image processing method that distinguishes different categories of targets according to the different features reflected in the image information. It uses a computer to perform quantitative analysis on the image and classify the image or each image element or area in the image into one of several categories. In this embodiment, classification refers to classifying the images in the compartment according to the category of loading rate. Since the second neural network directly obtains the loading rate classification result by inputting the image sequence in the compartment, the loading rate classification feature extracted by the second neural network is a feature extracted from the global image, which can characterize the global features of each image in the image sequence in the compartment. The second neural network includes but is not limited to the classification model obtained by training the general classification network structure such as the Inception series network, VGG (Visual Geometry Group Network), Resnet (Residual Network). The middle layer refers to the convolution layer of any layer in the second neural network, but in order to facilitate the subsequent feature fusion, the convolution layer needs to be the same size as the convolution layer of the first neural network. It can be understood that the size of the middle layer of the first neural network and the middle layer of the second neural network should be the same, that is, the size of the time series features and loading rate classification features extracted by the two should be the same.
[0040] Specifically, after obtaining the compartment image sequence corresponding to the compartment image of the cargo compartment, the second neural network is called to input the compartment image sequence into the second neural network. The compartment images in the compartment image sequence are subjected to feature extraction through each convolution layer in the second neural network. Each convolution layer in the second neural network will output corresponding features. In this embodiment, only the features output by the convolution layer of the same size as the intermediate layer of the first neural network need to be obtained, which is the loading rate classification feature.
[0041] Step S208, fusing the time series feature and the load rate classification feature to obtain a fused feature.
[0042] Among them, fusion features refer to features obtained by fusing two or more different features. By fusing different features, features with more detailed information can be obtained. That is, the temporal features extracted by the first neural network that can characterize the temporal relationship of the image and the loading rate classification features extracted by the second neural network that can characterize the global features are fused, thereby fusing the temporal features with the global features to obtain features of multiple dimensions, thereby reflecting the detailed information of the features in multiple aspects and improving the expressiveness of the features.
[0043] Specifically, after the first neural network extracts the time series features of the cabin image sequence and the second neural network extracts the loading rate classification features of the cabin image sequence, the time series features and the loading rate classification features are fused to obtain corresponding fusion features.
[0044] In one embodiment, the fusion of features includes feature merging and feature addition. Since the features are in matrix form in the computer, feature addition is to add the corresponding elements in each matrix, and the new matrix obtained is the fusion feature. Feature merging is to merge the matrices in any dimension. For example, two 2*2 matrices can be merged into a 2*4 matrix or a 4*2 matrix, and the matrix obtained after merging is the fusion feature. Specifically, the fusion feature obtained by fusing the timing feature and the loading rate classification feature includes: adding the timing feature and the loading rate classification feature to obtain the fusion feature. Alternatively, the vehicle timing feature and the loading rate classification feature are feature merged to obtain the fusion feature corresponding to the image in the compartment.
[0045] Step S210, inputting the fusion features into the trained third neural network to obtain the loading rate classification result of the cabin image sequence.
[0046] Among them, the third neural network is a classification model pre-trained for load rate classification. The third neural network is different from the traditional neural network trained by images. The third neural network is a neural network pre-trained by fusion features and by fusion feature sequences. Compared with the traditional neural network trained by images, the third neural network can enhance the expression ability of features, thereby improving the accuracy of classification. The third neural network includes but is not limited to the classification model obtained by training general classification network structures such as Inception series networks, VGG (Visual Geometry Group Network), and Resnet (Residual Network).
[0047] Specifically, after obtaining the time series features and the loading rate classification features, the time series features and the loading rate classification features are added or merged to obtain fused features. The third neural network is called, and the fused features are input into the third neural network. The fused features are further convolved and other operations are performed by the third neural network to obtain the classification results of the loading rate. In this embodiment, the loading rate is divided into 11 categories during neural network training. Therefore, the loading rate results identified by the third neural network also include 11 categories, namely [0, 0-10, 10-20, 20-30, 30-40, 40-50, 50-60, 60-70, 70-80, 80-90, 90-100]. It should be understood that the classification of the loading rate in this implementation is obtained by artificial division according to the actual loading rate application scenario during network training, that is, it can be understood that the classification of the loading rate can be set according to the actual situation.
[0048] The above-mentioned loading rate recognition method, device, computer equipment and storage medium respectively extract features of the compartment image sequence and the compartment image sequence through two neural networks to obtain the temporal features of the compartment image sequence and the loading rate classification features of the compartment image sequence, and then fuse the temporal features and the loading rate classification features and input them into the neural network to obtain the loading rate classification results. The loading rate classification features are the global features of each image in the compartment image sequence, and the temporal features are the temporal relationships of each image in the compartment image sequence, which can reflect the contextual information between each image. This method uses the image sequence as input, and can obtain more image information than the traditional method of using a single image as the network input. In addition, since the fused features have features of multiple dimensions, the expression ability of the features input into the neural network is enhanced, which can improve the recognition accuracy of the loading rate.
[0049] In one embodiment, the first neural network training process includes: obtaining a sample set of cargo compartments, the sample set including compartment image sequence samples and loading rate classification results of labeled compartment image sequence samples; inputting the compartment image sequence samples into the first neural network, extracting feature maps of each image in the compartment image sequence samples through the 2D convolutional network of the first neural network, fusing the feature maps through the 3D convolutional network of the first neural network, and outputting loading rate classification results of the compartment image sequence samples; adjusting the parameters of the first neural network according to the output loading rate classification results of the compartment image sequence samples and the loading rate classification results of the labeled compartment image sequence samples; and stopping iteration when the end condition of training is reached to obtain a trained first neural network.
[0050] Among them, the sample set is a set of images required for training the neural network, including car body image sequence samples, and loading rate classification results of labeled car body image sequence samples. The car body image sequence samples are the car body images used to train the first neural network. The loading rate classification results of the labeled car body image sequence samples refer to the labeling of the loading rate of each car body image sample in the car body image sequence samples. The labeled loading rate is calculated based on the car body volume in the car body image samples and the cargo volume in the car body. There are 11 categories of loading rate.
[0051] Specifically, the original image sequence samples collected by the camera device are received. In order to prevent interference caused by images with too low resolution, the resolution of the original images in the image sequence samples should not be less than 1920*1080, and the size should be at least 2 million pixels. By detecting the original image, it is determined whether the original image is an image of the cargo compartment, and the overlap between adjacent original images is calculated to remove redundant original images. The remaining original images are comprehensively screened, and a certain number of original images are selected to form the compartment image sequence samples. In this embodiment, the 6 original images with the highest scores are preferably used to form the compartment image sequence samples, and the image score is the product of the overlap and confidence corresponding to the image. In addition, the images are sorted according to the image acquisition time to obtain the sorted compartment image sequence samples, thereby ensuring that each image in the compartment image sequence samples is in a continuous order. Then, since the input image of the neural network generally has a fixed size, in order to keep consistent with the image size accepted by the neural network, the image that does not meet the size should be scaled, and the image obtained after scaling is the compartment image sequence sample that can finally be input into the neural network. For example, taking the ECO-lite network as an example, each image in the compartment image sequence sample is preferentially scaled to 256*256 pixels. After the compartment image sequence samples are obtained, the actual loading rate of each image in the compartment image sequence samples can be used as the loading rate classification result annotated for each image to obtain the loading rate classification result of the compartment image sequence samples. That is, after the compartment image sequence samples are obtained, all the compartment image samples are obtained from the compartment image sequence samples. The compartment volume and the cargo volume in each compartment image sample are determined. The cargo volume in the compartment can be understood as the volume occupied by the cargo in the compartment. The ratio of the compartment volume to the cargo volume in the compartment is calculated, and the ratio obtained is the loading rate classification result of the corresponding compartment image sample. The category of the obtained loading rate classification result is determined according to the preset 11 categories, and the category is the loading rate classification result to be annotated. Among them, the loading rate classification results include 11 categories, namely [0, 0-10, 10-20, 20-30, 30-40, 40-50, 50-60, 60-70, 70-80, 80-90, 90-100]. For example, when the calculated loading rate classification result of the compartment image sample is 55%, the corresponding category is 50-60, that is, the loading rate classification result of the compartment image sample to be annotated is 50-60. Finally, the first neural network is trained using the acquired compartment image sequence samples and the annotated loading rate classification results. The compartment image sequence samples and the annotated loading rate classification results are divided into training set A and test set A. The compartment image sequence samples and the annotated loading rate classification results in the training set A are used to train the first neural network, and the compartment image sequence samples and the annotated loading rate classification results in the test set A are used to evaluate the model of the first neural network after the training of the first neural network is completed to determine the performance of the first neural network after training.Among them, scaling can be performed through image interpolation methods, such as nearest neighbor interpolation, bilinear interpolation, etc.
[0052] Taking the first neural network as the ECO-lite network as an example, the training process of the first neural network is explained. First, the parameters of the ECO-lite network, that is, the weights, are randomly initialized, and the learning rate, loss function, etc. used for the training of the first neural network are set. Then, the compartment image sequence samples in the training set A are obtained, and the compartment image sequence samples in the training set A are input into the initialized ECO-lite network. The 2D convolution part of the ECO-lite network performs convolution operations on each image in the compartment image sequence samples to extract the feature map of each image in the compartment image sequence samples. When the 2D convolution part completes the feature extraction, the feature map extracted by the 2D convolution part is input into the 3D convolution part of the ECO-lite network to perform convolution operations on the feature map, and the loading rate classification result of the compartment image sequence sample is output. After the output loading rate classification result is obtained, the output loading rate classification result is compared with the labeled loading rate classification result corresponding to the compartment image sequence sample in the training set A, and the parameters of the ECO-lite network are adjusted according to the comparison results. That is, by comparing the output loading rate classification result with the labeled loading rate classification result, the error between the predicted value and the actual value of the first neural network is determined, and the parameters of the first neural network are adjusted according to the error. The error between the predicted value and the actual value can be calculated by the set loss function. When the difference between the predicted value and the actual value is greater, the value calculated by the loss function will also be greater. After adjusting the parameters according to the error, the car body image sequence samples can be input into the first neural network for training again, that is, the first neural network is trained again. This process can be called iteration. When the end condition of training is reached, the iteration can be stopped to obtain the trained first neural network. Reaching the end condition of training can be understood as that there is no error between the output loading rate classification result and the labeled loading rate classification result, or according to the actual situation, the existing error is within an acceptable range. From the perspective of the loss function, that is, the loss value calculated by the loss function is stable and no longer decreases, that is, the loss function is in a converged state, it means that the end condition of training has been reached. It can be seen that the car body image sample sequence in the sample set is used as the input of the first neural network during training, and the loading rate classification result of the labeled car body image sample is used as the target of the first neural network training. In addition, it should be understood that after the first neural network is trained by the training set A, the trained first neural network is evaluated by using the test set A to determine the performance of the trained first neural network. That is, the output loading rate classification result is obtained by inputting the compartment image sequence samples in the training set A into the first neural network, and the output loading rate classification result is compared with the corresponding labeled loading rate classification result in the training set A to determine the performance of the first neural network after training.
[0053] In this embodiment, the first neural network is guided by training to extract the temporal relationship between images, so that the first neural network can obtain the temporal information between images, thereby improving the feature expression capability.
[0054] In one embodiment, the sample set also includes cabin image sequence samples corresponding to the cabin body image sequence samples, and the loading rate classification results of the labeled cabin image sequence samples. The second neural network training process includes: inputting the cabin image sequence samples into the second neural network, and outputting the loading rate classification results of the cabin image sequence samples; adjusting the parameters of the second neural network according to the output loading rate classification results of the cabin image sequence samples and the loading rate classification results of the labeled cabin image sequence samples; when the end condition of the training is reached, stopping the iteration to obtain the trained second neural network.
[0055] Among them, the in-cabin image sequence samples are in-cabin image sequences used to train the second neural network, and can be cropped from the body image sequence samples. In other words, the body image sequence sample sequence corresponds one-to-one to the in-cabin image sequence samples. For example, if the body image sequence sample sequence is taken as sample A, and the in-cabin image sequence sample is taken as sample B, it can be understood that the images in sample A and sample B correspond one-to-one, and are used to train the first neural network and the second neural network, respectively. After the in-cabin image sequence samples are obtained, the corresponding loading rate can be annotated for each image according to the loading rate of each image in the in-cabin image sequence samples, and the loading rate classification results of the in-cabin image sequence samples can be obtained. The calculation method of the loading rate classification results to be annotated for each image in the in-cabin image sequence samples is the same as that of the body image sequence samples, and will not be repeated here. Similarly, the in-cabin image sequence samples and the annotated loading rate classification results are divided into training set B and test set B. The cabin image sequence samples and the labeled loading rate classification results in the training set B are used to train the second neural network, and the cabin image sequence samples and the labeled loading rate classification results in the test set B are used to evaluate the model of the second neural network after the training of the second neural network is completed, so as to determine the performance of the first neural network. It can be obtained that the training set A and the training set B are used to train the first neural network and the second neural network respectively, and the test set A and the test set B are used to evaluate the performance of the first neural network and the second neural network after training respectively. That is, the cabin image sequence samples are the training input of the second neural network, and the loading rate classification results of the labeled cabin image sequence samples are the training targets of the second neural network. It should be understood that in this embodiment, the cabin image sequence samples are not limited to being cropped from the cabin image sequence samples, but can also be cropped from other image sequences including the cabin.
[0056] Specifically, the parameters of the second neural network, i.e., the weights, are randomly initialized, and the learning rate, loss function, etc. used for the training of the second neural network are set. Then, the cabin image sequence samples in the training set B are obtained, and the cabin image sequence samples are input into the initialized second neural network. The cabin image sequence samples are subjected to convolution operations and other operations through the second neural network, and the loading rate classification results of the cabin image sequence samples are output. The output loading rate classification results are compared with the loading rate classification results of the cabin image sequence samples marked in the training set B, and the parameters of the second neural network are adjusted according to the comparison results. That is, the error between the predicted value and the actual value of the second neural network is determined by comparing the output loading rate classification results with the marked loading rate classification results, and the parameters of the second neural network are adjusted according to the error. The error can also be calculated by the loss function set by the second neural network. After the parameters of the second neural network are adjusted according to the error, the cabin image sequence samples can be input into the network again for training, that is, the second neural network is iterated until the end condition of the training is reached, and the training is stopped to obtain a trained second neural network. That is to say, until there is no error or an acceptable error between the output loading rate classification result and the labeled loading rate classification result, that is, the loss function of the second neural network is in a convergence state. Similarly, after the second neural network is trained with the training set B, the trained first neural network is evaluated with the test set B to determine the performance of the trained second neural network.
[0057] In one embodiment, the third neural network training process includes: inputting the body image sequence samples into the trained first neural network, and extracting the time series features of the body image sequence samples through the intermediate layer of the trained first neural network; inputting the interior image sequence samples into the trained second neural network, and extracting the loading rate classification features of the interior image sequence samples through the intermediate layer of the trained second neural network; fusing the time series features of the body image sequence samples with the loading rate classification features of the interior image sequence samples to obtain the fused features; inputting the fused features into the third neural network, and outputting the loading rate classification results of the interior image sequence samples; adjusting the parameters of the third neural network according to the output loading rate classification results of the interior image sequence samples and the labeled loading rate classification results; when the end condition of training is reached, stopping the iteration to obtain the trained third neural network.
[0058] The difference between the third neural network and the first neural network and the second neural network is that the input used for the training of the third neural network is not an image, but a feature. And it is a fusion feature of the time series feature obtained by the trained first neural network after extracting features from the cabin image sequence samples and the loading rate classification feature obtained by the second neural network after extracting features from the cabin image sequence samples.
[0059] Specifically, after the training of the first neural network and the second neural network is completed, the parameters of the convolutional layers of the first neural network and the second neural network are fixed. Then, the convolutional layer of the first neural network with fixed parameters is input into the sample of the cabin image sequence for feature extraction, and the time series features corresponding to the sample of the cabin image sequence are obtained. And the convolutional layer of the second neural network with fixed parameters is input into the sample of the cabin image sequence for feature extraction, and the loading rate classification features corresponding to the sample of the cabin image sequence are obtained. Among them, the time series features and the loading rate classification features are of the same size. The time series features and the loading rate classification features are fused to obtain the fusion features. The parameters of the third neural network, that is, the weights, are randomly initialized, and the learning rate, loss function, etc. used for the training of the third neural network are set. The fusion features are input into the initialized third neural network, and the third neural network is trained using the fusion features. The parameters of the third neural network are adjusted according to the loading rate classification results output by the training of the third neural network and the labeled loading rate classification results. After the parameters of the third neural network are adjusted according to the error, the fusion features can be input into the third neural network again for training, that is, the third neural network is iterated until the end condition of the training is reached, and the training is stopped to obtain the trained third neural network.
[0060] In this embodiment, by fusing the features extracted by the first neural network and the second neural network, that is, combining the global image information and the time series information to train the third neural network, the expression ability of the features is enhanced, thereby improving the recognition accuracy of the third neural network.
[0061] In one embodiment, a compartment image sequence of a cargo compartment and a compartment interior image sequence corresponding to the compartment image sequence are obtained, specifically including: receiving an image sequence taken of the cargo compartment with its door open, removing images that do not include the cargo compartment or whose overlap does not meet requirements in the image sequence, and obtaining a new image sequence; scaling each image in the new image sequence to a first preset size, and obtaining a compartment image sequence; identifying each image in the new image sequence, and determining a door of the cargo compartment in each image; cropping the compartment interior image region of the cargo compartment according to the door of the cargo compartment, and obtaining a compartment interior image region sequence; scaling each compartment interior image region in the compartment interior image region sequence to a second preset size, and obtaining a compartment interior image sequence.
[0062] Among them, the new image sequence is an image sequence after removing images that do not include the cargo compartment and images with high overlap. Specifically, after receiving the image sequence, the pre-trained detection network detects the cargo compartment of each image in the image sequence and removes the images that do not include the cargo compartment. In addition, by calculating the overlap of each image, the redundant images in the image sequence are removed according to the overlap, and finally a new image sequence is obtained. The first preset size is the image size set according to the first neural network, which can be understood as the size of the input image accepted by the first neural network. For example, if the first neural network is an ECO-lite network, the first preset size is preferentially set to 256*256. The second preset size is the image size set according to the second neural network. In this embodiment, the preset second size is preferably 224*224. The in-cabin image area sequence refers to a set of continuous in-cabin image area maps, and the in-cabin image sequence is a set of continuous in-cabin images.
[0063] Specifically, after obtaining the new image sequence, the size of the image that does not meet the first preset size in the new image sequence is scaled to the first preset size. That is, the image larger than the first preset size is reduced to the first preset size, and the image smaller than the first preset size is enlarged to the first preset size. Since the coordinate value of the door of the cargo compartment in each image can be obtained when the detection network obtained by pre-training is used to detect the cargo compartment of each image in the image sequence, the coordinate value of the door is located in the image. Therefore, the area where the door is located is located in the image according to the coordinate value of the door. After obtaining the coordinate value of the door, the area where the door is located is located and cropped in the image according to the coordinate value of the door, and the image area sequence of the compartment is obtained. Then, since the image in the compartment image area sequence is the image input into the second neural network, each image in the compartment image area sequence is scaled according to the second preset size, and the scaled image is the compartment image. That is, the image larger than the second preset size is reduced to the second preset size, and the image smaller than the second preset size is enlarged to the second preset size.
[0064] In addition, image scaling can be performed using image interpolation methods, such as nearest neighbor interpolation, bilinear interpolation, etc. In this embodiment, by removing images that do not meet the requirements in the image sequence and performing cropping and scaling processing on each image according to the neural network, the burden of the neural network is reduced and the recognition speed is accelerated.
[0065] In one embodiment, Figure 5 As shown, removing images that do not include the cargo compartment or whose overlap does not meet the requirements in the image sequence to obtain a new image sequence includes the following steps:
[0066] Step S502: input each image in the image sequence into a fourth neural network to obtain the confidence level of each image in the image sequence.
[0067] Among them, the fourth neural network is a pre-trained detection network for detecting cargo compartments, and the detection network includes but is not limited to Faster R-CNN (Faster Region Convolutional Neural Networks), SSD network (Single Shot MultiBox Detector) target detection algorithm network, Yolo network (You Only Look Once, a single neural network target detection network), etc. Confidence is a probability value, and the credibility of the result predicted by the neural network is expressed according to the probability value.
[0068] Specifically, when detecting an image sequence, a pre-trained fourth neural network is called. Each image in the image sequence is input into the fourth neural network. Each image in the image sequence is detected by the fourth neural network to obtain the coordinate value of the door of the cargo compartment in each image and the corresponding confidence level. After obtaining the coordinate value of the door of the cargo compartment, the door can be located in the compartment image and cropped to the corresponding image area in the compartment according to the coordinate value of the door of the cargo compartment. Moreover, the probability that the object in the area corresponding to the coordinate value is a door can be determined according to the confidence level.
[0069] Step S504: removing images that do not include the cargo compartment from the image sequence according to the confidence level to obtain a first remaining image sequence.
[0070] Specifically, a confidence threshold is obtained. The confidence threshold is used to filter out unreliable prediction results and can be set according to actual conditions. In this embodiment, the confidence threshold is preferably 95%. The confidence corresponding to each image is compared with the confidence threshold. Images less than the confidence threshold are regarded as images that do not include the cargo compartment, and the images that do not include the cargo compartment are removed. Images greater than or equal to the confidence threshold are regarded as images that include the cargo compartment and are retained. Thus, a first remaining image sequence is obtained, that is, the first remaining image sequence is an image sequence after removing images that do not include the cargo compartment.
[0071] Step S506: Calculate the overlap between adjacent images in the first remaining image sequence, and remove images whose overlap does not meet the requirement from the first remaining image sequence to obtain a second remaining image sequence.
[0072] The overlap degree is used to indicate the repetition degree between the current image and the adjacent image of the previous frame. The higher the overlap degree, the more similar the current image is to the adjacent image of the previous frame.
[0073] Specifically, by calculating the overlap between each image in the first residual image sequence and the adjacent image of the previous frame, the overlap is compared with the overlap threshold, and the images greater than the overlap threshold are regarded as redundant images and removed. The images less than or equal to the overlap threshold are retained, thereby obtaining the second residual image sequence, which is the image sequence after removing the redundant images.
[0074] Step S508: sorting the images in the second remaining image sequence according to the image acquisition time to obtain a new image sequence.
[0075] Specifically, after the second remaining image sequence is obtained, in order to prevent the front-to-back relationship of each image from being disrupted during the image processing process, the images in the second remaining image sequence are sorted according to the image acquisition time of each image. That is, the images are sorted according to the acquisition order, with the images acquired first being arranged in the front and the images acquired later being arranged in the back, thereby ensuring the correct time sequence relationship between the images.
[0076] In addition, if a fixed number of images need to be selected to form an image sequence, the images in the second remaining image sequence can be further comprehensively screened. By evaluating the images, suitable images are screened according to the scores obtained by the evaluation. Then the selected number is sorted according to the image acquisition time. Among them, the evaluation score can be calculated according to the overlap and confidence. That is, the overlap corresponding to each image is multiplied by the confidence, and the multiplied value is the score of the image. Ranking by score, select images according to needs. For example, if each group of image sequence control includes 6 images, the 6 images with the highest scores are selected according to the scores to form a group of image sequences. Then, these 6 images are sorted according to the acquisition time of these 6 images.
[0077] In one embodiment, the overlap of adjacent images in a first residual image sequence is calculated, and images whose overlap does not meet the requirement are removed from the first residual image sequence to obtain a second residual image sequence, including: taking the images in the first residual image sequence as the current image in sequence, and obtaining the previous frame image of the current image; determining the intersection area and the union area of the current image and the previous frame image; obtaining the overlap of the current image according to the ratio of the intersection area to the union area; and removing images whose overlap does not meet the requirement in the first residual image sequence to obtain a second residual image sequence.
[0078] The intersection area refers to the repeated area between two adjacent images, and the union area refers to the total area of two adjacent images. The intersection over union (IoU) is the ratio of the intersection area to the union area of two adjacent images.
[0079] Specifically, first determine the intersection area of two adjacent images by obtaining the starting point coordinates and the end point coordinates of the two adjacent images. The starting point coordinates are the coordinates of the first pixel in the upper left corner of the image, and the end point coordinates are the coordinates of the last pixel in the lower right corner. The length and width of the image can be calculated by the starting point coordinates and the end point coordinates, and then the intersection area of the two images can be calculated. For example, if the starting point coordinates of image 1 are (x11, y11) and the end point coordinates are (x12, y12), then the height H1 of image 1 is H1 = y12-y11, and the width k1 is x12-x11. The starting point coordinates of image 2 are (x21, y21), and the end point coordinates are (x22, y22). The height H2 of image 2 is H2 = y22-y21, and the width k2 is x22-x21. The intersection area of image 1 and image 2 is H*k, where H=H1+H2-(y22-y21)=y12-y21, k=k1+k2-(x22-x21)=x12-x21. Secondly, the union area of the two adjacent images is obtained, which is the sum of the area of image 1 and the area of image 2 minus the intersection area, which is the union area. After obtaining the intersection area and the union area, the ratio of the two is the overlap IoU, and the calculation formula is as follows:
[0080]
[0081] Among them, A represents image 1 and C represents image 2. That is, when A is the current image and C is the previous adjacent image of image A, if the calculated IoU value is greater than the overlap threshold, image A is removed. On the contrary, if the IoU value is less than or equal to the overlap threshold, image A is retained.
[0082] In addition, the overlap between two images can also be directly calculated by calling image processing tools, such as OpenCV, MATLAB, etc.
[0083] In one embodiment, Figure 6 As shown, a neural network structure is provided, and a loading rate identification method is explained based on the neural network structure. Figure 6 , the neural network structure includes a first neural network, a second neural network and a third neural network. Specifically, after obtaining the compartment image sequence of the cargo compartment and the corresponding compartment interior image sequence, the compartment image sequence is input into the first neural network to obtain the time series features output by any convolution layer in the first neural network. And, the compartment interior image sequence is input into the second neural network to obtain the loading rate classification features output by any convolution layer in the second neural network. Among them, the obtained time series features and loading rate classification features are of the same size. Then, the obtained time series features and loading rate classification features are feature fused and input into the third neural network, and the third neural network obtains the final predicted loading rate classification result based on the fused features.
[0084] It should be understood that although Figure 2 , 5 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 , 4 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0085] In one embodiment, Figure 7 As shown, a loading rate identification device is provided, including: an acquisition module 702, an extraction module 704, a fusion module 706 and an identification module 708, wherein:
[0086] The acquisition module 702 is used to acquire a compartment image sequence of the cargo compartment and a compartment interior image sequence corresponding to the compartment image sequence.
[0087] The extraction module 704 is used to input the car body image sequence into the trained first neural network, and extract the temporal features of the car body image sequence through the middle layer of the first neural network.
[0088] The extraction module 704 is also used to input the in-cabin image sequence into the trained second neural network, and extract the loading rate classification features of the in-cabin image sequence through the middle layer of the second neural network; wherein the middle layer of the first neural network is the same size as the middle layer of the second neural network.
[0089] The fusion module 706 is used to fuse the time series feature and the loading rate classification feature to obtain a fusion feature.
[0090] The recognition module 708 is used to input the fusion features into the trained third neural network to obtain the loading rate classification result of the cabin image sequence.
[0091] In one embodiment, the extraction module 704 is also used to: obtain a sample set of the cargo compartment, the sample set including compartment image sequence samples, and loading rate classification results of the labeled compartment image sequence samples; input the compartment image sequence samples into the first neural network, extract the feature map of each image in the compartment image sequence samples through the 2D convolution network of the first neural network, fuse the feature map through the 3D convolution network of the first neural network, and output the loading rate classification results of the compartment image sequence samples; adjust the parameters of the first neural network according to the output loading rate classification results of the compartment image sequence samples and the loading rate classification results of the labeled compartment image sequence samples; when the end condition of training is reached, stop the iteration to obtain the trained first neural network.
[0092] In one embodiment, the sample set also includes cabin image sequence samples corresponding to the cabin body image sequence samples, and the loading rate classification results of the labeled cabin image sequence samples. The extraction module 704 is also used to input the cabin image sequence samples into the second neural network, and output the loading rate classification results of the cabin image sequence samples; adjust the parameters of the second neural network according to the output loading rate classification results of the cabin image sequence samples and the loading rate classification results of the labeled cabin image sequence samples; when the end condition of the training is reached, stop the iteration to obtain the trained second neural network.
[0093] In one embodiment, the extraction module 704 is also used to input the body image sequence samples into the trained first neural network, and extract the time series features of the body image sequence samples through the intermediate layer of the trained first neural network; input the interior image sequence samples into the trained second neural network, and extract the loading rate classification features of the interior image sequence samples through the intermediate layer of the trained second neural network; fuse the time series features of the body image sequence samples with the loading rate classification features of the interior image sequence samples to obtain the fused features; input the fused features into the third neural network, and output the loading rate classification results of the interior image sequence samples; adjust the parameters of the third neural network according to the output loading rate classification results of the interior image sequence samples and the labeled loading rate classification results; when the end condition of training is reached, stop the iteration to obtain the trained third neural network.
[0094] In one embodiment, the acquisition module 702 is also used to receive an image sequence taken of the cargo compartment when the compartment door is open, remove images in the image sequence that do not include the cargo compartment or whose overlap does not meet the requirements, and obtain a new image sequence; scale each image in the new image sequence to a first preset size to obtain a compartment image sequence; identify each image in the new image sequence to determine the door of the cargo compartment in each image; crop the interior image area of the cargo compartment according to the door of the cargo compartment to obtain an interior image area sequence; scale each interior image area in the interior image area sequence to a second preset size to obtain an interior image sequence.
[0095] In one embodiment, the acquisition module 702 is further used to input each image in the image sequence into a fourth neural network to obtain the confidence of each image in the image sequence; remove the images that do not include the cargo compartment in the image sequence according to the confidence to obtain a first remaining image sequence; calculate the overlap of adjacent images in the first remaining image sequence, and remove images whose overlap does not meet the requirements from the first remaining image sequence to obtain a second remaining image sequence; and sort the images in the second remaining image sequence according to the image acquisition time to obtain a new image sequence.
[0096] In one embodiment, the acquisition module 702 is also used to take the images in the first remaining image sequence as the current image in sequence, and acquire the previous frame image of the current image; determine the intersection area and the union area of the current image and the previous frame image; obtain the overlap of the current image according to the ratio of the intersection area and the union area; remove the images whose overlap does not meet the requirements in the first remaining image sequence, and obtain the second remaining image sequence.
[0097] For the specific definition of the loading rate identification device, please refer to the definition of the loading rate identification method above, which will not be repeated here. Each module in the above-mentioned loading rate identification device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0098] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a loading rate identification method is implemented.
[0099] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0100] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0101] Acquire a compartment image sequence of the cargo compartment and a compartment interior image sequence corresponding to the compartment image sequence;
[0102] Inputting the box image sequence into the trained first neural network, and extracting the temporal features of the box image sequence through the middle layer of the first neural network;
[0103] Input the cabin image sequence into the trained second neural network, and extract the loading rate classification features of the cabin image sequence through the middle layer of the second neural network; wherein the middle layer of the first neural network has the same size as the middle layer of the second neural network;
[0104] Fusing the time series feature and the loading rate classification feature to obtain a fused feature;
[0105] The fused features are input into the trained third neural network to obtain the loading rate classification results of the cabin image sequence.
[0106] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining a sample set of cargo compartments, the sample set including compartment image sequence samples and loading rate classification results of labeled compartment image sequence samples; inputting the compartment image sequence samples into a first neural network, extracting feature maps of each image in the compartment image sequence samples through a 2D convolutional network of the first neural network, fusing the feature maps through a 3D convolutional network of the first neural network, and outputting loading rate classification results of the compartment image sequence samples; adjusting the parameters of the first neural network according to the output loading rate classification results of the compartment image sequence samples and the loading rate classification results of the labeled compartment image sequence samples; and stopping iteration when the end condition of training is reached to obtain a trained first neural network.
[0107] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining a sample set of cargo compartments, the sample set including compartment image sequence samples and loading rate classification results of labeled compartment image sequence samples; inputting the compartment image sequence samples into a first neural network, extracting feature maps of each image in the compartment image sequence samples through a 2D convolutional network of the first neural network, fusing the feature maps through a 3D convolutional network of the first neural network, and outputting loading rate classification results of the compartment image sequence samples; adjusting the parameters of the first neural network according to the output loading rate classification results of the compartment image sequence samples and the loading rate classification results of the labeled compartment image sequence samples; and stopping iteration when the end condition of training is reached to obtain a trained first neural network.
[0108] In one embodiment, when the processor executes the computer program, the following steps are also implemented: inputting the body image sequence samples into the trained first neural network, and extracting the time series features of the body image sequence samples through the intermediate layer of the trained first neural network; inputting the interior image sequence samples into the trained second neural network, and extracting the loading rate classification features of the interior image sequence samples through the intermediate layer of the trained second neural network; fusing the time series features of the body image sequence samples with the loading rate classification features of the interior image sequence samples to obtain the fused features; inputting the fused features into the third neural network, and outputting the loading rate classification results of the interior image sequence samples; adjusting the parameters of the third neural network according to the output loading rate classification results of the interior image sequence samples and the labeled loading rate classification results; when the end condition of training is reached, stopping the iteration to obtain the trained third neural network.
[0109] In one embodiment, the processor further implements the following steps when executing the computer program: receiving an image sequence taken of the cargo compartment with its door open, removing images in the image sequence that do not include the cargo compartment or that do not meet the required overlap, and obtaining a new image sequence; scaling each image in the new image sequence to a first preset size, and obtaining a compartment image sequence; identifying each image in the new image sequence, and determining the door of the cargo compartment in each image; cropping the interior image area of the cargo compartment according to the door of the cargo compartment, and obtaining an interior image area sequence; scaling each interior image area in the interior image area sequence to a second preset size, and obtaining an interior image sequence.
[0110] In one embodiment, when the processor executes the computer program, the following steps are also implemented: inputting each image in the image sequence into a fourth neural network to obtain the confidence of each image in the image sequence; removing images that do not include the cargo compartment in the image sequence according to the confidence to obtain a first remaining image sequence; calculating the overlap of adjacent images in the first remaining image sequence, and removing images whose overlap does not meet the requirements from the first remaining image sequence to obtain a second remaining image sequence; and sorting each image in the second remaining image sequence according to the image acquisition time to obtain a new image sequence.
[0111] In one embodiment, when the processor executes the computer program, the following steps are also implemented: images in the first remaining image sequence are taken as current images in sequence, and the previous frame image of the current image is obtained; the intersection area and the union area of the current image and the previous frame image are determined; the overlap degree of the current image is obtained according to the ratio of the intersection area and the union area; and images whose overlap degree does not meet the requirements in the first remaining image sequence are removed to obtain a second remaining image sequence.
[0112] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0113] Acquire a compartment image sequence of the cargo compartment and a compartment interior image sequence corresponding to the compartment image sequence;
[0114] Inputting the box image sequence into the trained first neural network, and extracting the temporal features of the box image sequence through the middle layer of the first neural network;
[0115] Input the cabin image sequence into the trained second neural network, and extract the loading rate classification features of the cabin image sequence through the middle layer of the second neural network; wherein the middle layer of the first neural network has the same size as the middle layer of the second neural network;
[0116] Fusing the time series feature and the loading rate classification feature to obtain a fused feature;
[0117] The fused features are input into the trained third neural network to obtain the loading rate classification results of the cabin image sequence.
[0118] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a sample set of cargo compartments, the sample set including compartment image sequence samples and loading rate classification results of labeled compartment image sequence samples; inputting the compartment image sequence samples into a first neural network, extracting feature maps of each image in the compartment image sequence samples through a 2D convolutional network of the first neural network, fusing the feature maps through a 3D convolutional network of the first neural network, and outputting loading rate classification results of the compartment image sequence samples; adjusting the parameters of the first neural network according to the output loading rate classification results of the compartment image sequence samples and the loading rate classification results of the labeled compartment image sequence samples; and stopping iteration when the end condition of training is reached to obtain a trained first neural network.
[0119] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a sample set of cargo compartments, the sample set including compartment image sequence samples and loading rate classification results of labeled compartment image sequence samples; inputting the compartment image sequence samples into a first neural network, extracting feature maps of each image in the compartment image sequence samples through a 2D convolutional network of the first neural network, fusing the feature maps through a 3D convolutional network of the first neural network, and outputting loading rate classification results of the compartment image sequence samples; adjusting the parameters of the first neural network according to the output loading rate classification results of the compartment image sequence samples and the loading rate classification results of the labeled compartment image sequence samples; and stopping iteration when the end condition of training is reached to obtain a trained first neural network.
[0120] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: inputting the body image sequence samples into the trained first neural network, and extracting the time series features of the body image sequence samples through the intermediate layer of the trained first neural network; inputting the interior image sequence samples into the trained second neural network, and extracting the loading rate classification features of the interior image sequence samples through the intermediate layer of the trained second neural network; fusing the time series features of the body image sequence samples with the loading rate classification features of the interior image sequence samples to obtain the fused features; inputting the fused features into the third neural network, and outputting the loading rate classification results of the interior image sequence samples; adjusting the parameters of the third neural network according to the output loading rate classification results of the interior image sequence samples and the labeled loading rate classification results; when the end condition of training is reached, stopping the iteration to obtain the trained third neural network.
[0121] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: receiving an image sequence taken of the cargo compartment with its door open, removing images that do not include the cargo compartment or that do not meet the required overlap in the image sequence, and obtaining a new image sequence; scaling each image in the new image sequence to a first preset size, and obtaining a compartment image sequence; identifying each image in the new image sequence, and determining the door of the cargo compartment in each image; cropping the interior image area of the cargo compartment according to the door of the cargo compartment, and obtaining an interior image area sequence; scaling each interior image area in the interior image area sequence to a second preset size, and obtaining an interior image sequence.
[0122] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: inputting each image in the image sequence into a fourth neural network to obtain the confidence of each image in the image sequence; removing images that do not include the cargo compartment in the image sequence according to the confidence to obtain a first remaining image sequence; calculating the overlap of adjacent images in the first remaining image sequence, and removing images whose overlap does not meet the requirements from the first remaining image sequence to obtain a second remaining image sequence; and sorting each image in the second remaining image sequence according to the image acquisition time to obtain a new image sequence.
[0123] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: images in the first remaining image sequence are taken as current images in sequence, and the previous frame image of the current image is obtained; the intersection area and the union area of the current image and the previous frame image are determined; the overlap degree of the current image is obtained according to the ratio of the intersection area and the union area; and images whose overlap degree does not meet the requirements in the first remaining image sequence are removed to obtain a second remaining image sequence.
[0124] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0125] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0126] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for identifying a loading rate, the method comprising: Acquire a compartment image sequence of a cargo compartment and a compartment interior image sequence corresponding to the compartment image sequence; The compartment image sequence is a set of multiple continuous compartment images, wherein the compartment image refers to an image including the cargo compartment; the compartment interior image sequence is a set of multiple continuous compartment interior images, wherein the compartment interior image refers to an image of the compartment interior space corresponding to the cargo compartment, and the compartment interior image is an image cropped from the compartment image; Inputting the box image sequence into a trained first neural network, and extracting the temporal features of the box image sequence through an intermediate layer of the first neural network; Inputting the in-cabin image sequence into a trained second neural network, and extracting the loading rate classification features of the in-cabin image sequence through the middle layer of the second neural network; wherein the middle layer of the first neural network has the same size as the middle layer of the second neural network; Fusion of the time series feature and the loading rate classification feature to obtain a fusion feature; The fusion features are input into a trained third neural network to obtain a loading rate classification result of the cabin image sequence.
2. The method according to claim 1, characterized in that The method further comprises: Acquire a sample set of cargo compartments, the sample set comprising compartment image sequence samples and labeled loading rate classification results of the compartment image sequence samples; Inputting the car body image sequence samples into a first neural network, extracting a feature map of each image in the car body image sequence samples through a 2D convolutional network of the first neural network, fusing the feature maps through a 3D convolutional network of the first neural network, and outputting a loading rate classification result of the car body image sequence samples; Adjusting the parameters of the first neural network according to the output loading rate classification results of the compartment image sequence samples and the labeled loading rate classification results of the compartment image sequence samples; When the end condition of training is reached, the iteration is stopped and the trained first neural network is obtained.
3. The method according to claim 2, characterized in that The sample set also includes cabin image sequence samples corresponding to the cabin body image sequence samples, and labeled loading rate classification results of the cabin image sequence samples; the method also includes: Inputting the in-cabin image sequence samples into a second neural network, and outputting a loading rate classification result of the in-cabin image sequence samples; Adjusting the parameters of the second neural network according to the output loading rate classification results of the interior image sequence samples and the labeled loading rate classification results of the interior image sequence samples; When the end condition of training is reached, the iteration is stopped to obtain the trained second neural network.
4. The method according to claim 3, characterized in that The method further comprises: Inputting the box image sequence samples into the trained first neural network, and extracting the temporal features of the box image sequence samples through the intermediate layer of the trained first neural network; Inputting the in-cabin image sequence samples into the trained second neural network, and extracting the loading rate classification features of the in-cabin image sequence samples through the middle layer of the trained second neural network; Fusion of the temporal features of the compartment image sequence samples and the loading rate classification features of the compartment image sequence samples to obtain fusion features; Inputting the fusion features into a third neural network, and outputting a classification result of the loading rate of the cabin image sequence samples; adjusting the parameters of the third neural network according to the output loading rate classification results of the cabin image sequence samples and the labeled loading rate classification results; When the end condition of training is reached, the iteration is stopped to obtain the trained third neural network.
5. The method according to claim 1, characterized in that Acquiring a compartment image sequence of a cargo compartment and a compartment interior image sequence corresponding to the compartment image sequence, including: receiving an image sequence captured when the cargo compartment door is open, removing images that do not include the cargo compartment or whose overlap does not meet the requirement in the image sequence, and obtaining a new image sequence; Scaling each image in the new image sequence to a first preset size to obtain a compartment image sequence; Identify each image in the new image sequence to determine the door of the cargo compartment in each image; cropping the interior image region of the cargo compartment according to the door of the cargo compartment to obtain an interior image region sequence; Each image of the intra-cabin image region sequence is scaled to a second preset size to obtain an intra-cabin image sequence.
6. The method according to claim 5, characterized in that Removing images that do not include the cargo compartment or that do not meet the overlap requirement in the image sequence, to obtain a new image sequence, including: Inputting each image in the image sequence into a fourth neural network to obtain a confidence level of each image in the image sequence; According to the confidence level, remove the images that do not include the cargo compartment in the image sequence to obtain a first remaining image sequence; Calculating the overlap degree of adjacent images in the first remaining image sequence, and removing images whose overlap degree does not meet the requirement from the first remaining image sequence, to obtain a second remaining image sequence; The images in the second remaining image sequence are sorted according to the image acquisition time to obtain a new image sequence.
7. The method according to claim 6, characterized in that Calculating the overlap of adjacent images in the first remaining image sequence, and removing images whose overlap does not meet the requirement from the first remaining image sequence to obtain a second remaining image sequence, comprising: Using the images in the first remaining image sequence as current images in sequence, and acquiring the previous frame image of the current image; Determine the intersection area and union area of the current image and the previous frame image; Obtaining the overlap degree of the current image according to the ratio of the intersection area to the union area; The images whose overlap does not meet the requirement in the first remaining image sequence are removed to obtain a second remaining image sequence.
8. A loading rate identification device, characterized in that: The device comprises: An acquisition module is used to acquire a compartment image sequence of a cargo compartment and a compartment interior image sequence corresponding to the compartment image sequence; the compartment image sequence is a set of multiple continuous compartment images, and the compartment image refers to an image including the cargo compartment; the compartment interior image sequence is a set of multiple continuous compartment interior images, and the compartment interior image refers to an image of the compartment interior space corresponding to the cargo compartment, and the compartment interior image is an image cropped from the compartment image; An extraction module, used for inputting the cabin image sequence into a trained first neural network, and extracting the temporal features of the cabin image sequence through an intermediate layer of the first neural network; The extraction module is also used to input the cabin image sequence into a trained second neural network, and extract the loading rate classification features of the cabin image sequence through the middle layer of the second neural network; wherein the middle layer of the first neural network has the same size as the middle layer of the second neural network; A fusion module, used for fusing the time series feature and the loading rate classification feature to obtain a fusion feature; The recognition module is used to input the fusion features into the trained third neural network to obtain the loading rate classification result of the cabin image sequence.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Loading rate acquisition method, device and system and storage medium
CN108898044A
Image retrieval method and apparatus, computer device, and storage medium
CN109033107A
Bus congestion detection method combining ResNet and LSTM
CN109117788A
A dynamic gesture recognition method based on Kinect
CN109344701A
Target tracking method based on space-time feature fusion learning
CN109800689A
