CN115908972A - Expansion method and device of tree species sample set, electronic equipment and medium - Google Patents
Expansion method and device of tree species sample set, electronic equipment and medium Download PDFInfo
- Publication number
- CN115908972A CN115908972A CN202211411510.9A CN202211411510A CN115908972A CN 115908972 A CN115908972 A CN 115908972A CN 202211411510 A CN202211411510 A CN 202211411510A CN 115908972 A CN115908972 A CN 115908972A
- Authority
- CN
- China
- Prior art keywords
- tree species
- sample
- tree
- sample set
- style migration
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Image Analysis (AREA)
Abstract
The invention discloses a method and a device for expanding a tree species sample set, electronic equipment and a medium. Obtaining a sample set of original tree species; inputting each original tree sample in the original tree sample set into a style migration model trained in advance to obtain a plurality of style migration tree samples; and performing sample expansion on the original tree species sample set by using each style migration tree species sample. The problems of unbalanced samples and small sample time span are solved, the enhanced data combined with different trees in different seasons are generated, the image closer to a real scene is realized in the scene with limited data samples, model overfitting caused by too small data sample amount is facilitated to be solved, the model robustness in the scene in different seasons is improved, the sample balance degree is improved, the generalization of a style migration model can be effectively improved, and the accuracy in an actual prediction task is enhanced.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for expanding a tree species sample set, an electronic device, and a medium.
Background
In the task of semantic segmentation of the orthoimage tree species, the neural network-based algorithm achieves excellent results, and different tree species can be correctly segmented through prediction of the convolutional neural network. However, the existing deep learning semantic segmentation model is mainly supervised, the training process of the existing deep learning semantic segmentation model has strong dependence on a data set, and a phenomenon of overfitting often occurs on a small data sample, so that although the accuracy of a training result is very high, the accuracy of an actual prediction result is often low.
In the process of implementing the invention, the inventor finds that the prior art has the following defects: at present, in order to solve the problems of overfitting and the like in the training process caused by the undersize of data samples, a common method is to enhance a data set, and the training samples are expanded in multiples by means of the training samples in the training data set and corresponding labels according to the modes of horizontal overturning, vertical overturning, random rotation, random brightness adjustment, noise disturbance and the like, so that a single sample is expanded into more samples, and the overfitting phenomenon caused by the small amount of the samples is reduced.
Although the training data set can be expanded, due to the fact that a large time span exists in images needing to be predicted by the tree type semantic segmentation task, the orthoimages of the trees in four seasons including spring, summer, autumn and winter have large differences from the texture of the branches and leaves and the color of the leaves, the traditional data enhancement mode can only be used for enhancing the texture and the color from the aspect of brightness and a rotation angle, and the enhancement operation is not carried out on two important changes of the texture and the color, so that once the prediction task with the large time span occurs, the deep learning model cannot accurately predict. Meanwhile, the manufacturing process of the semantic segmentation data set is complicated, a large amount of labor is needed for a data labeling task, and data acquisition is affected by weather and seasonal images, so that the problems that the time span of samples in the ortho-image data set is small, the final prediction effect of the ortho-image semantic segmentation model is poor due to insufficient sample amount and the like are finally caused.
Disclosure of Invention
The invention provides a method, a device, electronic equipment and a medium for expanding a tree species sample set, which are used for improving the sample balance degree, effectively improving the generalization of a style migration model and enhancing the accuracy in an actual prediction task.
According to an aspect of the present invention, there is provided a method for expanding a tree species sample set, including:
acquiring an original tree species sample set, wherein each original tree species sample is a tree species orthoimage of a set tree species type collected in a set season;
inputting each original tree sample in the original tree sample set into a style migration model trained in advance to obtain a plurality of style migration tree samples;
the input of the style migration model is an original tree species sample, a migration season and a migration tree species type, and the output is a style migration tree species sample of the original tree species sample in the migration season and the migration tree species type;
and performing sample expansion on the original tree species sample set by using each style migration tree species sample.
According to another aspect of the present invention, there is provided an expansion apparatus for tree species sample sets, comprising:
the system comprises an original tree species sample set acquisition module, a tree species identification module and a tree species identification module, wherein the original tree species sample set acquisition module is used for acquiring an original tree species sample set, and each original tree species sample is a tree species orthoimage of a set tree species type acquired in a set season;
the style migration tree sample acquisition module is used for inputting each original tree sample in the original tree sample set into a pre-trained style migration model to acquire a plurality of style migration tree samples;
the input of the style migration model is an original tree species sample, a migration season and a migration tree species type, and the output is a style migration tree species sample of the original tree species sample in the migration season and the migration tree species type;
and the sample expansion module is used for performing sample expansion on the original tree species sample set by using each style migration tree species sample.
According to another aspect of the present invention, there is provided an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for expanding a tree species sample set according to any embodiment of the present invention when executing the computer program.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the method for expanding a tree species sample set according to any one of the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, an original tree species sample set is obtained; inputting each original tree sample in the original tree sample set into a style migration model trained in advance to obtain a plurality of style migration tree samples; and performing sample expansion on the original tree species sample set by using each style migration tree species sample. The problems of unbalanced samples and small sample time span are solved, the enhanced data combined with different trees in different seasons are generated, the image closer to a real scene is realized in the scene with limited data samples, model overfitting caused by too small data sample amount is facilitated to be solved, the model robustness in the scene in different seasons is improved, the sample balance degree is improved, the generalization of a style migration model can be effectively improved, and the accuracy in an actual prediction task is enhanced.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a method for expanding a tree sample set according to an embodiment of the present invention;
FIG. 2 is a flowchart of another method for expanding a sample set of tree species according to a second embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an expansion apparatus for tree sample sets according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "object," "current," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of an embodiment of the present invention, which provides a method for expanding a tree sample set, where the method is applicable to a situation where samples are unbalanced and a sample time span is small in an actual prediction task.
Accordingly, as shown in fig. 1, the method comprises:
and S110, obtaining an original tree species sample set.
Wherein, each original tree species sample is a tree species orthoimage of a set tree species type collected in a set season.
The original tree species sample set can be a sample set without style migration, and the original tree species sample set is provided with a plurality of actually collected tree species ortho-images of different tree species types in different seasons.
In this embodiment, a plurality of original tree species samples are collected in the original tree species sample, wherein the original tree species samples may be tree species having different seasons in spring, summer, fall or winter, wherein the tree species includes poplar, pine or other tree species types. In the original tree species sample set, there may be an imbalance problem of the original tree species samples in a certain season or in samples of a certain tree species type. For example, pine trees in spring and summer are in the original tree species sample set, but pine trees in autumn and winter are not in the original tree species sample set, so that the corresponding original tree species samples need to be added and added to the original tree species sample set.
And S120, inputting each original tree sample in the original tree sample set into a style migration model trained in advance, and obtaining a plurality of style migration tree samples.
The input of the style migration model is an original tree species sample, a migration season and a migration tree species type, and the output of the style migration model is a style migration tree species sample of the original tree species sample in the migration season and the migration tree species type.
The style migration model can be a model capable of performing style migration according to the original tree species sample. Specifically, assume that there are pine trees in the spring and summer in the original set of tree species samples, but not pine tree samples in the fall and winter. By inputting each original tree species sample into a style migration model trained in advance, pine tree samples in autumn and winter, namely style migration tree species samples, can be obtained.
The style migration tree species sample may be a tree species sample obtained through a style migration model.
In addition, it is assumed that there is a pine tree type in the original tree species sample set, but there is no poplar tree type, so the original tree species sample and the migration tree species type need to be input into the style migration model, and the poplar style migration tree species sample of the original tree species sample in the poplar migration tree species type is obtained through analysis, so that the original tree species sample set can be enriched, and operations such as training of the semantic segmentation model can be performed better.
In this embodiment, the migration seasons may include spring, summer, fall and winter, and the balancing operation of the seasons of the original tree species sample set may also be performed according to the migration seasons. The migration tree species type can comprise poplar, pine and salix caprea, and the balancing processing operation of the tree species type of the original tree species sample set can be performed according to the migration tree species type.
And S130, performing sample expansion on the original tree species sample set by using each style migration tree species sample.
In this embodiment, the obtained style migration tree species samples are added to the original tree species sample set, and the original tree species sample set includes not only the original tree species samples but also the style migration tree species samples, so that the original tree species sample set can be effectively expanded.
Optionally, after performing sample expansion on the original tree species sample set by using each style migration tree species sample, the method further includes: verifying whether the extended sample set meets the equilibrium conditions of seasons and/or tree types; if not, acquiring a lack season and/or a lack tree type, and acquiring a first sample number corresponding to the lack season and/or a second sample number corresponding to the lack tree type; secondarily generating style migration tree species samples corresponding to the first sample number of the lacking season and/or the second sample number of the lacking tree species by using the style migration model; and adding the style migration tree species sample generated in the second time into the expanded sample set.
The type balancing condition may be to judge whether the tree species samples in the extended sample set satisfy the season balancing condition and the tree species type balancing condition, and perform corresponding tree species sample balancing operation according to the judged result. The first number of samples may be the size of the number of tree samples for the out of season. The second number of samples may be a size of the number of samples of the tree species lacking the tree species type. The expanded sample set may be a sample set obtained by adding style migration tree species samples corresponding to the first sample number and the second sample number to the expanded sample set.
Illustratively, a seasonal balance condition and a tree type balance condition are obtained, whether the sample set after expansion meets the seasonal balance condition is judged firstly, if yes, whether the sample set after expansion meets the tree type balance condition is judged secondly, if yes, the sample set after expansion is balanced, and secondary expansion processing of the sample is not needed.
If the expanded sample set does not satisfy the seasonal balance condition, a lack of season (assumed to be a winter season) is acquired, and a first number of samples M corresponding to the lack of the winter season is acquired. Further, style migration tree species samples (M winter tree species samples) corresponding to the number of the first samples lacking in winter are generated twice by using the style migration model. And then judging whether the expanded sample set meets the tree species type balance condition, and if so, adding the secondarily generated style migration tree species samples (M winter tree species samples) into the expanded sample set.
If the extended sample set meets the seasonal balance condition, then judging whether the extended sample set meets the tree species type balance condition, if not, acquiring the tree species lacking type (assumed to be the bubble willow), and acquiring a second sample number N corresponding to the tree species lacking type (the bubble willow); secondarily generating style migration tree species samples (N bubble willow species samples) corresponding to the second sample number N lacking the tree species types (bubble willows) by adopting a style migration model; and adding the N salix caprea seed samples generated twice into the expanded sample set.
If the expanded sample set does not satisfy the seasonal balance condition, a lack of season (assumed to be a winter season) is acquired, and a first number of samples M corresponding to the lack of winter season is acquired. Further, style migration tree species samples (M winter tree species samples) corresponding to the number of the first samples lacking in winter are generated twice by using the style migration model. Then judging whether the expanded sample set meets the tree species type balance condition, if not, acquiring the lacking tree species type (assumed to be the bubble willow), and acquiring a second sample number N corresponding to the lacking tree species type (the bubble willow); secondarily generating style migration tree species samples (N bubble willow species samples) corresponding to the second sample number N lacking the tree species types (bubble willows) by adopting a style migration model; and adding the M winter tree species samples and the N salix caprea species samples which are generated secondarily into the expanded sample set.
The benefit of this arrangement is: and judging whether the extended sample set is balanced or not according to the seasonal balance condition and the tree type balance condition, if not, generating corresponding tree sample for the second time, and adding the tree sample into the extended sample set. The sample balance of the obtained tree species samples in the sample set after expansion can be realized in the aspect of seasons or tree species types, and the real scene of the actual predicted image is better met.
Optionally, after adding the style migration tree species sample generated twice to the extended sample set, the method further includes: and training a set semantic segmentation model by using the extended sample set to obtain a tree species recognition model.
The semantic segmentation model can be a model based on a classification model, namely, a convolutional neural network is used for extracting features to classify. The tree species recognition model may be a model capable of performing tree species recognition, which is effective when one original tree species sample is input.
In this embodiment, the obtained extended sample set can be used to identify the tree species, so that the obtained tree species identification model has better tree species identification capability and better generalization.
Optionally, after adding the secondarily generated style migration tree species sample to the extended sample set, the method further includes: dividing the extended sample set according to a certain proportion to obtain a tree species sample training sample set, a tree species sample verification sample set and a tree species sample test sample set; and storing sample data in a tree sample library according to the tree sample training sample set, the tree sample verification sample set and the tree sample test sample set.
The tree species sample training sample set may be a tree species sample set for training. The tree species sample validation sample set may be a tree species sample set for validation. The tree species sample test sample set may be a tree species sample set under test. The tree sample library can be a sample set library for storing a tree sample training sample set, a tree sample verification sample set and a tree sample testing sample set.
In this embodiment, the extended sample set is divided according to a certain proportion, for example, the extended sample set may be divided according to the proportion of 8.
The advantages of such an arrangement are: the expanded sample set is divided according to a certain proportion, so that the tree species samples can be better used, the actual scene of the actual predicted image is better met, and the balance of the tree species samples is realized.
According to the technical scheme of the embodiment of the invention, an original tree species sample set is obtained; inputting each original tree sample in the original tree sample set into a style migration model trained in advance to obtain a plurality of style migration tree samples; and performing sample expansion on the original tree species sample set by using each style migration tree species sample. The problems of unbalanced samples and small sample time span are solved, the enhanced data combined with different trees in different seasons are generated, the image closer to a real scene is realized in the scene with limited data samples, model overfitting caused by too small data sample amount is facilitated to be solved, the model robustness in the scene in different seasons is improved, the sample balance degree is improved, the generalization of a style migration model can be effectively improved, and the accuracy in an actual prediction task is enhanced.
Example two
Fig. 2 is a flowchart of another method for expanding a tree species sample set according to a second embodiment of the present invention, where the present embodiment is optimized based on the foregoing embodiments, and in the present embodiment, before the obtaining of the original tree species sample set, a specific operation process of training a style migration model is further included.
Accordingly, as shown in fig. 2, the method comprises:
and S210, obtaining a historical tree species sample set.
Each historical tree species sample is a historical tree species orthoimage of a set tree species type collected in a set season.
In this embodiment, the set of historical tree species samples may include thousands of historical tree species samples, each of which may include tree species samples for different seasons or different tree species types.
S220, training based on a style migration algorithm according to preset seasons and/or tree types to obtain a style migration model corresponding to the historical tree sample set.
Wherein, the season and/or tree type balance condition may comprise a season balance condition and a tree type balance condition. The style migration algorithm can be an algorithm for transferring the style of one picture to another picture, and intuitively, the style of one picture is transferred to another picture, and the content of the picture is kept unchanged.
In this embodiment, the style migration model is trained according to a preset season and/or tree type balance condition, and the obtained style migration model can effectively perform the style migration operation of the picture.
Optionally, the obtaining of the style migration model corresponding to the historical tree species sample set based on style migration algorithm training according to preset conditions of season and/or tree species type balance includes: inputting the season and/or tree type balance conditions and the historical tree species sample set into a discriminator corresponding to the style migration algorithm, adding noise into a generator to generate historical unreal tree species generation samples, and sending the historical unreal tree species generation samples to the discriminator; and (3) taking a difference function formed by the generator and the discriminator as an objective function, taking season and/or tree type balance conditions, a historical tree sample set and noise as independent variables, taking the minimized objective function as an optimization target, and performing iterative optimization to obtain a style migration model.
The task executed by the discriminator can be regarded as a top-down (from complex to simple) process, and only feature extraction needs to be performed on input high-dimensional data to obtain low-dimensional discrimination information, such as classification, detection and the like.
In contrast, the generator is a generator, which is from bottom to top (simple to complex), for example, a random noise with a low dimensionality is given, a picture with a larger dimensionality is required to be generated, and because it needs to learn the distribution characteristics of the whole data, the generation task of the generator is often more difficult.
The difference function can be a function for describing the difference formed by the generator and the discriminator, and whether the currently trained style migration model meets the requirements or not is determined according to the discrimination difference function.
In this embodiment, a difference function formed by the generator and the discriminator is used as an objective function, a seasonal and/or tree type equilibrium condition, a historical tree sample set, and noise are used as arguments, and a minimized objective function is used as an optimization target, so as to obtain a style migration model through iterative optimization. That is, the objective function needs to be small enough, so that the trained style migration model can perform the style migration operation processing of the picture more accurately.
Optionally, the iteratively optimizing with the difference function formed by the generator and the discriminator as an objective function, the seasonal and/or tree type equilibrium condition, the historical tree sample set, and the noise as arguments, and with the minimized objective function as an optimization target, to obtain the style migration model, includes: according to the formulaIteratively optimizing to obtain a style migration model; wherein G is represented as a generator, D is represented as a discriminator, V (D, G) is represented as a function of the degree of difference between the historical tree species samples and the historical true generation samples, x represents the historical tree species samples, y represents the season and/or tree species type balance conditions, z represents noise, p represents noise data Representing the probability distribution of data, p z Represents the noise probability subsection, data represents data, z represents the original noise, ->Representing the probability distribution expectation of the discriminator D under the input x and y; />Representing the probability distribution expectation of the arbiter D in generating the historical unreal generation samples generated by the generator G through z and y.
In this embodiment, the optimization processing of the independent variable parameters is performed according to the following formula:and obtaining a style migration model with better generalization performance.
Specifically, the Conditional generation type countermeasure network (Conditional genetic adaptive Nets) is adopted to perform style migration generation on different season equilibrium conditions and tree type equilibrium conditions, and style migration images of different tree type equilibrium conditions under different season equilibrium conditions can be obtained through combination of different equilibrium conditions.
Furthermore, historical tree species samples x and season and/or tree species type balance conditions y used in the training process are input into a discriminator D, an image corresponding to the balance conditions is generated by a generator G and then is delivered to the discriminator D for discrimination, the generator G and the discriminator D play games, and finally the effect generated by the generator is continuously improved. And continuously optimizing the network through the minimum optimization generator G and the maximum discriminator D, and continuously iterating to finally obtain the optimal style migration model.
And S230, acquiring an original tree species sample set.
S240, inputting each original tree sample in the original tree sample set into a style migration model trained in advance, and obtaining a plurality of style migration tree samples.
And S250, performing sample expansion on the original tree species sample set by using each style migration tree species sample.
According to the technical scheme of the embodiment of the invention, a historical tree species sample set is obtained; training based on a style migration algorithm according to preset season and/or tree type balance conditions to obtain a style migration model corresponding to the historical tree type sample set; acquiring an original tree species sample set; inputting each original tree sample in the original tree sample set into a style migration model trained in advance to obtain a plurality of style migration tree samples; and performing sample expansion on the original tree species sample set by using each style migration tree species sample. The optimal style migration model can be effectively obtained through training of the historical tree species sample set, the image style can be better migrated through the style migration model, the image closer to a real scene is realized in the scene with limited data samples, model overfitting caused by too small data sample amount is facilitated to be solved, model robustness under different seasonal scenes is improved, sample balance degree is improved, generalization of the style migration model can be effectively improved, and accuracy in an actual prediction task is enhanced.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an expansion apparatus for tree species sample sets according to a third embodiment of the present invention. The extension apparatus for tree type sample sets provided in this embodiment may be implemented by software and/or hardware, and may be configured in a terminal device or a server to implement the extension method for tree type sample sets in the embodiments of the present invention. As shown in fig. 3, the apparatus includes: a raw tree species sample set acquisition module 310, a style migration tree species sample acquisition module 320, and a sample expansion module 330.
The original tree species sample set obtaining module 310 is configured to obtain an original tree species sample set, where each original tree species sample is a tree species orthographic image of a set tree species type collected in a set season;
a style migration tree species sample acquisition module 320, configured to input each original tree species sample in the original tree species sample set into a style migration model trained in advance, and acquire a plurality of style migration tree species samples;
the input of the style migration model is an original tree species sample, a migration season and a migration tree species type, and the output of the style migration model is a style migration tree species sample of the original tree species sample in the migration season and the migration tree species type;
a sample expansion module 330, configured to perform sample expansion on the original tree species sample set by using each of the style migration tree species samples.
According to the technical scheme of the embodiment of the invention, an original tree species sample set is obtained; inputting each original tree sample in the original tree sample set into a style migration model trained in advance to obtain a plurality of style migration tree samples; and performing sample expansion on the original tree species sample set by using each style migration tree species sample. The problems of unbalanced samples and small sample time span are solved, the enhanced data combined with different tree species in different seasons are generated, the image which is closer to a real scene is realized in the scene with limited data samples, the problem of overfitting of the model caused by too small data sample amount is solved, the robustness of the model in the scene with different seasons is improved, the sample balance degree is improved, the generalization of a style migration model can be effectively improved, and the accuracy in an actual prediction task is enhanced.
Optionally, the method further includes determining the extended sample set, which may specifically include: the balance condition verification unit is used for verifying whether the expanded sample set meets the balance conditions of seasons and/or tree types after sample expansion is carried out on the original tree sample set by using each style migration tree sample; the sample number obtaining unit is used for obtaining the lacking season and/or the lacking tree type if the expanded sample set is verified not to meet the season and/or tree type balance condition, and obtaining a first sample number corresponding to the lacking season and/or a second sample number corresponding to the lacking tree type; the style migration tree species sample generating unit is used for generating style migration tree species samples corresponding to the first sample number of the lacking season and/or the second sample number of the lacking tree species for the second time by adopting the style migration model; and the extended sample set determining unit is used for adding the style migration tree species samples generated secondarily into the extended sample set.
Optionally, the method further includes a tree species identification model determining unit, which may be specifically configured to: and after the style migration tree species sample generated secondarily is added into the extended sample set, training a set semantic segmentation model by using the extended sample set to obtain a tree species recognition model.
Optionally, the method further includes a style migration model determining module, which may specifically include: a historical tree species sample set obtaining unit, configured to obtain a historical tree species sample set before obtaining the original tree species sample set; and the style migration model determining unit is used for training based on a style migration algorithm according to preset season and/or tree type balance conditions to obtain a style migration model corresponding to the historical tree type sample set.
Optionally, the style migration model determining unit may specifically include: the sample input subunit is used for inputting the season and/or tree type balance conditions and the historical tree species sample set into a discriminator corresponding to the style migration algorithm, adding noise through a generator to generate historical unreal tree species generation samples and sending the historical unreal tree species generation samples to the discriminator; and the style migration model determining subunit is used for obtaining the style migration model by taking a difference function formed by the generator and the discriminator as an objective function, taking season and/or tree type balance conditions, a historical tree sample set and noise as independent variables and taking the minimized objective function as an optimization target through iterative optimization.
Optionally, the style migration model determining subunit may be specifically configured to: according to the formulaIteratively optimizing to obtain a style migration model;
wherein G is represented as a generator, D is represented as a discriminator, V (D, G) is represented as a function of the degree of difference between the historical tree species samples and the historical true generation samples, x represents the historical tree species samples, y represents the season and/or tree species type balance conditions, z represents noise, p represents noise data Representing the probability distribution of data, p z Representing the noise probability fraction, data representing data, z representing the original noise,representing the probability distribution expectation of the discriminator D under the input x and y; />Representing the probability distribution expectation of the classifier D at the historical unreal generated samples generated by the generator G through z and y.
Optionally, the system further includes a tree species sample library determining unit, configured to, after the secondary generated style migration tree species sample is added to the extended sample set, divide the extended sample set according to a certain proportion to obtain a tree species sample training sample set, a tree species sample verification sample set, and a tree species sample testing sample set; and storing the sample data in a tree species sample library according to the tree species sample training sample set, the tree species sample verification sample set and the tree species sample test sample set.
The expansion device of the tree species sample set provided by the embodiment of the invention can execute the expansion method of the tree species sample set provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 4 shows a schematic structural diagram of an electronic device 10 that can be used to implement a fourth embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 may also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as the method of expansion of a sample set of tree species.
In some embodiments, the method of augmenting a set of tree species samples can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method of augmentation of a set of tree species samples described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the method of expanding the set of tree samples by any other suitable means (e.g., by means of firmware).
The method comprises the following steps: acquiring an original tree species sample set; inputting each original tree sample in the original tree sample set into a style migration model trained in advance to obtain a plurality of style migration tree samples; and performing sample expansion on the original tree species sample set by using each style migration tree species sample.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
EXAMPLE five
An embodiment of the present invention further provides a computer-readable storage medium, which when executed by a computer processor, performs a method for extending a set of tree samples, the method including: acquiring an original tree species sample set; inputting each original tree sample in the original tree sample set into a style migration model trained in advance to obtain a plurality of style migration tree samples; and performing sample expansion on the original tree species sample set by using each style migration tree species sample.
Of course, the computer-readable storage medium provided by the embodiments of the present invention includes computer-executable instructions, which are not limited to the method operations described above, and may also perform related operations in the method for expanding a tree sample set provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the expansion apparatus for tree type sample sets, each unit and each module included in the expansion apparatus is only divided according to functional logic, but is not limited to the above division, as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A method for expanding a tree species sample set, comprising:
acquiring an original tree species sample set, wherein each original tree species sample is a tree species orthoimage of a set tree species type collected in a set season;
inputting each original tree sample in the original tree sample set into a style migration model trained in advance to obtain a plurality of style migration tree samples;
the input of the style migration model is an original tree species sample, a migration season and a migration tree species type, and the output of the style migration model is a style migration tree species sample of the original tree species sample in the migration season and the migration tree species type;
and performing sample expansion on the original tree species sample set by using each style migration tree species sample.
2. The method of claim 1, further comprising, after sample augmenting the set of raw tree species samples with each of the style migration tree species samples:
verifying whether the extended sample set meets the equilibrium conditions of seasons and/or tree types;
if not, acquiring a lack season and/or a lack tree type, and acquiring a first sample number corresponding to the lack season and/or a second sample number corresponding to the lack tree type;
secondarily generating style migration tree species samples corresponding to the first sample number of the lacking season and/or the second sample number of the lacking tree species by using the style migration model;
and adding the style migration tree species sample generated in the second time into the expanded sample set.
3. The method of claim 2, further comprising, after adding the secondarily generated style migration tree species samples to the set of augmented samples:
and training a set semantic segmentation model by using the extended sample set to obtain a tree species recognition model.
4. The method of claim 1, further comprising, prior to said obtaining a sample set of raw tree species:
acquiring a historical tree species sample set, wherein each historical tree species sample is a historical tree species orthographic image of a set tree species type collected in a set season;
and training based on a style migration algorithm to obtain a style migration model corresponding to the historical tree species sample set according to preset season and/or tree species type balance conditions.
5. The method according to claim 4, wherein the training based on style migration algorithm to obtain the style migration model corresponding to the historical tree species sample set according to preset season and/or tree species type balance conditions comprises:
inputting the season and/or tree type balance conditions and the historical tree species sample set into a discriminator corresponding to the style migration algorithm, adding noise into a generator to generate historical unreal tree species generation samples, and sending the historical unreal tree species generation samples to the discriminator;
and (3) taking a difference function formed by the generator and the discriminator as an objective function, taking seasonal and/or tree type balance conditions, a historical tree sample set and noise as independent variables, taking the minimized objective function as an optimization target, and performing iterative optimization to obtain a style migration model.
6. The method of claim 5, wherein the iterative optimization with the difference function formed by the generator and the discriminator as an objective function, the seasonal and/or tree type balance condition, the historical tree sample set and the noise as arguments and the minimized objective function as an optimization objective, obtains the style migration model, and comprises:
wherein G is represented as a generator, D is represented as a discriminator, V (D, G) is represented as a function of the degree of difference between the historical tree species samples and the historical true generation samples, x represents the historical tree species samples, y represents the season and/or tree species type balance conditions, z represents noise, p represents noise data Representing the probability distribution of data, p z Representing the noise probability fraction, data representing data, z representing the original noise,representing the probability distribution expectation of the discriminator D under the input x and y; />Representing the probability distribution expectation of the arbiter D in generating the historical unreal generation samples generated by the generator G through z and y.
7. The method of claim 2, wherein after adding the secondarily generated style migration tree species samples to the set of augmented samples, further comprising:
dividing the extended sample set according to a certain proportion to obtain a tree species sample training sample set, a tree species sample verification sample set and a tree species sample test sample set;
and storing the sample data in a tree species sample library according to the tree species sample training sample set, the tree species sample verification sample set and the tree species sample test sample set.
8. An apparatus for expanding a tree species sample set, comprising:
the system comprises an original tree species sample set acquisition module, a tree species identification module and a tree species identification module, wherein the original tree species sample set acquisition module is used for acquiring an original tree species sample set, and each original tree species sample is a tree species orthoimage of a set tree species type acquired in a set season;
the style migration tree sample acquisition module is used for inputting each original tree sample in the original tree sample set into a pre-trained style migration model to acquire a plurality of style migration tree samples;
the input of the style migration model is an original tree species sample, a migration season and a migration tree species type, and the output of the style migration model is a style migration tree species sample of the original tree species sample in the migration season and the migration tree species type;
and the sample expansion module is used for performing sample expansion on the original tree species sample set by using each style migration tree species sample.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method for expanding a set of tree species samples according to any one of claims 1-7 when executing the computer program.
10. A computer-readable storage medium, having stored thereon computer instructions for causing a processor to execute a method for expanding a tree species sample set according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211411510.9A CN115908972A (en) | 2022-11-11 | 2022-11-11 | Expansion method and device of tree species sample set, electronic equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211411510.9A CN115908972A (en) | 2022-11-11 | 2022-11-11 | Expansion method and device of tree species sample set, electronic equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115908972A true CN115908972A (en) | 2023-04-04 |
Family
ID=86470520
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211411510.9A Pending CN115908972A (en) | 2022-11-11 | 2022-11-11 | Expansion method and device of tree species sample set, electronic equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115908972A (en) |
-
2022
- 2022-11-11 CN CN202211411510.9A patent/CN115908972A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115131566A (en) | Automatic image segmentation method based on super-pixels and improved fuzzy C-means clustering | |
CN113051911B (en) | Method, apparatus, device, medium and program product for extracting sensitive words | |
US20220374678A1 (en) | Method for determining pre-training model, electronic device and storage medium | |
CN114444619B (en) | Sample generation method, training method, data processing method and electronic device | |
CN115690443B (en) | Feature extraction model training method, image classification method and related devices | |
CN114462577A (en) | Federated learning system, method, computer equipment and storage medium | |
CN113963197A (en) | Image recognition method and device, electronic equipment and readable storage medium | |
CN114880505A (en) | Image retrieval method, device and computer program product | |
CN113780532B (en) | Training method, device, equipment and storage medium of semantic segmentation network | |
CN113963011A (en) | Image recognition method and device, electronic equipment and storage medium | |
CN113204665A (en) | Image retrieval method, image retrieval device, electronic equipment and computer-readable storage medium | |
CN115115920B (en) | Graph data self-supervision training method and device | |
CN116028788A (en) | Feature binning method, device, computer equipment and storage medium | |
CN113642495B (en) | Training method, apparatus, and program product for evaluating model for time series nomination | |
CN115359322A (en) | Target detection model training method, device, equipment and storage medium | |
CN115908972A (en) | Expansion method and device of tree species sample set, electronic equipment and medium | |
CN114610953A (en) | Data classification method, device, equipment and storage medium | |
CN115809687A (en) | Training method and device for image processing network | |
CN113221034B (en) | Data generalization method, device, electronic equipment and storage medium | |
CN116737520B (en) | Data braiding method, device and equipment for log data and storage medium | |
CN114911963B (en) | Template picture classification method, device, equipment, storage medium and product | |
CN114724090B (en) | Training method of pedestrian re-identification model, and pedestrian re-identification method and device | |
CN117131197B (en) | Method, device, equipment and storage medium for processing demand category of bidding document | |
CN115757869A (en) | Video processing method, video processing device, electronic equipment and medium | |
CN115147593A (en) | Sampling method, device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |