Model training method and device based on federated learning

By using the client's proportion of positive and negative samples to set weights in the federated learning method in the field of autonomous driving, fair aggregation of road point cloud data is achieved, issues of data compliance and privacy protection are solved, and the accuracy of the road sign extraction model is improved. degree and fairness.

CN114387580BActive Publication Date: 2024-10-18XIAMEN ZHIHENG RONGXING INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210010060.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-06
Publication Date
2024-10-18
Estimated Expiration
2042-01-06

AI Technical Summary

Technical Problem

In the field of autonomous driving, the compliant use and joint training of road point cloud data face technical challenges. In particular, due to commercial confidentiality and privacy protection reasons, autonomous driving companies are unwilling to disclose their extraction algorithm models and training data, resulting in the failure of road sign extraction tasks. Joint training is not effective.

Method used

Using a model training method based on federated learning, weights are set based on the proportion of positive and negative samples of each client to achieve fair aggregation of clients, thereby improving the accuracy and fairness of the federated learning model. Specific steps include collecting three-dimensional point cloud data, preprocessing it into two-dimensional grayscale block images, training model parameters, calculating weights based on the number of pixels of road signs for weighted averaging, and updating the global model.

Benefits of technology

Through this method, fair aggregation of clients is achieved, the accuracy and fairness of the federated learning model are improved, the issues of data compliance utilization and privacy protection are solved, and the effect of the road sign extraction algorithm is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114387580B_ABST
    Figure CN114387580B_ABST
Patent Text Reader

Abstract

The present invention discloses a model training method and device based on federated learning, wherein the method comprises: collecting three-dimensional point cloud data corresponding to each client for preprocessing to obtain corresponding two-dimensional grayscale block images of road point clouds; obtaining a global model on a server side, and training and calculating the global model according to the two-dimensional grayscale block images of road point clouds to obtain model parameters and road sign weights corresponding to each client, and sending the model parameters and road sign weights corresponding to each client to the server side to perform weighted averaging on the model corresponding to each client to obtain an updated global model, and sending the updated global model to each client for the next round of model update, until a road sign extraction model is obtained after a maximum number of communication rounds is reached; thereby, weights are set by the proportion of positive and negative samples of each client, thereby achieving fair aggregation of clients, thereby improving the accuracy and fairness of the federated learning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning technology, and in particular to a model training method based on federated learning, a computer-readable storage medium, a computer device, and a model training apparatus based on federated learning. Background Art

[0002] With the rapid development of information technology today, models trained by machine learning algorithms on massive data are being applied in all walks of life. However, with the improvement of people's privacy awareness and the implementation of relevant laws, directly obtaining user data for training models may no longer be feasible. Federated learning, as a distributed machine learning paradigm with privacy protection capabilities, has emerged. It no longer requires users to upload data, but only exchanges encrypted model parameters, which can not only use user data and computing power to collaboratively train a model, but also protect the privacy of user data.

[0003] Among the related technologies, the road sign extraction task is crucial in applications such as high-precision navigation of autonomous driving; however, the compliant use and joint training of road point cloud data still face technical challenges. For example, autonomous driving companies are reluctant to disclose their respective extracted algorithm models and training data due to commercial confidentiality and privacy protection. Therefore, how to design a road sign extraction algorithm that supports compliant use of data and improves the effect of joint training is crucial. Summary of the invention

[0004] The present invention aims to solve at least one of the technical problems in the above-mentioned technology to a certain extent. To this end, one object of the present invention is to propose a model training method based on federated learning, which sets weights by the proportion of positive and negative samples of each client, thereby achieving fair aggregation of clients and improving the accuracy and fairness of the federated learning model.

[0005] A second object of the present invention is to provide a computer-readable storage medium.

[0006] A third object of the present invention is to provide a computer device.

[0007] The fourth objective of the present invention is to propose a model training device based on federated learning.

