Classification model acquisition method, classification method and related equipment for marine microalgae images

By introducing feature amplification module in the training process of marine microalgae recognition model, the feature compression capability of the multi-order ResNeXt class is strengthened, and the problem of low recognition accuracy on the long-tail distribution data set is solved, and higher classification accuracy and generalization ability are achieved.

CN119399556BActive Publication Date: 2025-04-15JIHUA LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411985640.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-15
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The existing deep learning-based marine microalgae recognition technology is difficult to effectively identify vulnerable species on the long-tail distribution dataset, resulting in low recognition accuracy and degradation of most categories, and the density of feature space affects classification performance.

Method used

By introducing feature amplification modules during model establishment and training, the multi-order ResNeXt class is forcibly mapped to the original features into tighter clusters, thereby improving feature compression capabilities, improving feature density, and reducing the risk of decision boundary span.

Benefits of technology

The classification accuracy of the model under the long-tail distribution phenomenon is improved, the generalization ability of the model is enhanced, and the identification and classification of marine microalgae images can be more accurately performed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399556B_ABST
    Figure CN119399556B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of classification models, and specifically discloses a classification model acquisition method, a classification method and related equipment for marine microalgae images, wherein the classification model acquisition method comprises the steps of: establishing an initial classification model, the initial classification model comprising a multi-order ResNeXt hierarchy, a feature amplification module and a loss function layer arranged in sequence; training the initial classification model based on a pre-prepared training data set about the marine microalgae images; deleting the feature amplification module in the initial classification model after the training is completed to obtain a final classification model; the method introduces a feature amplification module in the model establishment and training stages to force the multi-order ResNeXt hierarchy to map the original features to a tighter cluster during the training process, so that the trained multi-order ResNeXt hierarchy can output a tighter feature cluster, thereby improving the classification accuracy of the model and effectively improving the generalization ability of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of classification models, and in particular to a classification model acquisition method, a classification method and related equipment for marine microalgae images. Background Art

[0002] Marine microalgae are important indicators for assessing the ecological status of natural water bodies, and their identification and classification are crucial for ecological monitoring. Traditional manual microscopic inspection methods are not only labor-intensive, but also easily affected by subjective factors of operators, resulting in limited detection efficiency and accuracy. In order to improve detection efficiency, deep learning image classification technology is also used to achieve intelligent identification of marine microalgae.

[0003] However, marine microalgae datasets often show long-tail distribution characteristics, that is, the number of samples of different types of algae varies significantly, resulting in extremely low recognition accuracy of disadvantaged species. Existing recognition research based on deep learning mainly relies on a single model to achieve this, and has failed to effectively solve the long-tail distribution problem. Although existing technologies have tried methods such as data enhancement, reweighting, two-stage training, and multi-expert models, these methods are prone to overfitting of minority classes or decreased accuracy of majority classes, and they focus more on data preprocessing or model output post-processing, ignoring the impact of feature space density on classification performance, resulting in insufficient classification accuracy.

[0004] There is currently no effective technical solution to the above problems. Summary of the invention

[0005] The purpose of the present application is to provide a classification model acquisition method, a classification method and related equipment for marine microalgae images to improve the model classification accuracy under the long-tail distribution phenomenon.

[0006] In a first aspect, the present application provides a method for obtaining a classification model of marine microalgae images, the method comprising the following steps:

[0007] S1. Establishing an initial classification model, wherein the initial classification model includes a multi-order ResNeXt hierarchy, a feature amplification module and a loss function layer arranged in sequence;

[0008] S2. training the initial classification model based on a pre-prepared training dataset of marine microalgae images;

[0009] S3. Delete the feature amplification module in the initial classification model after training to obtain the final classification model.

[0010] The method for obtaining a classification model for marine microalgae images of the present application introduces a feature amplification module in the model establishment and training stages to force the multi-order ResNeXt hierarchy to map the original features into tighter clusters during the training process, so that the trained multi-order ResNeXt hierarchy can output tighter feature clusters, that is, the feature compression capability of the multi-order ResNeXt hierarchy is enhanced by introducing the feature amplification module during the training process, and then after deleting the feature amplification module in step S3, the tight feature clusters output by the multi-order ResNeXt hierarchy are no longer amplified, but are equivalent to skipping the feature amplification module and inputting into subsequent structural layers for classification, so that the output features are closer to the centers of their respective clusters, thereby effectively improving the feature density, making them less likely to cross the decision boundary, improving the classification accuracy of the model, and effectively improving the generalization ability of the model.

[0011] The method for obtaining a classification model for marine microalgae images, wherein the feature amplification module is used to configure amplification ratio information based on the sample category sequence number to amplify the features output by the previous ResNeXt layer, the amplification ratio information is positively correlated with the sample category sequence number, and the sample category sequence number is arranged based on a long-tail distribution.

[0012] The classification model acquisition method of marine microalgae images of the present application sets the magnification ratio information to be positively correlated with the number of sample category sequences, so as to further increase the amplification ability of the feature amplification module for sparse feature clusters during the training process, thereby enhancing the compression ability of the final classification model for sparse feature clusters.

[0013] In the method for obtaining a classification model for marine microalgae images, the feature amplification module configures the amplification ratio information based on the following formula:

[0014] ;

[0015] Among them, β is the amplification ratio information, γ is a hyperparameter, K is the total number of sample categories in the training data set, and k is the number of sample category sequences.

[0016] The curve corresponding to the above formula is an increasing curve of β with respect to k, and the increasing rate gradually increases, which can effectively increase the amplification ability of the feature amplification module to sparse feature clusters during the training process.

[0017] The method for obtaining a classification model for marine microalgae images, wherein the initial classification model includes a shared backbone network based on a ResNeXt hierarchy and a plurality of expert networks arranged in parallel, the expert network includes a plurality of sequentially arranged ResNeXt hierarchies, the feature amplification module, a fully connected layer and the loss function layer, and the loss function layers of different expert networks use different softmax loss functions.

[0018] In the method for obtaining a classification model for marine microalgae images, there are three expert networks, and the loss function layers of the three expert networks respectively adopt a Softmax cross entropy loss function, a balanced Softmax cross entropy loss function, and a reverse Softmax cross entropy loss function.

[0019] The method for obtaining a classification model for marine microalgae images, wherein the shared backbone network has a two-order ResNeXt hierarchy, and each of the expert networks has a two-order ResNeXt hierarchy.

[0020] In a second aspect, the present application further provides a method for classifying marine microalgae images, which classifies the marine microalgae images to be classified based on the final classification model acquired by the method for acquiring the classification model of marine microalgae images provided in the first aspect above.

[0021] The marine microalgae image classification method of the present application adopts the final classification model obtained by the marine microalgae image classification model acquisition method provided in the first aspect for image classification. The final classification model introduces a feature amplification module during the training process to enhance the feature compression capability of the multi-order ResNeXt hierarchy, so that the output features are closer to the respective cluster centers, thereby effectively improving the feature density and making them less likely to cross the decision boundary, so that the marine microalgae image classification method of the present application can accurately classify marine microalgae images with long-tail distribution characteristics.

[0022] In a third aspect, the present application also provides a device for acquiring a classification model of marine microalgae images, the device comprising:

[0023] A modeling module, used to establish an initial classification model, wherein the initial classification model includes a multi-order ResNeXt hierarchy, a feature amplification module and a loss function layer arranged in sequence;

[0024] A training module, used for training the initial classification model based on a pre-prepared training data set of marine microalgae images;

[0025] The deletion module is used to delete the feature amplification module in the initial classification model after the training is completed to obtain the final classification model.

[0026] The classification model acquisition device for marine microalgae images of the present application introduces a feature amplification module in the model establishment and training stages to force the multi-order ResNeXt hierarchy to map the original features into tighter clusters during the training process, so that the trained multi-order ResNeXt hierarchy can output tighter feature clusters, that is, the feature compression capability of the multi-order ResNeXt hierarchy is enhanced by introducing the feature amplification module during the training process, and then after the feature amplification module is deleted by the deletion module, the tight feature clusters output by the multi-order ResNeXt hierarchy are no longer amplified, but are equivalent to skipping the feature amplification module and inputting into subsequent structural layers for classification, so that the output features are closer to the centers of their respective clusters, thereby effectively improving the feature density, making it less likely for them to cross the decision boundary, improving the classification accuracy of the model, and effectively improving the generalization ability of the model.

[0027] In a fourth aspect, the present application further provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method provided in the first aspect or the second aspect are executed.

[0028] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the method provided in the first aspect or the second aspect are performed.

[0029] From the above, it can be seen that the present application provides a classification model acquisition method, a classification method and related equipment for marine microalgae images, wherein the classification model acquisition method introduces a feature amplification module in the model establishment and training stages to force the multi-order ResNeXt hierarchy to map the original features into tighter clusters during the training process, so that the trained multi-order ResNeXt hierarchy can output tighter feature clusters, thereby improving the classification accuracy of the model and effectively improving the generalization ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 This is a flow chart of a method for acquiring a classification model for marine microalgae images provided in an embodiment of the present application.

[0031] Figure 2 Schematic diagram of the network structure of the initial classification model.

[0032] Figure 3 Schematic diagram of images of various types of marine microalgae.

[0033] Figure 4 This is a schematic diagram of feature distribution comparison after feature amplification processing under PCA visualization processing.

[0034] Figure 5This is a schematic diagram of the feature distribution comparison of the final classification model under PCA visualization processing.

[0035] Figure 6 A schematic diagram of the structure of a device for acquiring a classification model for marine microalgae images provided in an embodiment of the present application.

[0036] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0037] Figure numerals: 301, modeling module; 302, training module; 303, deletion module; 401, processor; 402, memory; 403, communication bus. DETAILED DESCRIPTION

[0038] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0039] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0040] First, please refer to Figure 1 and Figure 2 Some embodiments of the present application provide a method for obtaining a classification model of marine microalgae images, the method comprising the following steps:

[0041] S1. Establish an initial classification model, which includes a multi-order ResNeXt layer, a feature amplification module and a loss function layer set in sequence;

[0042] S2, training an initial classification model based on a pre-prepared training dataset of marine microalgae images;

[0043] S3. Delete the feature amplification module in the initial classification model after training to obtain the final classification model.

[0044] Specifically, the ResNeXt layer in the initial classification model is a combination of ResNet (residual network) and Inception, which aims to improve the performance and efficiency of the network by introducing the concept of cardinality. The construction of the ResNeXt layer aggregates a set of transformations with the same topological structure. These transformations are performed through multiple parallel paths, each path is used to learn different features; in the embodiment of the present application, the ResNeXt layer preferably adopts the preferred ResNeXt-50 (32×4d) structural configuration.

[0045] More specifically, the feature amplification module is used to amplify the feature clusters output by the multi-order ResNeXt hierarchical processing so that the relative distance of the output feature clusters is greater than the relative distance of the input feature clusters; the loss function layer is used to convert the output of the neural network into a probability distribution, and calculate the difference between the model prediction distribution and the true label distribution through the loss function, thereby optimizing the model parameters.

[0046] It should be understood that the above initial classification model also includes some structural layers for forming a complete neural network model, such as a fully connected layer should be configured before the loss function layer to combine features into vectors, etc., which will not be elaborated here.

[0047] More specifically, the training data set of marine microalgae images in step S2 is a pre-annotated and constructed data set, which is randomly divided into a training set, a validation set, and a test set in a ratio of 7:2:1; in the embodiment of the present application, Figure 3 As shown, the marine microalgae image contains 23 types of algae and microorganisms, namely, slender columnar algae, dinoflagellates, mixed slender species, cylindrical columnar algae, root tube algae, horn algae, ciliates, weak guinea algae, sea strychnostomium, cone cyst, pseudo-nitzschia, finger tube algae, root tube algae, crown algae, horn algae, bone stripe algae, feather algae, diplocystis, pollution sea strychnostomium, flagellates, finger-shaped fragments of long-horned algae, Prorocentrum and pseudo-star algae; step S2 can be based on the training data set combined with the existing optimization algorithm to optimize the initial classification model. In this embodiment of the present application, it is preferred to use the gradient descent method to optimize the network parameters of the initial classification model, and use the cosine annealing algorithm to adjust the learning rate until the loss value of the initial classification model in the training process converges and the loss value no longer changes, and then delete the feature amplification module to obtain the final classification model.

[0048] It should be understood that the process of deleting the feature amplification module in step S3 should generate a new structural layer connection relationship, that is, connecting the previous structural layer and the subsequent structural layer corresponding to the feature amplification module.

[0049] More specifically, when a deep neural network is trained on a data set with a long-tail distribution characteristic, among the features output by the network, the feature clusters of the majority class are highly concentrated, while the feature clusters of the minority class are relatively sparse. Such sparse feature clusters cause the boundary points in the feature space to easily cross the decision boundary, thereby causing misclassification. In order to better explain the internal principle of the feature scaling mechanism in the method of the present application, as Figure 4 and Figure 5 As shown, the classification model acquisition method of the marine microalgae image in the embodiment of the present application further introduces the PCA (Principal Components Analysis) visualization analysis technology to show the difference in feature distribution, wherein the genus Sclerophyllum, Ciliate and Pseudo-Asterix located at the head, middle and tail of the data set with long-tail distribution characteristics are selected as samples for visualization analysis, and the ordinate and abscissa in the two diagrams correspond to two spatial dimensions; Figure 4 As shown in Figure 1, after introducing the feature amplification module to amplify the features, the distribution of the features can be made sparser, and the network can be forced to amplify the features so that they occupy a larger range in the feature space; after the model is trained to convergence based on the same training benchmark, the model with the feature amplification module added has stronger compression capability in feature processing; Figure 5 As shown in the figure, after deleting the feature amplification module, the final classification model no longer scales the features, but directly inputs the original features into the classifier. Since the features have been compressed during the training process, these features are closer to the center of their respective clusters in actual use, thereby reducing the risk of crossing the decision boundary and improving the classification accuracy. Therefore, during the training phase, the amplified feature vector has a larger span than the original feature, which prompts the network to map the original feature to a more compact area when processing it to form a contrast relationship. The amplified feature distribution is more "sparse", so the mapping of the original feature needs to be more "dense" to maintain this contrast. During the training process, the amplification mechanism of the feature amplification module effectively increases the inter-class variance (i.e., the difference between features of different categories). Therefore, the network needs to reduce the intra-class variance of the original features (i.e., the distance between features of the same type) to adapt to this change. Reducing the intra-class variance not only helps to improve the model's discrimination ability, but also enhances the generalization ability of the classifier.

[0050] The method for obtaining a classification model for marine microalgae images in an embodiment of the present application introduces a feature amplification module in the model establishment and training stages to force the multi-order ResNeXt hierarchy to map the original features into tighter clusters during the training process, so that the trained multi-order ResNeXt hierarchy can output tighter feature clusters, that is, the feature compression capability of the multi-order ResNeXt hierarchy is enhanced by introducing the feature amplification module during the training process, and then after deleting the feature amplification module in step S3, the tight feature clusters output by the multi-order ResNeXt hierarchy are no longer amplified, but are equivalent to skipping the feature amplification module and inputting into subsequent structural layers for classification, so that the output features are closer to their respective cluster centers, thereby effectively improving the feature density, making them less likely to cross the decision boundary, improving the classification accuracy of the model, and effectively improving the generalization ability of the model.

[0051] In some preferred embodiments, the feature amplification module is used to configure amplification ratio information based on the sample category sequence number to amplify the features output by the previous ResNeXt layer, the amplification ratio information is positively correlated with the sample category sequence number, and the sample category sequence number is arranged based on a long-tail distribution.

[0052] Specifically, the sample data is sorted from large to small according to the number of samples in each category, and the sequence number is an integer starting from 0, so as to determine the sequence number of each sample category.

[0053] More specifically, based on the foregoing, it can be seen that in a data set with long-tail distribution characteristics, the feature correspondences corresponding to sample categories with a large number of samples can produce denser feature clusters, and conversely, the feature correspondences corresponding to sample categories with a small number of samples can produce sparser feature clusters. Therefore, in order to improve the compression capability of the final classification model for sparse class features, the classification model acquisition method for marine microalgae images in the embodiment of the present application sets the amplification ratio information to be positively correlated with the sample category sequence number, so as to further increase the amplification capability of the feature amplification module for sparse feature clusters during the training process, thereby enhancing the compression capability of the final classification model for sparse feature clusters, which is equivalent to giving more feature weights to categories with larger sequence numbers (corresponding to rare categories) during the training process, thereby balancing the influence of mainstream categories and tail categories in the long-tail distribution.

