Agricultural insurance photo copying identification method and model training method thereof, and related equipment
By using the star operation module and the convolution reconstruction module to process feature data in the remake recognition of agricultural insurance photos, the problem of low recognition accuracy and efficiency in traditional technology is solved, and more efficient and accurate agricultural insurance photos recognition is achieved.
Patent Information
- Application Number
- CN202510034040.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-04-15
AI Technical Summary
The traditional agricultural insurance photo remake recognition technology solution has low recognition accuracy and low recognition efficiency, resulting in a reduced efficiency of agricultural insurance claims settlement.
A training method for agricultural insurance photo remake recognition model is adopted. By obtaining agricultural insurance photos, setting them as training data, sending them to the convolutional layer to extract feature data, using the star operation module and the convolutional reconstruction module to process feature data, and finally using the global average pooling layer or the fully connected layer to generate recognition results.
It improves the processing efficiency and accuracy of agricultural insurance photo remake recognition, and enhances the efficiency of agricultural insurance claims settlement.
Smart Images

Figure CN119832390A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method for identifying agricultural insurance photo remakes and its model training method and related equipment. Background Art
[0002] With the development of the insurance industry, agricultural insurance has received more and more attention. Purchasing agricultural insurance can significantly reduce property losses caused by natural disasters, accidents, etc. during crop planting, livestock and poultry aquaculture, and the use of agricultural equipment. As the scope of agricultural insurance services becomes wider and wider and the number of people served increases, insurance fraud has also occurred. Under normal circumstances, users need to upload real photos of damaged agricultural products and damaged agricultural equipment for claims, but some users use mobile phones, computer screens, paper printing, etc. to present online photos, historical claims photos, etc., and then upload them to the agricultural insurance claims system after reshooting to defraud compensation. The traditional manual review and recognition method has certain recognition errors and is inefficient in processing agricultural insurance claims photos uploaded by users, which further reduces the efficiency of agricultural insurance claims. Summary of the invention
[0003] The main technical problem to be solved by the implementation method of the present application is that the traditional agricultural insurance photo re-shooting and recognition technology solution has a low recognition accuracy and a low recognition efficiency.
[0004] To solve the above technical problems, the first technical solution adopted in the implementation mode of the present application is: to provide a training method for an agricultural insurance photo copy recognition model, comprising: obtaining agricultural insurance photos, setting the agricultural insurance photos as training data corresponding to a target agricultural insurance photo copy recognition model; sending the training data to a first convolutional layer of the target agricultural insurance photo copy recognition model, and extracting first feature data of the agricultural insurance photos through the first convolutional layer; processing the first feature data of the agricultural insurance photos in sequence through at least one preset star operation module to obtain a first feature map of the agricultural insurance photos, wherein the star operation module includes a second convolutional layer, a star operation block and a convolutional reconstruction module in sequence; using a preset global average pooling layer or a fully connected layer to process the first feature map of the agricultural insurance photos to obtain an agricultural insurance photo copy recognition result.
[0005] Optionally, the step of processing the first feature data of the agricultural insurance photo in sequence through at least one preset star operation module to obtain a first feature map of the agricultural insurance photo includes: sending the first feature data of the agricultural insurance photo to the second convolutional layer, and extracting at least one subspace feature data of the agricultural insurance photo through the second convolutional layer; performing element-level multiplication fusion processing on the subspace feature data using the star operation included in the star operation block to obtain agricultural insurance photo feature fusion data; and performing feature reconstruction processing on the agricultural insurance photo feature fusion data through the convolution reconstruction module to obtain the first feature map of the agricultural insurance photo.
[0006] Optionally, the step of performing feature reconstruction processing on the feature fusion data of the agricultural insurance photo through the convolution reconstruction module to obtain the first feature map of the agricultural insurance photo includes: processing the feature fusion data of the agricultural insurance photo through the channel reconstruction convolution submodule contained in the convolution reconstruction module to obtain the channel reconstruction sub-feature map of the agricultural insurance photo; processing the channel reconstruction sub-feature map of the agricultural insurance photo through the spatial reconstruction convolution submodule contained in the convolution reconstruction module, mapping the obtained channel features to different feature spaces, and fusing the weight of each channel of the channel reconstruction sub-feature map to the feature space to obtain the first feature map of the agricultural insurance photo.
[0007] Optionally, the step of processing the agricultural insurance photo feature fusion data through the channel reconstruction convolution submodule included in the convolution reconstruction module to obtain the channel reconstruction sub-feature map of the agricultural insurance photo includes: processing the agricultural insurance photo feature fusion data through the group normalization layer of the spatial reconstruction convolution submodule to obtain the normalized feature map of the agricultural insurance photo, wherein the group normalization processing formula included in the group normalization layer is as follows:
[0008]
[0009] Wherein, X represents the agricultural insurance photo feature fusion data, μ represents the mean of X, σ represents the standard deviation of X, β represents the learnable affine transformation parameter, γ represents the variance of each channel of the image in the agricultural insurance photo feature fusion data, ε represents a positive number close to 0, and X out and GN(X) represent the normalized feature map of the agricultural insurance photo, GN represents the process of the group normalization layer processing; the variance of each channel of the image in the agricultural insurance photo feature fusion data is normalized to a preset range to obtain a normalized channel weight, wherein the normalized channel weight calculation formula of each channel is as follows:
[0010]
[0011] Among them, W γand {w} represent the normalized channel weight of each channel, C represents the total number of channels of the normalized feature map of the agricultural insurance photo, and i represents the ordinal number of each channel; the normalized channel weight and the normalized feature map of the agricultural insurance photo are processed by a preset first activation function and a gate function to obtain a first full channel weight and a second full channel weight, respectively, wherein the calculation formulas for obtaining the first full channel weight and the second full channel weight are as follows:
[0012] W=Gate(Sigmoid(W γ (GN(X))))
[0013] Among them, Sigmoid represents the preset first activation function, Gate represents the gate function, and W represents the first full-channel weight or the second full-channel weight; the feature fusion data of the agricultural insurance photo is multiplied by the first full-channel weight and the second full-channel weight respectively to obtain the corresponding first full-channel weight feature map and the second full-channel weight feature map respectively; the first full-channel weight feature map and the second full-channel weight feature map are divided into a first sub-feature map set and a second sub-feature map set of preset numbers respectively; the first sub-feature map set and the second sub-feature map set are cross-added, and the results of the cross-addition are connected to obtain the channel reconstruction sub-feature map of the agricultural insurance photo.
[0014] Optionally, the step of processing the channel reconstruction sub-feature map of the agricultural insurance photo by the spatial reconstruction convolution submodule included in the convolution reconstruction module, mapping the obtained channel features to different feature spaces, and fusing the weight of each channel of the channel reconstruction sub-feature map to the feature space to obtain the first feature map of the agricultural insurance photo includes:
[0015] Convolution processing is performed on the channel reconstruction sub-feature graphs of the agricultural insurance photo to obtain first spatial feature data of different feature spaces;
[0016] The second spatial feature data at the channel level is extracted from the spatial feature data through a global average pooling layer, wherein the extraction formula of the second spatial feature data is as follows:
[0017] S m =Pooling(Y m )
[0018] Among them, S m represents the second spatial feature data, Y m represents the first spatial feature data, Pooling represents the processing of the global average pooling layer, m represents the ordinal number of the different feature spaces, S m ∈R c×1×1, C represents the total number of channels of the channel reconstruction sub-feature map; calculate the second weight of each channel in the second spatial feature data, wherein the calculation formula of the second weight is as follows:
[0019]
[0020] Among them, e represents a mathematical constant, β m represents the second weight, and n represents the total number of the different feature spaces; the second weight and the first spatial feature data are subjected to feature fusion processing to obtain the first feature map of the agricultural insurance photo, wherein the calculation formula for the feature fusion processing is as follows:
[0021]
[0022] Wherein, Y represents the first characteristic image of the agricultural insurance photo.
[0023] Optionally, after the step of using a preset global average pooling layer or a fully connected layer to process the first feature map of the agricultural insurance photo to obtain the agricultural insurance photo remake recognition result, the method further includes: obtaining the last predicted feature map output by the global average pooling layer or the fully connected layer; and calculating the feature map variance of the predicted feature map, wherein the calculation formula of the feature map variance is as follows:
[0024]
[0025] Among them, the predicted feature map is represented by T∈R B×C×H×W , B represents the number of samples, C represents the number of channels of the predicted feature map, H represents the height of the predicted feature map, W represents the width of the predicted feature map, and T is expanded into a two-dimensional array t∈R B×n ,n=C×H×W,v i It is represented as the feature map variance of the i-th predicted feature map; scaling the feature map variance to within a preset range, and the scaling calculation formula is:
[0026]
[0027] Among them, v max Indicates the v i The maximum value, v min Indicates the v i The minimum value of
[0028] The prediction deviation loss result is calculated by using the feature graph variance and a preset cross entropy loss function, wherein the prediction deviation loss function corresponding to the prediction deviation loss result is:
[0029]
[0030] z(vi )=exp(v i *α)―β
[0031] Among them, Loss Bias represents the prediction deviation loss result, N represents the total number of samples, y ij is the label value of whether the i-th agricultural insurance photo belongs to the k-th category, α and β are adjustable parameters, θ is the model parameter, and f j (x i ; θ) represents the predicted score that the ith agricultural insurance photo belongs to the kth category; the target agricultural insurance photo remake recognition model is optimized according to the predicted deviation loss result until the predicted deviation loss function converges.
[0032] In order to solve the above-mentioned technical problems, the second technical solution adopted in the implementation mode of the present application is: to provide a method for identifying agricultural insurance photo copies, including: constructing an initial agricultural insurance photo copy identification model, training the initial agricultural insurance photo copy identification model by the agricultural insurance photo copy identification model training method as described above, and obtaining a target agricultural insurance photo copy identification model; receiving agricultural insurance photos to be identified, sending the agricultural insurance photos to be identified to the target agricultural insurance photo copy identification model, and obtaining corresponding agricultural insurance photo identification results.
[0033] To solve the above technical problems, the third technical solution adopted in the implementation mode of the present application is: to provide a training device for an agricultural insurance photo copy recognition model, including: an agricultural insurance photo acquisition module, used to acquire agricultural insurance photos, and set the agricultural insurance photos as training data corresponding to the target agricultural insurance photo copy recognition model; a photo feature extraction module, used to send the training data to the first convolution layer of the target agricultural insurance photo copy recognition model, and extract the first feature data of the agricultural insurance photo through the first convolution layer; a feature map generation module, used to process the first feature data of the agricultural insurance photo in sequence through at least one preset star operation module to obtain a first feature map of the agricultural insurance photo, wherein the star operation module includes a second convolution layer, a star operation block and a convolution reconstruction module in sequence; a copy recognition result module, used to process the first feature map of the agricultural insurance photo using a preset global average pooling layer or a fully connected layer to obtain an agricultural insurance photo copy recognition result.
[0034] To solve the above technical problems, the fourth technical solution adopted in the implementation mode of the present application is: to provide an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the agricultural insurance photo remake recognition model training method as described above, or the agricultural insurance photo remake recognition method as described above.
[0035] In order to solve the above-mentioned technical problems, the fifth technical solution adopted in the implementation mode of the present application is: providing a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed by an electronic device, the electronic device executes the agricultural insurance photo copy recognition model training method as described above, or the agricultural insurance photo copy recognition method as described above.
[0036] Different from the related art, the present application obtains agricultural insurance photos and sets the agricultural insurance photos as training data corresponding to the target agricultural insurance photo copy recognition model; sends the training data to the first convolution layer of the target agricultural insurance photo copy recognition model, and extracts the first feature data of the agricultural insurance photos through the first convolution layer; processes the first feature data of the agricultural insurance photos in sequence through at least one preset star operation module to obtain a first feature map of the agricultural insurance photos, wherein the star operation module includes a second convolution layer, a star operation block and a convolution reconstruction module in sequence; uses a preset global average pooling layer or a fully connected layer to process the first feature map of the agricultural insurance photos to obtain the agricultural insurance photo copy recognition result, thereby improving the processing efficiency of agricultural insurance photo copy recognition and the accuracy of agricultural insurance photo copy recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] One or more embodiments are exemplarily described by corresponding drawings, which do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and the figures in the drawings do not constitute proportional limitations unless otherwise stated.
[0038] Figure 1 It is a schematic diagram of the operating environment of the agricultural insurance photo remake recognition model training method provided in the embodiment of the present application.
[0039] Figure 2 It is a schematic diagram of the execution flow of the agricultural insurance photo remake recognition model training method provided in the embodiment of the present application.
[0040] Figure 3 This is a data flow diagram of the channel reconstruction convolution submodule provided in this application for processing agricultural insurance photo feature fusion data.
[0041] Figure 4 It is a data flow diagram of the spatial reconstruction convolution submodule provided in this application for processing the channel reconstruction sub-feature map of agricultural insurance photos.
[0042] Figure 5 It is a system structure diagram of the agricultural insurance photo re-shooting recognition model training device provided in an embodiment of the present application.
[0043] Figure 6It is a schematic diagram of the hardware structure of an electronic device that executes the agricultural insurance photo remake recognition model training method or the agricultural insurance photo remake recognition method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] 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.
[0045] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order than the module division in the device schematic diagram or the order in the flow chart.
[0046] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.
[0047] To facilitate understanding of this embodiment, firstly, a method for training a model for identifying agricultural insurance photo remakes disclosed in the embodiment of this application is introduced in detail. Figure 1 , Figure 1 Schematic diagram of the operating environment of the agricultural insurance photo remake recognition model training method provided in the embodiment of the present application, such as Figure 1 As shown, the execution subject of the agricultural insurance photo remake recognition model training method provided in the embodiment of the present application is generally an electronic device with certain computing capabilities, such as a computer device. In some possible implementations, the agricultural insurance photo remake recognition model training method can be implemented by a processor calling a computer-readable instruction stored in a memory. Among them, Figure 1 The computer device in the term can be a server. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. It can be understood that Figure 1 The number of computer devices in the figure is only for reference and can be expanded to any number according to actual needs.
[0048] Please continue reading Figure 2 , Figure 2 : is a schematic diagram of the execution flow of the agricultural insurance photo remake recognition model training method provided in the embodiment of the present application, such as Figure 2 As shown, the following steps are included:
[0049] S1. Obtain agricultural insurance photos, and set the agricultural insurance photos as training data corresponding to the target agricultural insurance photo remake recognition model.
[0050] S2. Send the training data to the first convolutional layer of the target agricultural insurance photo remake recognition model, and extract the first feature data of the agricultural insurance photo through the first convolutional layer.
[0051] Among them, when processing agricultural insurance photos through the first convolutional layer, the filter (convolution kernel) is used to slide on the agricultural insurance photos to achieve perception of the local area of the photo, and to capture local features in the photo, such as edges and textures. The convolutional layer can also learn different features of agricultural insurance photos, starting from simple edges and textures, and gradually extracting more complex features, such as shapes and corners. This feature helps to improve the target agricultural insurance photo remake recognition model's ability to understand image content.
[0052] S3. Process the first feature data of the agricultural insurance photo in sequence through at least one preset star operation module to obtain a first feature map of the agricultural insurance photo, wherein the star operation module includes a second convolutional layer, a star operation block and a convolutional reconstruction module in sequence.
[0053] As a preferred implementation, the above step S3 may specifically include the following steps S31 to S33.
[0054] S31. Send the first feature data of the agricultural insurance photo to the second convolutional layer, and extract at least one subspace feature data of the agricultural insurance photo through the second convolutional layer.
[0055] S32. Use the star operation included in the star operation block to perform element-level multiplication fusion processing on the subspace feature data to obtain agricultural insurance photo feature fusion data.
[0056] Among them, the star operation is a learning paradigm, which is a method of fusing features of different subspaces through element-level multiplication, and fuses features of different subspaces through element-level multiplication (similar to the multiplication operation of the "star" symbol). In the embodiment of the present application, when the star operation is integrated into the neural network of the above-mentioned target agricultural insurance photo remake recognition model and multiple layers are stacked, the efficient feature fusion method enables the star operation to achieve nearly infinite dimensions in a compact feature space, thereby greatly improving the representation ability and performance of the target agricultural insurance photo remake recognition model.
[0057] S33. Perform feature reconstruction processing on the feature fusion data of the agricultural insurance photo through a convolution reconstruction module to obtain a first feature map of the agricultural insurance photo.
[0058] As another preferred implementation, the above-mentioned convolution reconstruction module includes a channel reconstruction convolution submodule and a spatial reconstruction convolution submodule, and the above-mentioned step S33 can specifically include the following steps S331 to S332.
[0059] S331. Process the agricultural insurance photo feature fusion data through the channel reconstruction convolution submodule included in the convolution reconstruction module to obtain a channel reconstruction sub-feature map of the agricultural insurance photo.
[0060] Specifically, the feature fusion data of agricultural insurance photos is first processed through the group normalization layer of the spatial reconstruction convolution submodule to obtain the normalized feature map of agricultural insurance photos. The group normalization processing formula contained in the group normalization layer is as follows:
[0061]
[0062] Among them, X represents the agricultural insurance photo feature fusion data, μ represents the mean of X, σ represents the standard deviation of X, β represents the learnable affine transformation parameter, γ represents the variance of each channel of the image in the agricultural insurance photo feature fusion data, ε represents a positive number close to 0, and X out and GN(X) represent the normalized feature map of agricultural insurance photos, and GN represents the process of group normalization layer processing. Then, the variance of each channel of the image in the agricultural insurance photo feature fusion data is normalized to a preset range to obtain the normalized channel weight, where the normalized channel weight calculation formula for each channel is as follows:
[0063]
[0064] Among them, W γ and {w i} represents the normalized channel weight of each channel, C represents the total number of channels of the normalized feature map of agricultural insurance photos, and i represents the ordinal number of each channel. At the same time, the normalized channel weight and the normalized feature map of agricultural insurance photos are processed by the preset first activation function and gate function to obtain the first full channel weight and the second full channel weight respectively, wherein the calculation formulas for obtaining the first full channel weight and the second full channel weight are as follows:
[0065] W=Gate(Sigmoid(W γ (GN(X))))
[0066] Among them, Sigmoid represents the preset first activation function, Gate represents the gate function, and W represents the first full-channel weight or the second full-channel weight. Finally, the feature fusion data of the agricultural insurance photo is multiplied by the first full-channel weight and the second full-channel weight respectively to obtain the corresponding first full-channel weight feature map and the second full-channel weight feature map. The first full-channel weight feature map and the second full-channel weight feature map are divided into a preset number of first sub-feature map sets and a second sub-feature map set. The first sub-feature map set and the second sub-feature map set are cross-added, and the results of the cross-addition are connected to obtain the channel reconstruction sub-feature map of the agricultural insurance photo. In the channel reconstruction convolution submodule, the parameters of the group normalization layer are used as weights as the standard for whether each channel of the agricultural insurance photo feature map is rich in information, and the features with rich information and those with poor information are distinguished, and the two are fused, thereby improving the utilization rate of redundant features with less effective information.
[0067] As an example, see Figure 3 , Figure 3 This is a data flow diagram of the channel reconstruction convolution submodule provided in this application for processing agricultural insurance photo feature fusion data, such as Figure 3 As shown in the example, the agricultural insurance photo feature fusion data X is first processed by the group normalization layer to obtain the variance of each channel of the image, and then the variance is normalized to obtain the normalized channel weight. Finally, through the first activation function and gate function processing, the results after the first activation function processing are set to 1 if they are greater than 0.5, and set to 0 if they are less than or equal to 0.5, and the first full channel weight W is obtained. 1 ; Set the result after the first activation function processing that is less than 0.5 to 1, and set it greater than or equal to 0.5 to 0, and get the second full channel weight W 2 Then, the agricultural insurance photo feature fusion data X is combined with W 1 and W 2 Multiply to get the first full channel weight feature map And the second full channel weight feature map The first full channel weight feature map The feature map that represents more useful information, the second full channel weight feature map Represents a feature map with less useful information. and Divide into two parts ( Figure 3 In ) and cross-add them, and then connect the results to output the channel reconstruction sub-feature map X of the agricultural insurance photo w .
[0068] S332. Process the channel reconstruction sub-feature map of the agricultural insurance photo through the spatial reconstruction convolution sub-module included in the convolution reconstruction module, map the obtained channel features to different feature spaces, and fuse the weight of each channel of the channel reconstruction sub-feature map to the feature space to obtain the first feature map of the agricultural insurance photo.
[0069] Specifically, the channel reconstruction sub-feature maps of the agricultural insurance photos are first convolved to obtain the first spatial feature data of different feature spaces. Then, the second spatial feature data at the channel level is extracted from the spatial feature data through the global average pooling layer, where the extraction formula of the second spatial feature data is as follows:
[0070] S m =Pooling(Y m )
[0071] Among them, S m Represents the second spatial feature data, Y m represents the first spatial feature data, Pooling represents the processing of the global average pooling layer, m represents the ordinal number of different feature spaces, S m ∈R c×1×1 , C represents the total number of channels of the channel reconstruction sub-feature map. At the same time, the second weight of each channel in the second spatial feature data is calculated, where the calculation formula of the second weight is as follows:
[0072]
[0073] Among them, e represents a mathematical constant, β m represents the second weight, and n represents the total number of different feature spaces. Finally, the second weight and the first spatial feature data are subjected to feature fusion processing to obtain the first feature map of the agricultural insurance photo, where the calculation formula for feature fusion processing is as follows:
[0074]
[0075] Among them, Y represents the first feature map of agricultural insurance photos. The features of agricultural insurance photos obtained by the channel reconstruction convolution submodule are mapped to different feature spaces through the spatial reconstruction convolution submodule, and the information data of the two feature spaces are fused according to the weight of each channel, which further improves the richness of agricultural insurance photo features and indirectly improves the accuracy of agricultural insurance photo remake recognition.
[0076] As an example, see Figure 4 , Figure 4 This is a data flow diagram of the spatial reconstruction convolution submodule provided in this application processing the channel reconstruction sub-feature map of the agricultural insurance photo, such as Figure 4 As shown, taking the number of feature spaces as 2 as an example, the channel reconstruction sub-feature map X of the agricultural insurance photow After convolution processing, we get the feature maps Y of different feature spaces. 1 and Y 2 Then, the corresponding second spatial feature data S is obtained through the global average pooling layer. 1 and S 2 , and calculate the second weight β of each channel in the second spatial feature data 1 and β 2 , and finally perform feature fusion processing β 1 Y 1 +β 2 Y 2 To obtain the first feature map Y of the agricultural insurance photo.
[0077] S4. Use a preset global average pooling layer or a fully connected layer to process the first feature map of the agricultural insurance photo to obtain the agricultural insurance photo remake recognition result.
[0078] As a preferred implementation, after the above step S4, the following steps S41 to S43 may be further included.
[0079] S41. Obtain the last predicted feature map output by the global average pooling layer or the fully connected layer.
[0080] S42, calculating the feature map variance of the predicted feature map, wherein the calculation formula of the feature map variance is as follows:
[0081]
[0082] Among them, the predicted feature map is represented by T∈R B×C×H×W , B represents the number of samples, C represents the number of channels of the predicted feature map, H represents the height of the predicted feature map, and W represents the width of the predicted feature map. Expand T into a two-dimensional array t∈R B×n ,n=C×H×W,v i It is represented as the feature map variance of the i-th predicted feature map.
[0083] S43, scaling the feature map variance to within a preset range, the scaling calculation formula is:
[0084]
[0085] Among them, v max Indicates v i The maximum value, v min Indicates v i The minimum value of .
[0086] S44, calculating the prediction deviation loss result by using the feature graph variance and the preset cross entropy loss function, wherein the prediction deviation loss function corresponding to the prediction deviation loss result is:
[0087]
[0088] z(v i )=exp(v i *α)―β
[0089] Among them, Loss Bias represents the prediction deviation loss result, N represents the total number of samples, y ij is the label value of whether the i-th agricultural insurance photo belongs to the k-th category, α and β are adjustable parameters, θ is the model parameter, and f j (x i ; θ) represents the prediction score of the i-th agricultural insurance photo belonging to the k-th category.
[0090] S45. Optimize the target agricultural insurance photo remake recognition model according to the prediction deviation loss result until the prediction deviation loss function converges.
[0091] The embodiment of the present application also optimizes the alarm conditions for agricultural insurance photo remakes. In the agricultural insurance claims scenario, the vast majority of images that enter the agricultural insurance photo remake recognition model are real images. Directly using simple classification results as alarm conditions may increase the false alarm rate. Ideally, the real images predicted by the agricultural insurance photo remake recognition model have higher scores and the remake images have lower scores, but in reality, there are a small number of real image difficult samples with low scores. In order to ensure the pass rate of such samples, when designing the alarm conditions, the embodiment of the present application sorts the values of the real images in the specified dimensions of the fully connected layer in the test set as scores, and uses the threshold that 99.99% of the real samples can pass as the alarm condition. Those below this threshold are judged as agricultural insurance photo remakes and alarms are issued.
[0092] The agricultural insurance photo remake recognition model training method provided in the embodiment of the present application obtains agricultural insurance photos and sets the agricultural insurance photos as training data corresponding to the target agricultural insurance photo remake recognition model; sends the training data to the first convolution layer of the target agricultural insurance photo remake recognition model, and extracts the first feature data of the agricultural insurance photo through the first convolution layer; processes the first feature data of the agricultural insurance photo in sequence through at least one preset star operation module to obtain a first feature map of the agricultural insurance photo, wherein the star operation module includes a second convolution layer, a star operation block and a convolution reconstruction module in sequence; uses a preset global average pooling layer or a fully connected layer to process the first feature map of the agricultural insurance photo to obtain an agricultural insurance photo remake recognition result, thereby improving the processing efficiency of agricultural insurance photo remake recognition and the accuracy of agricultural insurance photo remake recognition.
[0093] Please continue reading Figure 5 , Figure 5 : is a schematic diagram of the system structure of the agricultural insurance photo remake recognition model training device provided in the embodiment of the present application, such as Figure 5As shown, the agricultural insurance photo remake recognition model training device 50 includes: an agricultural insurance photo acquisition module 51, a photo feature extraction module 52, a feature map generation module 53 and a remake recognition result module 54.
[0094] The agricultural insurance photo acquisition module 51 is used to acquire agricultural insurance photos and set the agricultural insurance photos as training data corresponding to the target agricultural insurance photo remake recognition model.
[0095] The photo feature extraction module 52 is used to send the training data to the first convolution layer of the target agricultural insurance photo remake recognition model, and extract the first feature data of the agricultural insurance photo through the first convolution layer.
[0096] The feature map generation module 53 is used to process the first feature data of the agricultural insurance photo in sequence through at least one preset star operation module to obtain the first feature map of the agricultural insurance photo, wherein the star operation module includes a second convolution layer, a star operation block and a convolution reconstruction module in sequence.
[0097] The remake identification result module 54 is used to process the first feature map of the agricultural insurance photo using a preset global average pooling layer or a fully connected layer to obtain a remake identification result of the agricultural insurance photo.
[0098] As an optional implementation, the feature map generation module 53 is specifically used to send the first feature data of the agricultural insurance photo to the second convolution layer, extract at least one subspace feature data of the agricultural insurance photo through the second convolution layer; use the star operation contained in the star operation block to perform element-level multiplication fusion processing on the subspace feature data to obtain agricultural insurance photo feature fusion data; perform feature reconstruction processing on the agricultural insurance photo feature fusion data through the convolution reconstruction module to obtain the first feature map of the agricultural insurance photo.
[0099] As an optional implementation, the feature map generation module 53 is also specifically used to process the feature fusion data of the agricultural insurance photo through the channel reconstruction convolution submodule included in the convolution reconstruction module to obtain a channel reconstruction sub-feature map of the agricultural insurance photo; process the channel reconstruction sub-feature map of the agricultural insurance photo through the spatial reconstruction convolution submodule included in the convolution reconstruction module, map the obtained channel features to different feature spaces, and fuse the weight of each channel of the channel reconstruction sub-feature map to the feature space to obtain the first feature map of the agricultural insurance photo.
[0100] As an optional implementation, the feature map generation module 53 is further specifically used to process the agricultural insurance photo feature fusion data through the group normalization layer of the spatial reconstruction convolution submodule to obtain a normalized feature map of the agricultural insurance photo, wherein the group normalization processing formula contained in the group normalization layer is as follows:
[0101]
[0102] Wherein, X represents the agricultural insurance photo feature fusion data, μ represents the mean of X, σ represents the standard deviation of X, β represents the learnable affine transformation parameter, γ represents the variance of each channel of the image in the agricultural insurance photo feature fusion data, ε represents a positive number close to 0, and X out and GN(X) represent the normalized feature map of the agricultural insurance photo, GN represents the process of the group normalization layer processing; the variance of each channel of the image in the agricultural insurance photo feature fusion data is normalized to a preset range to obtain a normalized channel weight, wherein the normalized channel weight calculation formula of each channel is as follows:
[0103]
[0104] Among them, W γ and {w i} represents the normalized channel weight of each channel, C represents the total number of channels of the normalized feature map of the agricultural insurance photo, and i represents the ordinal number of each channel; the normalized channel weight and the normalized feature map of the agricultural insurance photo are processed by the preset first activation function and gate function to obtain the first full channel weight and the second full channel weight respectively, wherein the calculation formulas for obtaining the first full channel weight and the second full channel weight are as follows:
[0105] W=Gate(Sigmoid(W γ (GN(X))))
[0106] Among them, Sigmoid represents the preset first activation function, Gate represents the gate function, and W represents the first full-channel weight or the second full-channel weight; the feature fusion data of the agricultural insurance photo is multiplied by the first full-channel weight and the second full-channel weight respectively to obtain the corresponding first full-channel weight feature map and the second full-channel weight feature map respectively; the first full-channel weight feature map and the second full-channel weight feature map are divided into a first sub-feature map set and a second sub-feature map set of preset numbers respectively; the first sub-feature map set and the second sub-feature map set are cross-added, and the results of the cross-addition are connected to obtain the channel reconstruction sub-feature map of the agricultural insurance photo.
[0107] As an optional implementation, the feature map generation module 53 is further specifically used to perform convolution processing on the channel reconstruction sub-feature maps of the agricultural insurance photo respectively to obtain first spatial feature data of different feature spaces; extract second spatial feature data at the channel level from the spatial feature data through a global average pooling layer, wherein the extraction formula of the second spatial feature data is as follows:
[0108] S m =Pooling(Y m )
[0109] Among them, S m represents the second spatial feature data, Y m represents the first spatial feature data, Pooling represents the processing of the global average pooling layer, m represents the ordinal number of the different feature spaces, S m ∈R C×1×1 , C represents the total number of channels of the channel reconstruction sub-feature map; calculate the second weight of each channel in the second spatial feature data, wherein the calculation formula of the second weight is as follows:
[0110]
[0111] Among them, e represents a mathematical constant, β m represents the second weight, and n represents the total number of the different feature spaces; the second weight and the first spatial feature data are subjected to feature fusion processing to obtain the first feature map of the agricultural insurance photo, wherein the calculation formula for the feature fusion processing is as follows:
[0112]
[0113] Wherein, Y represents the first characteristic image of the agricultural insurance photo.
[0114] As an optional implementation, the remake recognition result module 54 is further used to obtain the last predicted feature map output by the global average pooling layer or the fully connected layer; calculate the feature map variance of the predicted feature map, wherein the calculation formula of the feature map variance is as follows:
[0115]
[0116] Among them, the predicted feature map is represented by T∈R B×C×H×W , B represents the number of samples, C represents the number of channels of the predicted feature map, H represents the height of the predicted feature map, W represents the width of the predicted feature map, and T is expanded into a two-dimensional array t∈R B×n ,n=C×H×W,v i It is represented as the feature map variance of the i-th predicted feature map; scaling the feature map variance to within a preset range, and the scaling calculation formula is:
[0117]
[0118] Among them, v max Indicates the v i The maximum value, v min Indicates the v iThe minimum value of ; the prediction deviation loss result is calculated by the feature map variance and the preset cross entropy loss function, wherein the prediction deviation loss function corresponding to the prediction deviation loss result is:
[0119]
[0120] z(v i )=exp(v i *α)―β
[0121] Among them, Loss Bias represents the prediction deviation loss result, N represents the total number of samples, y ij is the label value of whether the i-th agricultural insurance photo belongs to the k-th category, α and β are adjustable parameters, θ is the model parameter, and f j (x i ; θ) represents the predicted score that the ith agricultural insurance photo belongs to the kth category; the target agricultural insurance photo remake recognition model is optimized according to the predicted deviation loss result until the predicted deviation loss function converges.
[0122] The embodiment of the present application also provides a device for identifying duplicate photos of agricultural insurance, which includes an agricultural insurance photo model training module and an agricultural insurance photo model operation module. The agricultural insurance photo model training module is used to construct an initial agricultural insurance photo duplicate recognition model, and the initial agricultural insurance photo duplicate recognition model is trained by the agricultural insurance photo duplicate recognition model training method described in the above embodiment to obtain a target agricultural insurance photo duplicate recognition model. The agricultural insurance photo model operation module is used to receive agricultural insurance photos to be identified, send the agricultural insurance photos to be identified to the target agricultural insurance photo duplicate recognition model, and obtain corresponding agricultural insurance photo recognition results.
[0123] It should be noted that the above-mentioned agricultural insurance photo remake identification device and agricultural insurance photo remake identification device can correspondingly execute the agricultural insurance photo remake identification method and agricultural insurance photo remake identification method provided in the embodiments of the present application, and have the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in the agricultural insurance photo remake identification device and agricultural insurance photo remake identification device embodiments, please refer to the agricultural insurance photo remake identification method and agricultural insurance photo remake identification method provided in the embodiments of the present application.
[0124] Please continue reading Figure 6 , Figure 6 is a hardware structure diagram of an electronic device 600 for executing an agricultural insurance photo remake recognition model training method or an agricultural insurance photo remake recognition method provided in an embodiment of the present application, such as Figure 6 As shown, the electronic device 600 includes:
[0125] One or more processors 610 and memory 620, Figure 6 A processor 610 is taken as an example.
[0126] The processor 610 and the memory 620 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0127] The memory 620 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as the agricultural risk photo remake recognition model training method or agricultural risk photo remake recognition method in the embodiment of the present application. The processor 610 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 620, that is, the agricultural risk photo remake recognition model training method or agricultural risk photo remake recognition method in the above method embodiment is implemented.
[0128] The memory 620 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the agricultural insurance photo remake recognition model training device, etc. In addition, the memory 620 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 620 may optionally include a memory remotely arranged relative to the processor 610, and these remote memories may be connected to the agricultural insurance photo remake recognition model training device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0129] The one or more modules are stored in the memory 620, and when executed by the one or more processors 610, the agricultural insurance photo remake recognition model training method or agricultural insurance photo remake recognition method in any of the above method embodiments is executed, for example, the above described Figure 2 Steps S1 to S4 of the method, and implementation Figure 5 The functions of modules 51-54 in.
[0130] The above-mentioned product can execute the method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided in the embodiment of the present application.
[0131] The embodiment of the present application provides a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, such as Figure 6A processor 610 in the embodiment may enable the one or more processors to execute the agricultural insurance photo remake recognition model training method or agricultural insurance photo remake recognition method in any of the above method embodiments, for example, to execute the above described Figure 2 Steps S1 to S4 of the method, and implementation Figure 5 The functions of modules 51-54 in.
[0132] The present application provides a computer program product, wherein the computer program product includes a computer program stored on a non-volatile computer-readable storage medium, wherein the computer program includes program instructions, and when the program instructions are executed by the electronic device, the electronic device is enabled to execute the agricultural risk photo remake recognition model training method or agricultural risk photo remake recognition method in any of the above method embodiments, for example, to execute the above described Figure 2 Steps S1 to S4 of the method, and implementation Figure 5 The functions of modules 51-54 in.
[0133] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0134] Through the description of the above implementation methods, ordinary technicians in this field can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Ordinary technicians in this field can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as described above, which are not provided in detail for the sake of simplicity. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for training a model for identifying agricultural insurance photo remakes, characterized in that: include: Acquire agricultural insurance photos, and set the agricultural insurance photos as training data corresponding to a target agricultural insurance photo remake recognition model; Sending the training data to the first convolutional layer of the target agricultural insurance photo remake recognition model, and extracting the first feature data of the agricultural insurance photo through the first convolutional layer; Processing the first feature data of the agricultural insurance photo in sequence through at least one preset star operation module to obtain a first feature map of the agricultural insurance photo, wherein the star operation module includes a second convolution layer, a star operation block and a convolution reconstruction module in sequence; The first feature map of the agricultural insurance photo is processed using a preset global average pooling layer or a fully connected layer to obtain an agricultural insurance photo remake identification result.
2. The agricultural insurance photo remake recognition model training method according to claim 1 is characterized in that: The step of sequentially processing the first characteristic data of the agricultural insurance photo by at least one preset star operation module to obtain the first characteristic graph of the agricultural insurance photo includes: Sending the first feature data of the agricultural insurance photo to the second convolutional layer, and extracting at least one subspace feature data of the agricultural insurance photo through the second convolutional layer; Using the star operation included in the star operation block to perform element-level multiplication fusion processing on the subspace feature data to obtain agricultural insurance photo feature fusion data; The convolution reconstruction module performs feature reconstruction processing on the feature fusion data of the agricultural insurance photo to obtain the first feature map of the agricultural insurance photo.
3. The agricultural insurance photo remake recognition model training method according to claim 2 is characterized in that: The step of performing feature reconstruction processing on the agricultural insurance photo feature fusion data through the convolution reconstruction module to obtain the first feature map of the agricultural insurance photo includes: Processing the agricultural insurance photo feature fusion data through the channel reconstruction convolution submodule included in the convolution reconstruction module to obtain a channel reconstruction sub-feature map of the agricultural insurance photo; The channel reconstruction sub-feature map of the agricultural insurance photo is processed by the spatial reconstruction convolution submodule included in the convolution reconstruction module, the obtained channel features are mapped to different feature spaces, and the weight of each channel of the channel reconstruction sub-feature map is fused to the feature space to obtain the first feature map of the agricultural insurance photo.
4. The agricultural insurance photo remake recognition model training method according to claim 3 is characterized in that: The step of processing the agricultural insurance photo feature fusion data through the channel reconstruction convolution submodule included in the convolution reconstruction module to obtain the channel reconstruction sub-feature map of the agricultural insurance photo includes: The agricultural insurance photo feature fusion data is processed by the group normalization layer of the spatial reconstruction convolution submodule to obtain a normalized feature map of the agricultural insurance photo, wherein the group normalization processing formula included in the group normalization layer is as follows: Wherein, X represents the agricultural insurance photo feature fusion data, μ represents the mean of X, σ represents the standard deviation of x, β represents the learnable affine transformation parameter, γ represents the variance of each channel of the image in the agricultural insurance photo feature fusion data, ε represents a positive number close to 0, and X out and GN(X) represents the normalized feature map of the agricultural insurance photo, and GN represents the process of the group normalization layer processing; The variance of each channel of the image in the agricultural insurance photo feature fusion data is normalized to a preset range to obtain a normalized channel weight, wherein the normalized channel weight calculation formula of each channel is as follows: Among them, W γ and {w i } represents the normalized channel weight of each channel, C represents the total number of channels of the normalized feature map of the agricultural insurance photo, and i represents the ordinal number of each channel; The normalized channel weight and the normalized feature map of the agricultural insurance photo are processed by a preset first activation function and a gate function to obtain a first full channel weight and a second full channel weight, respectively, wherein the calculation formulas for obtaining the first full channel weight and the second full channel weight are as follows: W=Gate(Sigmoid(W γ (GN(X)))) Wherein, Sigmoid represents the preset first activation function, Gate represents the gate function, and W represents the first full channel weight or the second full channel weight; Multiplying the agricultural insurance photo feature fusion data by the first full-channel weight and the second full-channel weight, respectively, to obtain corresponding first full-channel weight feature maps and second full-channel weight feature maps; Dividing the first full-channel weight feature map and the second full-channel weight feature map into a first sub-feature map set and a second sub-feature map set of preset numbers respectively; The first sub-feature map set and the second sub-feature map set are cross-added, and the results of the cross-addition are connected to obtain the channel reconstruction sub-feature map of the agricultural insurance photo.
5. The agricultural insurance photo remake recognition model training method according to claim 3 is characterized in that: The step of processing the channel reconstruction sub-feature map of the agricultural insurance photo by the spatial reconstruction convolution sub-module included in the convolution reconstruction module, mapping the obtained channel features to different feature spaces, and fusing the weight of each channel of the channel reconstruction sub-feature map to the feature space to obtain the first feature map of the agricultural insurance photo includes: Convolution processing is performed on the channel reconstruction sub-feature graphs of the agricultural insurance photo to obtain first spatial feature data of different feature spaces; The second spatial feature data at the channel level is extracted from the spatial feature data through a global average pooling layer, wherein the extraction formula of the second spatial feature data is as follows: S m =Pooling(Y m ) Among them, S m represents the second spatial feature data, Y m represents the first spatial feature data, Pooling represents the processing of the global average pooling layer, m represents the ordinal number of the different feature spaces, S m ∈R c×1×1 , C represents the total number of channels of the channel reconstruction sub-feature map; Calculate the second weight of each channel in the second spatial feature data, wherein the calculation formula of the second weight is as follows: Among them, e represents a mathematical constant, β m represents the second weight, and n represents the total number of the different feature spaces; The second weight and the first spatial feature data are subjected to feature fusion processing to obtain the first feature map of the agricultural insurance photo, wherein the calculation formula of the feature fusion processing is as follows: Wherein, Y represents the first characteristic image of the agricultural insurance photo.
6. The agricultural insurance photo remake recognition model training method according to claim 1, characterized in that: After the step of using a preset global average pooling layer or a fully connected layer to process the first feature map of the agricultural insurance photo to obtain the agricultural insurance photo remake identification result, the method further includes: Obtaining the last predicted feature map output by the global average pooling layer or the fully connected layer; The feature map variance of the predicted feature map is calculated, wherein the calculation formula of the feature map variance is as follows: Among them, the predicted feature map is represented by T∈R B×C×H×W , B represents the number of samples, C represents the number of channels of the predicted feature map, H represents the height of the predicted feature map, W represents the width of the predicted feature map, and T is expanded into a two-dimensional array t∈R B×n , n=C×H×W,v i It is represented as the feature map variance of the i-th predicted feature map; The feature map variance is scaled to within a preset range, and the scaling calculation formula is: Among them, v max Indicates the v i The maximum value, v min Indicates the v i The minimum value of The prediction deviation loss result is calculated by using the feature graph variance and a preset cross entropy loss function, wherein the prediction deviation loss function corresponding to the prediction deviation loss result is: from(in i )=exp(v i *α)-β Among them, Loss Bias represents the prediction deviation loss result, N represents the total number of samples, y ij is the label value of whether the i-th agricultural insurance photo belongs to the k-th category, α and β are adjustable parameters, θ is the model parameter, and f j (x i ; θ) represents the prediction score of the i-th agricultural insurance photo belonging to the k-th category; The target agricultural insurance photo remake recognition model is optimized according to the predicted deviation loss result until the predicted deviation loss function converges.
7. A method for identifying agricultural insurance photo remakes, characterized in that: include: Constructing an initial agricultural insurance photo remake recognition model, and training the initial agricultural insurance photo remake recognition model by the agricultural insurance photo remake recognition model training method according to any one of claims 1 to 6 to obtain a target agricultural insurance photo remake recognition model; Receive the agricultural insurance photo to be identified, send the agricultural insurance photo to be identified to the target agricultural insurance photo re-shooting recognition model, and obtain the corresponding agricultural insurance photo recognition result.
8. A model training device for agricultural insurance photo remake recognition, characterized in that: include: An agricultural insurance photo acquisition module, used to acquire agricultural insurance photos and set the agricultural insurance photos as training data corresponding to a target agricultural insurance photo remake recognition model; A photo feature extraction module, used to send the training data to the first convolution layer of the target agricultural insurance photo remake recognition model, and extract the first feature data of the agricultural insurance photo through the first convolution layer; A feature map generation module, used to process the first feature data of the agricultural insurance photo in sequence through at least one preset star operation module to obtain a first feature map of the agricultural insurance photo, wherein the star operation module includes a second convolution layer, a star operation block and a convolution reconstruction module in sequence; The copy recognition result module is used to use a preset global average pooling layer or a fully connected layer to process the first feature map of the agricultural insurance photo to obtain a copy recognition result of the agricultural insurance photo.
9. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the agricultural insurance photo remake recognition model training method described in any one of claims 1-6, or the agricultural insurance photo remake recognition method described in claim 7.
10. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed by an electronic device, the electronic device executes the agricultural insurance photo remake recognition model training method described in any one of claims 1 to 6, or the agricultural insurance photo remake recognition method described in claim 7.