[0008] To achieve the above-mentioned purpose, the first aspect of the embodiment of the present invention proposes a model training method based on federated learning, comprising the following steps: collecting three-dimensional point cloud data corresponding to each client, and preprocessing the three-dimensional point cloud data to obtain the corresponding two-dimensional grayscale block image of the road point cloud, and using the two-dimensional grayscale block image of the road point cloud corresponding to each client as the data set corresponding to each client; in each round of communication, obtaining the global model of the server side, and training the global model according to the data set corresponding to each client to obtain the model parameters corresponding to each client; calculating the road sign weight corresponding to each client according to the number of pixels of the road sign in each client, and sending the model parameters and road sign weight corresponding to each client to the server side; the server side performs weighted averaging according to the model parameters and road sign weight corresponding to each client to obtain an updated global model, and sends the updated global model to each client for the next round of model update, until the road sign extraction model is obtained after the maximum number of communication rounds is reached.

[0009] According to the model training method based on federated learning in an embodiment of the present invention, first, the three-dimensional point cloud data corresponding to each client is collected, and the three-dimensional point cloud data is preprocessed to obtain the corresponding two-dimensional grayscale block image of the road point cloud, and the two-dimensional grayscale block image of the road point cloud corresponding to each client is used as the data set corresponding to each client; then, in each round of communication, the global model of the server is obtained, and the global model is trained according to the data set corresponding to each client to obtain the model parameters corresponding to each client; then, the road sign weight corresponding to each client is calculated according to the number of pixels of the road sign in each client, and the model parameters and road sign weight corresponding to each client are sent to the server; then, the server performs weighted averaging according to the model parameters and road sign weight corresponding to each client to obtain an updated global model, and sends the updated global model to each client for the next round of model update, until the road sign extraction model is obtained after the maximum number of communication rounds is reached; thus, the weights are set by the proportion of positive and negative samples of each client, so as to achieve fair aggregation of the clients, thereby improving the accuracy and fairness of the federated learning model.

[0010] In addition, the model training method based on federated learning proposed in the above embodiment of the present invention may also have the following additional technical features:

[0011] Optionally, the three-dimensional point cloud data corresponding to each client is collected, and the three-dimensional point cloud data is preprocessed to obtain a corresponding two-dimensional grayscale block image of the road point cloud, including: projecting the collected three-dimensional point cloud data onto the road plane to obtain a plane point cloud; gridding the plane point cloud; taking each grid unit as a basic pixel point according to a preset area, taking the average reflection intensity in the area as the grayscale, and generating a two-dimensional grayscale block image; filtering the two-dimensional grayscale block image of non-road point clouds in the two-dimensional grayscale block image to obtain the two-dimensional grayscale block image of the road point cloud.

[0012] Optionally, the road sign weight is calculated according to the following formula:

[0013]

[0014] Among them, w i represents the road sign weight corresponding to the i-th client, n represents the number of clients, and the NP function is defined as follows:

[0015]

[0016] Among them, RMPixel k represents the number of pixels of all road signs in the kth image, M represents the number of images of the ith client, and S represents the total number of pixels in each image.

[0017] Optionally, the loss function used in the training process is Focal Loss, which is calculated according to the following formula:

[0018]

[0019] Among them, p represents the probability of the model prediction being positive, y represents the category predicted by the model (0,1), and w f and m f It is represented as a manually adjusted parameter to balance the positive and negative sample losses.

[0020] To achieve the above objectives, a second aspect of the present invention proposes a computer-readable storage medium on which a model training program based on federated learning is stored. When the model training program based on federated learning is executed by a processor, the model training method based on federated learning as described above is implemented.

[0021] According to the computer-readable storage medium of an embodiment of the present invention, by storing a model training program based on federated learning, the processor implements the model training method based on federated learning as described above when executing the model training program based on federated learning. Thus, weights are set by the proportion of positive and negative samples of each client, thereby achieving fair aggregation of clients, thereby improving the accuracy and fairness of the federated learning model.

[0022] To achieve the above objectives, the third aspect of the present invention proposes a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the model training method based on federated learning as described above is implemented.

[0023] According to the computer device of an embodiment of the present invention, the model training program based on federated learning is stored in the memory, so that when the processor executes the model training program based on federated learning, the model training method based on federated learning as described above is implemented. Thus, weights are set by the proportion of positive and negative samples of each client, thereby achieving fair aggregation of the clients, thereby improving the accuracy and fairness of the federated learning model.

[0024] To achieve the above-mentioned purpose, the fourth aspect of the present invention proposes a model training device based on federated learning, including: a preprocessing module, the preprocessing module is used to collect three-dimensional point cloud data corresponding to each client, and preprocess the three-dimensional point cloud data to obtain the corresponding two-dimensional grayscale block image of the road point cloud, and use the two-dimensional grayscale block image of the road point cloud corresponding to each client as the data set corresponding to each client; a local training module, the local training module is used to obtain the global model of the server side in each round of communication, and train the global model according to the data set corresponding to each client to obtain the model parameters corresponding to each client; a weight calculation module, the weight calculation module is used to calculate the road sign weight corresponding to each client according to the number of pixels of the road sign in each client, and send the model parameters and road sign weight corresponding to each client to the server side; a model aggregation module, the model aggregation module is used to perform weighted averaging according to the model parameters and road sign weights corresponding to each client to obtain an updated global model; and send the updated global model to each client for the next round of model update until the road sign extraction model is obtained after the maximum number of communication rounds is reached.

[0025] According to a model training device based on federated learning in an embodiment of the present invention, a preprocessing module collects three-dimensional point cloud data corresponding to each client, and preprocesses the three-dimensional point cloud data to obtain a corresponding two-dimensional grayscale block image of a road point cloud, and uses the two-dimensional grayscale block image of a road point cloud corresponding to each client as a data set corresponding to each client; a local training module obtains a global model of a server in each round of communication, and trains the global model according to a data set corresponding to each client to obtain a model parameter corresponding to each client; a weight calculation module calculates a road sign weight corresponding to each client according to the number of pixels of the road sign in each client, and sends the model parameters and road sign weight corresponding to each client to the server; a model aggregation module performs weighted averaging according to the model parameters and road sign weight corresponding to each client to obtain an updated global model; and the updated global model is sent to each client for the next round of model update, until a road sign extraction model is obtained after a maximum number of communication rounds is reached; thereby, weights are set by the proportion of positive and negative samples of each client, so that fair aggregation of clients is achieved, thereby improving the accuracy and fairness of the federated learning model. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A schematic diagram of a flow chart of a model training method based on federated learning according to an embodiment of the present invention;

[0027] Figure 2 A flowchart of a model training method based on federated learning according to an embodiment of the present invention;

[0028] Figure 3 A framework diagram of a model training method based on federated learning according to an embodiment of the present invention;

[0029] Figure 4 4 is a block diagram of a model training device based on federated learning according to an embodiment of the present invention. DETAILED DESCRIPTION

[0030] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0031] In order to better understand the above technical solution, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0032] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0033] Figure 1 FIG. 1 is a flow chart of a model training method based on federated learning according to an embodiment of the present invention. Figure 1 As shown, the model training method based on federated learning includes the following steps:

[0034] S101, collecting the three-dimensional point cloud data corresponding to each client, and preprocessing the three-dimensional point cloud data to obtain the corresponding two-dimensional grayscale block image of the road point cloud, and using the two-dimensional grayscale block image of the road point cloud corresponding to each client as the data set corresponding to each client.

[0035] That is to say, Figure 2 As shown, there are multiple clients, and each client collects a set of three-dimensional point cloud data.

[0036] As an embodiment, the collected three-dimensional point cloud data is projected onto the road plane to obtain a plane point cloud; the plane point cloud is gridded; each grid unit is used as a basic pixel point according to a preset area, the average reflection intensity in the area is taken as the grayscale, and a two-dimensional grayscale block image is generated; the two-dimensional grayscale block image of non-road point clouds in the two-dimensional grayscale block image is filtered to obtain a two-dimensional grayscale block image of the road point cloud.

[0037] It should be noted that there may be three situations in the two-dimensional grayscale block image, one is that there is no road point cloud at all, one is that it is all road point cloud, and one is that some of it is road point cloud and some of it is not road point cloud. The two-dimensional grayscale block image filtered here is the one with no road point cloud at all.

[0038] As a specific embodiment, the three-dimensional point cloud is first projected onto the road plane, that is, the elevation values ​​of all point cloud coordinates are set to zero; then the plane point cloud is gridded according to a size of 10m*10m; then each grid unit is 5cm*5cm as a basic pixel point, the average reflection intensity in the area is taken as the grayscale, and a two-dimensional grayscale block image is generated; finally, the block image of the non-road point cloud is filtered according to the threshold, so as to obtain a two-dimensional grayscale block image of the road point cloud.