[0054] More specifically, the amplification ratio information is a ratio value used to amplify the feature, which can make the output features of the final classification model after training and from which the feature amplification module is deleted have compression characteristics.

[0055] In some preferred embodiments, the feature amplification module configures the amplification ratio information based on the following formula:

[0056] (1)

[0057] Among them, β is the amplification ratio information, γ is a hyperparameter, K is the total number of sample categories in the training data set, and k is the number of sample category sequences.

[0058] Specifically, in the embodiment of the present application, γ is preferably set to 2.

[0059] More specifically, K and k can be determined according to the specific data composition of the training data set when preparing the training data set, and then the corresponding magnification ratio information is determined for each sample category, so that the feature amplification module can extract the magnification ratio information corresponding to the currently input marine microalgae image during the training stage to perform feature amplification processing.

[0060] More specifically, the curve in formula (1) is an increasing curve of β with respect to k, and the increasing rate gradually increases, which can effectively increase the amplification ability of the feature amplification module for sparse feature clusters during the training process.

[0061] In some preferred embodiments, the initial classification model includes a shared backbone network based on a ResNeXt hierarchy and multiple expert networks arranged in parallel. The expert network includes a multi-order ResNeXt hierarchy, a feature amplification module, a fully connected layer and a loss function layer arranged in sequence. The loss function layers of different expert networks use different softmax loss functions.

[0062] Specifically, in order to make the final classification model adapt to a wide range of category distributions in actual application scenarios, so as to significantly improve the generalization ability, such as Figure 2 As shown, the classification model acquisition method of the marine microalgae image of the embodiment of the present application designs a multi-expert aggregation network, and uses different expert networks in the expert aggregation network to respectively match different softmax loss functions and combine loss functions to perform back propagation to update parameters, so that the model can better predict the tail category. Its design goal is to simulate the anti-long-tail distribution, that is, the expert model should be good at processing the tail category, and each expert is trained through a different loss function, so that each expert has a unique advantage in the distribution of a specific category. This design of expert diversity can achieve more targeted decision-making when facing test data with different category distributions.

[0063] More specifically, the input ends of the parallel expert networks are connected based on a shared backbone network. The shared backbone network composed of ResNeXt layers can extract low-level features (such as edges, textures, etc.). These low-level features are common to most tasks and do not need to be distinguished for specific tasks. Therefore, connecting multiple expert networks based on the shared backbone network can effectively reduce redundant calculations, save video memory and parameters, and simplify the model training process.

[0064] It should be noted that each expert network can output the corresponding image classification results. Therefore, the final classification model also includes an aggregate output layer that integrates the image classification results of each expert network for final output. This is a common output method for multi-classification results, such as weighted superposition of image classification results output by each expert network for aggregate output, so it will not be elaborated here.

[0065] In some preferred embodiments, Figure 2 As shown, there are three expert networks, and the loss function layers of the three expert networks respectively adopt the Softmax cross entropy loss function (Softmax loss), the balanced Softmax cross entropy loss function (balanced Softmax loss) and the reverse Softmax cross entropy loss function (reverse Softmax loss).

[0066] Specifically, compared with the Softmax cross entropy loss function, the balanced Softmax cross entropy loss function adjusts the logits (logical values) so that the output of the model can better simulate the uniform distribution to show a balanced performance on all categories. The reverse Softmax cross entropy loss function reversely adjusts the logits so that the logits of the tail categories are enhanced and the logits of the head categories are weakened, so that the model can better predict on the tail categories.

[0067] More specifically, the Softmax cross entropy loss function is:

[0068] (2)

[0069] Among them, L1 is the sum of the Softmax cross entropy losses, which is the loss calculated by the corresponding expert network for the entire training data set. s The training data set D s The total number of samples in x. i is the i-th sample. i is the true category label of the i-th sample. v(x i ) is the corresponding expert network for sample x i The output confidence of is the unnormalized prediction value of the model for each category. σ(⋅) is the Softmax function, which is used to convert the logits of the model into a probability distribution.

[0070] More specifically, the balanced Softmax cross entropy loss function is:

[0071] (3)

[0072] Among them, L2 is the sum of the balanced Softmax cross entropy losses, and π is the prior probability of the category frequency, that is, the frequency of each category in the training data set.

[0073] More specifically, the inverse Softmax cross entropy loss function is:

[0074] (4)

[0075] Among them, L3 is the sum of the reverse Softmax cross entropy losses, and λ is a hyperparameter used to control the amplitude of the reverse adjustment, which can be set according to usage requirements.

[0076] Among them, the Softmax function (normalized exponential function) is calculated as follows:

[0077]

[0078] in, represents the probability value that the current image belongs to category j, K represents the total number of categories, z is the input vector, z j is the jth element in the input vector, z k is the kth element in the input vector.

[0079] In some preferred embodiments, the shared backbone network has a two-order ResNeXt layer, and each expert network has a two-order ResNeXt layer.

[0080] Specifically, in the embodiment of the present application, the two-order ResNeXt hierarchy of the shared backbone network preferably includes 3 and 4 ResNeXt modules respectively, and the two-order ResNeXt hierarchy of each expert network preferably includes 6 and 3 ResNeXt modules respectively. For each expert network output, the above structure constitutes a 4-order ResNeXt hierarchy, wherein the first two ResNeXt hierarchies are used to extract low-level features, and the last two ResNeXt hierarchies are responsible for extracting higher-order and more abstract features, which are related to specific tasks (such as classification, detection or segmentation); in this embodiment, the expert network containing the last two ResNeXt hierarchies can be optimized for specific tasks or input characteristics to improve the adaptability of the overall model. At the same time, through independent high-order networks, each expert can focus on different feature spaces, thereby enhancing the expressive power of the overall model. In addition, parallel multi-expert networks can provide dedicated processing paths for multiple tasks, effectively resolve conflicts between specific tasks, and realize multi-task learning.

[0081] In a second aspect, some embodiments of the present application further provide a method for classifying marine microalgae images, which classifies the marine microalgae images to be classified based on the final classification model acquired by the method for acquiring the classification model of marine microalgae images provided in the first aspect.

[0082] Specifically, in actual use, the user only needs to input the marine microalgae image to be classified into the final classification model so that the final classification model outputs a prediction result about the category of the marine microalgae image.

[0083] The marine microalgae image classification method of the embodiment of the present application adopts the final classification model obtained by the marine microalgae image classification model acquisition method provided in the first aspect for image classification. The final classification model introduces a feature amplification module during the training process to enhance the feature compression capability of the multi-order ResNeXt hierarchy, so that the features output by the model are closer to the centers of their respective clusters, thereby effectively improving the feature density and making them less likely to cross the decision boundary. This enables the marine microalgae image classification method of the embodiment of the present application to accurately classify marine microalgae images with long-tail distribution characteristics.

[0084] Third, please refer to Figure 6 Some embodiments of the present application also provide a device for obtaining a classification model of marine microalgae images, the device comprising:

[0085] A modeling module 301 is used to establish an initial classification model, wherein the initial classification model includes a multi-order ResNeXt hierarchy, a feature amplification module, and a loss function layer arranged in sequence;

[0086] A training module 302 is used to train an initial classification model based on a pre-prepared training data set of marine microalgae images;

[0087] The deletion module 303 is used to delete the feature amplification module in the initial classification model after the training is completed to obtain the final classification model.

[0088] The classification model acquisition device for marine microalgae images in the embodiment of the present application introduces a feature amplification module in the model establishment and training stages to force the multi-order ResNeXt hierarchy to map the original features into tighter clusters during the training process, so that the trained multi-order ResNeXt hierarchy can output tighter feature clusters, that is, the feature compression capability of the multi-order ResNeXt hierarchy is enhanced by introducing the feature amplification module during the training process, and then after the feature amplification module is deleted by the deletion module, the tight feature clusters output by the multi-order ResNeXt hierarchy are no longer amplified, but are equivalent to skipping the feature amplification module and inputting into subsequent structural layers for classification, so that the output features are closer to their respective cluster centers, thereby effectively improving the feature density, making them less likely to cross the decision boundary, improving the classification accuracy of the model, and effectively improving the generalization ability of the model.