[0039] S102, in each round of communication, obtain the global model of the server side, and train the global model according to the data set corresponding to each client to obtain the model parameters corresponding to each client.

[0040] As an example, Figure 3 As shown, first, in round r, client i receives the model θ from the server. r ; Client i uses the local dataset D i , repeat the training of model θ with learning rate η and batch size B r There are E local rounds in total, the backbone network is U-net, and the loss function uses the Focal Loss optimization function to obtain the model parameters corresponding to each client.

[0041] As a specific embodiment, the loss function Focal Loss of local training is calculated as follows:

[0042]

[0043] Where p is the probability of the model predicting a positive value, y is the category predicted by the model (0,1); w f and m f These are manually adjusted parameters to balance the loss of positive and negative samples.

[0044] That is, if y = 1 then If y=0 then

[0045]

[0046] It should be noted that due to the different ratios of positive and negative samples in each client, the samples are unbalanced. By setting focalloss, the loss differences caused by the different difficulty and easy samples of each client can be balanced, so as to further achieve fair aggregation of clients and improve the accuracy and fairness of the federated learning model.

[0047] S103, calculating the road sign weight corresponding to each client according to the number of pixels of the road sign in each client, and sending the model parameters and road sign weight corresponding to each client to the server.

[0048] As an example, Figure 3 As shown, the road sign weight corresponding to each client is calculated by using the two-dimensional grayscale block image of the road point cloud corresponding to each client obtained after preprocessing.

[0049] As an example, the road sign weight is calculated according to the following formula:

[0050]

[0051] Among them, w i represents the road sign weight corresponding to the i-th client, n represents the number of clients, and the NP function is defined as follows:

[0052]

[0053] Among them, RMPixel k represents the number of pixels of all road signs in the kth image, M represents the number of images of the ith client, and S represents the total number of pixels in each image.

[0054] S104, the server performs weighted averaging based on the model parameters and road sign weights corresponding to each client to obtain an updated global model, and sends the updated global model to each client for the next round of model update, until the maximum number of communication rounds is reached to obtain the road sign extraction model.

[0055] That is to say, the server aggregates the model uploaded by each client and transmits it back to each client for a new round of model update until the maximum number of communication rounds is reached to obtain the final road sign extraction model. It should be noted that the number of communication rounds is set according to actual needs.

[0056] To summarize, in each round of communication, the client first calculates the proportion of road signs in all pictures, and then uses the u-net framework to train the model locally; by setting the focal loss, the sample imbalance problem caused by the different proportions of positive and negative samples of each client is balanced; the server obtains the model parameters uploaded by each client and the positive sample proportion of each client, and the server assigns weights according to the positive sample proportion of each client, and updates the global model accordingly; the server sends the global model back to each client so that each client can enter the next round of model update; thus, by calculating the proportion of positive and negative samples of each client in order to set the weight, and selecting the focal loss to balance the loss difference caused by the different difficulty samples of each client, the fair aggregation of clients is achieved, thereby improving the accuracy and fairness of the federated learning model.

[0057] In order to implement the above-mentioned embodiment, an embodiment of the present invention proposes a computer-readable storage medium, on which a model training program based on federated learning is stored. When the model training program based on federated learning is executed by a processor, the model training method based on federated learning as described above is implemented.

[0058] According to the computer-readable storage medium of an embodiment of the present invention, by storing a model training program based on federated learning, the processor implements the model training method based on federated learning as described above when executing the model training program based on federated learning. Thus, weights are set by the proportion of positive and negative samples of each client, thereby achieving fair aggregation of clients, thereby improving the accuracy and fairness of the federated learning model.

[0059] In order to implement the above-mentioned embodiment, an embodiment of the present invention proposes a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the model training method based on federated learning as described above is implemented.

[0060] According to the computer device of an embodiment of the present invention, the model training program based on federated learning is stored in the memory, so that when the processor executes the model training program based on federated learning, the model training method based on federated learning as described above is implemented. Thus, weights are set by the proportion of positive and negative samples of each client, thereby achieving fair aggregation of the clients, thereby improving the accuracy and fairness of the federated learning model.

[0061] In order to implement the above embodiment, the embodiment of the present invention also proposes a model training device based on federated learning, such as Figure 4 As shown, the model training device based on federated learning includes: a preprocessing module 10, a local training module 20, a weight calculation module 30 and a model aggregation module 40.

[0062] The preprocessing module 10 is used to collect the three-dimensional point cloud data corresponding to each client, and preprocess the three-dimensional point cloud data to obtain the corresponding two-dimensional grayscale block image of the road point cloud, and use the two-dimensional grayscale block image of the road point cloud corresponding to each client as the data set corresponding to each client;

[0063] The local training module 20 is used to obtain the global model of the server in each round of communication, and train the global model according to the data set corresponding to each client to obtain the model parameters corresponding to each client;

[0064] The weight calculation module 30 is used to calculate the road sign weight corresponding to each client according to the number of pixels of the road sign in each client, and send the model parameters and road sign weight corresponding to each client to the server;

[0065] The model aggregation module 40 is used to perform weighted averaging based on the model parameters and road sign weights corresponding to each client to obtain an updated global model; and send the updated global model to each client for the next round of model update until the road sign extraction model is obtained after the maximum number of communication rounds is reached.

[0066] As an embodiment, the preprocessing module is also used to: project the collected three-dimensional point cloud data onto the road plane to obtain a plane point cloud; grid the plane point cloud; use each grid unit as a basic pixel point according to a preset area, take the average reflection intensity in the area as the grayscale, and generate a two-dimensional grayscale block image; filter the two-dimensional grayscale block image of non-road point clouds in the two-dimensional grayscale block image to obtain a two-dimensional grayscale block image of the road point cloud.

[0067] As an example, the road sign weight is calculated according to the following formula:

[0068]

[0069] Among them, w i represents the road sign weight corresponding to the i-th client, n represents the number of clients, and the NP function is defined as follows:

[0070]

[0071] Among them, RMPixel k represents the number of pixels of all road signs in the kth image, M represents the number of images of the ith client, and S represents the total number of pixels in each image.

[0072] As an embodiment, the loss function used in the training process is Focal Loss, which is calculated according to the following formula:

[0073]

[0074] Among them, p represents the probability of the model prediction being positive, y represents the category predicted by the model (0,1), and w f and m f It is represented as a manually adjusted parameter to balance the positive and negative sample losses.

[0075] In summary, according to a model training device based on federated learning in an embodiment of the present invention, the three-dimensional point cloud data corresponding to each client is collected through a preprocessing module, and the three-dimensional point cloud data is preprocessed to obtain the corresponding two-dimensional grayscale block image of the road point cloud, and the two-dimensional grayscale block image of the road point cloud corresponding to each client is used as the data set corresponding to each client; the local training module obtains the global model of the server in each round of communication, and trains the global model according to the data set corresponding to each client to obtain the model parameters corresponding to each client; the weight calculation module calculates the road sign weight corresponding to each client according to the number of pixels of the road sign in each client, and sends the model parameters and road sign weight corresponding to each client to the server; the model aggregation module performs weighted averaging according to the model parameters and road sign weights corresponding to each client to obtain an updated global model; and the updated global model is sent to each client for the next round of model update until the road sign extraction model is obtained after the maximum number of communication rounds is reached; thus, the weights are set by the proportion of positive and negative samples of each client, so as to achieve fair aggregation of the clients, thereby improving the accuracy and fairness of the federated learning model.

[0076] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0077] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0078] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0079] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0080] It should be noted that in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claim. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0081] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0082] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

[0083] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0084] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0085] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0086] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms should not be understood as necessarily referring to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0087] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A model training method based on federated learning, It is characterized in that The following steps are involved: Collecting the three-dimensional point cloud data corresponding to each client, and preprocessing the three-dimensional point cloud data to obtain the corresponding two-dimensional grayscale block image of the road point cloud, and using the two-dimensional grayscale block image of the road point cloud corresponding to each client as the data set corresponding to each client; In each round of communication, a global model of the server is obtained, and the global model is trained according to the data set corresponding to each client to obtain the model parameters corresponding to each client; Calculating the road sign weight corresponding to each client according to the number of pixels of the road sign in each client, and sending the model parameters and road sign weight corresponding to each client to the server; The server performs weighted averaging according to the model parameters and road sign weights corresponding to each client to obtain an updated global model, and sends the updated global model to each client for the next round of model update, until a road sign extraction model is obtained after a maximum number of communication rounds is reached; The road sign weight is calculated according to the following formula: Among them, w i represents the road sign weight corresponding to the i-th client, n represents the number of clients, and the NP function is defined as follows: Among them, RMPixel k Indicates the number of pixels of all road signs in the kth image, M i represents the number of images of the i-th client, and S represents the total number of pixels of each image.