[0089] In some preferred embodiments, the classification model acquisition device for marine microalgae images of the embodiments of the present application is used to execute the classification model acquisition method for marine microalgae images provided in the first aspect above.

[0090] Fourth, please refer to Figure 7 Some embodiments of the present application also provide a structural diagram of an electronic device. The present application provides an electronic device, including: a processor 401 and a memory 402. The processor 401 and the memory 402 are interconnected and communicate with each other through a communication bus 403 and / or other forms of connection mechanisms (not marked). The memory 402 stores computer-readable instructions executable by the processor 401. When the electronic device is running, the processor 401 executes the computer-readable instructions to execute the method in any optional implementation of the above embodiments.

[0091] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method in any optional implementation of the above embodiment is executed. The computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or optical disk.

[0092] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0093] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0094] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0095] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0096] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for obtaining a classification model for marine microalgae images, characterized in that: The method comprises the following steps: S1. Establish an initial classification model, wherein the initial classification model includes a multi-order ResNeXt hierarchy, a feature amplification module and a loss function layer arranged in sequence, wherein the feature amplification module is used to configure amplification ratio information based on the sample category sequence number to amplify the features output by the previous ResNeXt hierarchy, wherein the amplification ratio information is positively correlated with the sample category sequence number, and the sample category sequence number is arranged based on a long-tail distribution; S2. training the initial classification model based on a pre-prepared training dataset of marine microalgae images; S3. Delete the feature amplification module in the initial classification model after training to obtain the final classification model.

2. The method for obtaining a classification model of marine microalgae images according to claim 1, characterized in that: The feature amplification module configures the amplification ratio information based on the following formula: ; Among them, β is the amplification ratio information, γ is a hyperparameter, K is the total number of sample categories in the training data set, and k is the number of sample category sequences.

3. The method for obtaining a classification model of marine microalgae images according to claim 1, characterized in that: The initial classification model includes a shared backbone network based on the ResNeXt hierarchy and multiple expert networks arranged in parallel. The expert network includes multiple orders of the ResNeXt hierarchy, the feature amplification module, the fully connected layer and the loss function layer arranged in sequence. The loss function layers of different expert networks use different softmax loss functions.

4. The method for obtaining a classification model of marine microalgae images according to claim 3, characterized in that: There are three expert networks, and the loss function layers of the three expert networks respectively adopt the Softmax cross entropy loss function, the balanced Softmax cross entropy loss function and the reverse Softmax cross entropy loss function.

5. The method for obtaining a classification model of marine microalgae images according to claim 3, characterized in that: The shared backbone network has a two-order ResNeXt layer, and each of the expert networks has a two-order ResNeXt layer.

6. A method for classifying marine microalgae images, characterized in that: The marine microalgae image classification method classifies the marine microalgae image to be classified based on the final classification model acquired by the marine microalgae image classification model acquisition method according to any one of claims 1 to 5.

7. A classification model acquisition device for marine microalgae images, characterized in that: The device comprises: A modeling module, used to establish an initial classification model, the initial classification model includes a multi-order ResNeXt hierarchy, a feature amplification module and a loss function layer arranged in sequence, the feature amplification module is used to configure amplification ratio information based on the sample category sequence number to amplify the features output by the previous ResNeXt hierarchy, the amplification ratio information is positively correlated with the sample category sequence number, and the sample category sequence number is arranged based on a long-tail distribution; A training module, used for training the initial classification model based on a pre-prepared training data set of marine microalgae images; The deletion module is used to delete the feature amplification module in the initial classification model after the training is completed to obtain the final classification model.

8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the method according to any one of claims 1 to 6 are executed.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are executed.

Citation Information

Patent Citations

  • Vehicle-mounted liquid crystal screen light guide plate defect visual detection method based on target detection network

    CN113421230A

  • Image classification model training method and device, equipment and storage medium

    CN116258911A