2. The model training method based on federated learning as claimed in claim 1, It is characterized in that Collect the three-dimensional point cloud data corresponding to each client, and pre-process the three-dimensional point cloud data to obtain the corresponding two-dimensional grayscale block image of the road point cloud, including: Projecting the collected three-dimensional point cloud data onto a road plane to obtain a plane point cloud; Meshing the plane point cloud; Each grid unit is taken as a basic pixel point according to a preset area, the mean reflection intensity in the area is taken as the grayscale, and a two-dimensional grayscale block image is generated; The two-dimensional grayscale block images of non-road point clouds in the two-dimensional grayscale block images are filtered to obtain the two-dimensional grayscale block images of the road point cloud.

3. The model training method based on federated learning as claimed in claim 2, It is characterized in that The loss function used in the training process is Focal Loss, which is calculated according to the following formula: Among them, p represents the probability of the model prediction being positive, y represents the category predicted by the model (0,1), and w f and m f It is represented as a manually adjusted parameter to balance the positive and negative sample losses.

4. A computer-readable storage medium, It is characterized in that A model training program based on federated learning is stored thereon, and when the model training program based on federated learning is executed by a processor, the model training method based on federated learning as described in any one of claims 1-3 is implemented.

5. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, it implements the model training method based on federated learning as described in any one of claims 1-3.

6. A model training device based on federated learning, It is characterized in that include: A preprocessing module, the preprocessing module is used to collect the three-dimensional point cloud data corresponding to each client, and preprocess the three-dimensional point cloud data to obtain the corresponding two-dimensional grayscale block image of the road point cloud, and use the two-dimensional grayscale block image of the road point cloud corresponding to each client as the data set corresponding to each client; A local training module, wherein the local training module is used to obtain a global model on the server side in each round of communication, and train the global model according to a data set corresponding to each client to obtain a model parameter corresponding to each client; A weight calculation module, the weight calculation module is used to calculate the road sign weight corresponding to each client according to the number of pixels of the road sign in each client, and send the model parameters and road sign weight corresponding to each client to the server; A model aggregation module, the model aggregation module is used to perform weighted averaging according to the model parameters and road sign weights corresponding to each client to obtain an updated global model; and send the updated global model to each client for the next round of model update, until a road sign extraction model is obtained after a maximum number of communication rounds is reached; The road sign weight is calculated according to the following formula: Among them, w i represents the road sign weight corresponding to the i-th client, n represents the number of clients, and the NP function is defined as follows: Among them, RMPixel k Indicates the number of pixels of all road signs in the kth image, M i represents the number of images of the i-th client, and S represents the total number of pixels of each image.

7. The model training device based on federated learning as claimed in claim 6, It is characterized in that The preprocessing module is also used for: Projecting the collected three-dimensional point cloud data onto a road plane to obtain a plane point cloud; Meshing the plane point cloud; Each grid unit is taken as a basic pixel point according to a preset area, the mean reflection intensity in the area is taken as the grayscale, and a two-dimensional grayscale block image is generated; The two-dimensional grayscale block images of non-road point clouds in the two-dimensional grayscale block images are filtered to obtain the two-dimensional grayscale block images of the road point cloud.

8. The model training device based on federated learning as claimed in claim 7, It is characterized in that The loss function used in the training process is Focal Loss, which is calculated according to the following formula: Among them, p represents the probability of the model prediction being positive, y represents the category predicted by the model (0,1), and w f and m f It is represented as a manually adjusted parameter to balance the positive and negative sample losses.

Citation Information

Patent Citations

  • Cancer hyperspectral image segmentation method and system based on double-branch attention deep learning

    CN111667489A

  • Electromagnetic signal intelligent cooperative identification method and system

    CN111967309A