An underwater fish classification method based on MGO optimized RVFL

By using DarkNet53 to extract image features and combine MGO to optimize the parameters of RVFL, the DarkNet53-MGO-RVFL model was constructed, which solved the problems of low accuracy and slow classification of underwater fish, and achieved efficient and accurate fish classification.

CN117237795BActive Publication Date: 2025-08-19ZHEJIANG SCI-TECH UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311204755.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-19
Publication Date
2025-08-19
Estimated Expiration
2043-09-19

AI Technical Summary

Technical Problem

The existing underwater fish classification methods have low accuracy and slow speed in complex underwater environments, making it difficult to effectively classify and identify fish.

Method used

The pre-trained deep learning neural network DarkNet53 was used to extract image features, and the parameters of the random vector function link network (RVFL) were optimized using the mountain gazelle optimization algorithm (MGO) to build the DarkNet53-MGO-RVFL model for underwater fish classification.

Benefits of technology

It improves the accuracy and efficiency of underwater fish classification, shows excellent classification accuracy and stability, and enhances the efficiency and accuracy of underwater target classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117237795B_ABST
    Figure CN117237795B_ABST
Patent Text Reader

Abstract

This invention discloses a method for underwater fish classification based on MGO-optimized RVFL. The method involves preparing and preprocessing a dataset; extracting image features using DarkNet53; and training the MGO-optimized RVFL model to obtain a DarkNet53-MGO-RVFL model. This method can output fish classification results based on fish images. This method can efficiently classify underwater fish species. The model exhibits excellent prediction accuracy, good convergence, and stability, improving the efficiency and accuracy of underwater target classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of underwater fish classification, and in particular relates to an underwater fish classification method based on MGO optimized RVFL. Background Art

[0002] Underwater target classification refers to the technology and methods of classifying and identifying targets in underwater environments by collecting and processing information such as images and sounds of underwater targets. Underwater target classification is of great significance in the fields of marine engineering, resource development, and ecological protection. Underwater fish population surveys are usually conducted by divers. Although diving visual surveys provide a lot of information about some shallow habitats, they have many limitations. It is important to regularly estimate the relative abundance of fish species in habitats and monitor changes in their populations. Underwater cameras are widely used to monitor marine biodiversity, and this trend is increasing due to the availability of inexpensive active cameras. However, the various challenges posed by underwater environments hinder the use of these technologies in real-world scenarios, resulting in subpar classification accuracy.

[0003] There are many types of fish. The morphological differences between different species of fish in the same genus are small, while the morphological differences of the same species of fish in different physiological stages are large. In the application scenarios where the underwater environment is complex, the water is turbid, the light is weak, and there are many types of underwater targets with different morphologies, fish classification and identification are more difficult. Summary of the Invention

[0004] The purpose of the present invention is to address the problems of low accuracy and slow speed of existing underwater fish classification methods. A method is proposed to extract image features using a pre-trained deep learning neural network DarkNet53, optimize the parameters of a random vector function link network (RVFL) using the Mountain Gazelle Optimizer (MGO), and use the optimized RVFL to classify underwater fish.

[0005] The present invention provides an underwater fish classification method based on MGO optimized RVFL, the method comprising the following steps:

[0006] Step 1: Obtain a dataset of labeled fish species and preprocess it

[0007] Step 2: Build a DarkNet53 feature extraction network based on transfer learning

[0008] Using the ImageNet dataset for pre-training to obtain an initial network model DarkNet53, performing transfer learning on the initial network model DarkNet53, and fine-tuning the network parameters of the initial network model DarkNet53 to obtain a DarkNet53 feature extraction network;

[0009] Step 3: Input the data in the training set into the DarkNet53 feature extraction network obtained in step 2, perform PCA dimensionality reduction, and finally save the image features;

[0010] The dimension of the PCA dimensionality reduction is a parameter that needs to be adjusted. By adjusting the dimension of the dimensionality reduction, the dimension of the PCA dimensionality reduction that minimizes the error of the prediction result is found;

[0011] Step 4: Use the MGO algorithm to optimize the RVFL network and obtain the DarkNet53-MGO-RVFL model

[0012] First, obtain the image features and their corresponding fish label information obtained after PCA dimensionality reduction in step 3;

[0013] Then, the iteration begins: the MGO algorithm is used to update the position of the individual in the MGO algorithm and the corresponding error is calculated. The error is used as the fitness of the individual and the optimal fitness is set. If the fitness of the individual is less than the current optimal fitness, the optimal solution of the population in the MGO algorithm is updated, otherwise it is not updated.

[0014] Set the maximum number of iterations. When the number of iterations reaches the maximum number of iterations, return the optimal solution.

[0015] Based on the returned optimal solution, the input weights Weights, the hidden layer bias bias and the regularization coefficient C of the RVFL network are obtained by matrix rearrangement;

[0016] Multiply the input of the RVFL network by the input weights and add the hidden layer bias to get the matrix H1 after activation by the activation function. Then concatenate the matrix H with the input matrix H2 by rows to get the matrix H. Multiply the Moore-Penrose pseudo-inverse matrix of the matrix H by the output matrix of the RVFL to get the output weight matrix β.

[0017] Based on the input weights Weights, hidden layer bias bias, regularization coefficient C and output weight matrix β of the RVFL network that have been obtained, a DarkNet53-MGO-RVFL model is obtained;

[0018] Input the data in the test set into the DarkNet53-MGO-RVFL model to obtain the predicted value of the test set;

[0019] Set a preset accuracy rate, calculate the accuracy rate of the predicted value, and when the accuracy rate reaches the preset accuracy rate, proceed to step 5; when the accuracy rate does not reach the preset accuracy rate, return to step 4;

[0020] Step 5: Obtain the fish image to be classified and input it into the DarkNet53-MGO-RVFL model to obtain fish classification information.

[0021] Preferably, in step 1, the data set includes Fish4Knowledge and Kaggle FisheriesMonitoring data sets;

[0022] The preprocessing includes: dividing the Fish4Knowledge and Kaggle Fisheries Monitoring datasets into training sets and test sets according to preset ratios respectively; and uniformly setting the length and width of the photos in the datasets to the same preset length and width for subsequent processing.

[0023] Preferably, in step 1, the preset ratio is 9:1; the preset length and width is 256×256.

[0024] Preferably, the calculation of the accuracy of the predicted value includes: comparing the predicted value with the true value represented by the label of the test set, correct classification means that the two values are equal, otherwise it is wrong, and the accuracy is calculated by dividing the correct number by the total number of the test set.

[0025] The present invention has the beneficial effects:

[0026] This paper addresses the low accuracy and slow speed of existing underwater target image classification methods. By proposing a method that uses a pretrained deep learning neural network, DarkNet53, to extract image features, optimizes the RVFL parameters using MGO, and then uses the optimized RVFL to classify target images. This method demonstrates excellent classification accuracy, processing efficiency, and lightweight performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 It is a flow chart of the DarkNet53-MGO-RVFL algorithm constructed by the present invention;

[0028] Figure 2 It is the DarkNet53 feature extraction network structure in the present invention;

[0029] Figure 3 is the RVFL network structure of the present invention;

[0030] Figure 4This is the mapping process from the individual positions of the MGO population to the RVFL parameters in the present invention;

[0031] Figure 5 It is the effect of the number of hidden layer nodes of RVFL on the classification accuracy in the present invention;

[0032] Figure 6 is the effect of the number of iterations and population size of MGO on the classification accuracy in the present invention;

[0033] Figure 7 This is a box plot comparing the stability of DarkNet53-MGO-RVFL of the present invention and other algorithms on the Fish4 Knowledge dataset;

[0034] Figure 8 This is a box plot comparing the stability of DarkNet53-MGO-RVFL and other algorithms on the Kaggle FisheriesMonitoring dataset;

[0035] Figure 9 It is the iterative convergence curve of DarkNet53-MGO-RVFL and other algorithms on the Fish4 Knowledge dataset; Figure 10 It is the iterative convergence curve of DarkNet53-MGO-RVFL and other algorithms on the Kaggle FisheriesMonitoring dataset; DETAILED DESCRIPTION

[0036] The present invention will be further described below with reference to the accompanying drawings.

[0037] like Figure 1 As shown in the figure, an underwater target classification method based on MGO optimized RVFL refers to a method that uses a pre-trained deep learning neural network DarkNet53 to extract image features, uses the Mountain Gazelle Optimizer (MGO) algorithm to optimize the parameters of the Random Vector Functional Link Network (RVFL), and uses the optimized RVFL to perform target image classification.

[0038] The present invention comprises the following steps:

[0039] Step 1: Prepare the dataset and perform preprocessing

[0040] This paper requires datasets suitable for underwater fish classification, and therefore uses the Fish4Knowledge and Kaggle Fisheries Monitoring datasets. The Fish4Knowledge dataset is a dataset of underwater fish, containing 30 species. The classification targets are 10 species: Abudefduf vaigiensis, Acanthurus nigrofuscus, Amphiprion clarkia, Chaetodon lunulatus, Chaetodon trifascialis, Hemigymnusfasciatus, Lutjanus fulvus, Myripristis kuntee, Neoniphon samara, and Plectroglyphidodon dickii, resulting in 10,000 images. The Kaggle FisheriesMonitoring dataset, collected from a Kaggle competition, contains images of underwater fish from the Brazilian Amazon River. The classification targets were eight fish species: black sea sprat, gilthead bream, horse mackerel, red mullet, red sea bream, sea bass, shrimp, and striped red mullet. 1,000 images of each species were collected, for a total of 8,000 images. The two datasets were split into training and test sets using a preset 9:1 ratio. The images in the datasets were uniformly formatted to a default 256×256 width and height for ease of processing.

[0041] Step 2: Build a DarkNet53 feature extraction network based on transfer learning

[0042] With the development of convolutional neural networks, typical neural networks such as ResNet, EfficientNet, GoogleNet, and DarkNet have been proposed. ResNet has the advantages of a deeper network structure and efficient resource utilization, but it is prone to overfitting, poor interpretability, and a large number of parameters. GoogleNet has a relatively simple neural network structure and may not be suitable for production needs. EfficientNet is characterized by high accuracy, efficiency, and scalability, but it also has the disadvantages of long training time, unsuitability for small datasets, and a large number of parameters.

[0043] DarkNet53 is a convolutional neural network model proposed by Yolo authors Joseph Redmon and Ali Farhadi in 2018. It is one of the core models of the DarkNet framework. It is lightweight, highly accurate, flexible, and has strong generalization capabilities. It uses residual connections to help the network better learn deep features. It is mainly used in computer vision tasks such as image classification and object detection. Figure 2 As shown in Figure 1, the main structure of DarkNet53 is a 53-layer deep convolutional neural network, which includes 52 convolutional layers and 1 global average pooling layer. Unlike traditional convolutional neural networks, DarkNet53 uses a residual structure, which adds cross-layer connections in the convolutional layers, making the model deeper and more accurate.

[0044] First, we pre-trained the ImageNet dataset to obtain the initial network model DarkNet53. Then, we migrated it to our initial network model through transfer learning and fine-tuned the network parameters to obtain the DarkNet53 feature extraction network. This network was used as the feature extractor for subsequent image feature extraction.

[0045] Step 3: DarkNet53 for image feature extraction

[0046] The proposed algorithm combines DarkNet53 with the MGO-optimized RVFL to predict underwater fish classification. It combines the rich feature extraction capabilities of DarkNet53 with the excellent classification and prediction performance of RVFL. The previous step generates a DarkNet53 feature extraction network based on transfer learning. This step details how to use the DarkNet53 feature extraction network for image feature extraction.

[0047] This method uses DarkNet53 to extract image features. First, a dataset must be prepared, which is then divided into training and test sets, and labels and feature data are extracted. The training set is then processed using DarkNet53 to extract image features, followed by PCA (Principal Component Analysis) dimensionality reduction. Finally, the features are saved for subsequent model training.

[0048] (3.1) DarkNet53 extracts image features

[0049] The first convolutional layer inputs a 256×256×3 image, passes through 32 convolution kernels of size 3×3, and outputs an image of size 256×256×32.

[0050] The second step uses residual blocks. Each residual block consists of two convolutional kernels of size 1×1 and 3×3, and a skip connection. Each residual block is followed by a max pooling layer to reduce the image size. Each residual block doubles the number of channels in the image. After multiple residual blocks and max pooling layers, the output image size is 8×8×2024.

[0051] Finally, the image is put into the global average pooling layer, which outputs a vector of 1×1×2048. This vector is then input into a fully connected layer to map it to an output vector of 1×1×1024.

[0052] (3.2) PCA (Principal Component Analysis) Dimensionality Reduction

[0053] Before model training, features often have high dimensionality. Therefore, data dimensionality reduction is often necessary to optimize model training. PCA is a commonly used dimensionality reduction method, reducing the dimensionality of large data, thereby reducing computational complexity and improving model training efficiency. Before using the RVFL classifier, PCA is applied to the 1024-dimensional features extracted using DarkNet53. The resulting dimensionality is used as the number of nodes in the RVFL input layer, and the reduced dimensionality features are then fed into RVFL. The PCA parameter is set to 0.99 to retain at least 99% of the principal component variance. The PCA function automatically calculates the principal component variances based on the input data and selects the minimum principal components whose sum is greater than or equal to the specified variance contribution. This makes the data more compact and efficient, optimizes the number of nodes in the RVFL input layer, and improves model training efficiency and accuracy.

[0054] Step 4: Train the MGO-optimized RVFL model

[0055] The ultimate goal of this invention is to use the RVFL model to predict the extracted features, so it is necessary to first obtain the RVFL model after MGO optimization. Because the input weights and hidden layer bias of RVFL are random, MGO is used to optimize these two parameters. The algorithm model is as follows Figure 1 As shown in the figure, the algorithm first uses DarkNet53 to extract the image features of the training set, and then obtains the optimal input weights Weights, hidden layer bias bias, regularization coefficient C and error combination through the obtained training set features MGO algorithm, further completes the training of the RVFL model, and obtains the required RVFL output weight ββ.

[0056] This step mainly explains how to obtain the required optimal input weights, hidden layer bias, regularization coefficient C and error, and the final RVFL output weight β through experiments, thereby obtaining a trained model.

[0057] First, we briefly introduce the MGO algorithm and RVFL network.

[0058] 1.MGO algorithm

[0059] The Mountain Gazelle Optimizer (MGO) is a new nature-inspired metaheuristic algorithm designed to solve global optimization problems. The algorithm mimics the behavior of mountain gazelle in nature, with a different update mechanism and adaptive algorithm parameters, resulting in fast convergence and global optimization capabilities.

[0060] The basic steps of the MGO algorithm include initialization, population update, and convergence detection. During initialization, basic information such as population size, number of iterations, and algorithm parameters are set. Population update is the core of the MGO algorithm, which is divided into three parts: update based on jumping ability, update based on climbing ability, and update based on running ability. The jumping ability update mainly increases the global search capability by jumping population members toward the target direction. The climbing ability update mainly uses an idea similar to the hill climbing algorithm to decide whether to update the current solution by comparing the quality of the neighborhood solutions. The running ability update is based on the speed and position information of the population members. By updating the speed and position of the population members, the convergence speed and global optimization capability of the algorithm are increased.

[0061] In the MGO algorithm's convergence check, preset termination criteria are used to determine whether the algorithm has reached the optimal solution. These criteria include the maximum number of iterations and the convergence rate of the objective function. If the algorithm reaches the termination criteria, the algorithm terminates; otherwise, the population update process continues.

[0062] In summary, the MGO algorithm simulates the behavior of mountain antelopes in nature, introduces different update mechanisms and adaptive algorithm parameters, and achieves global optimization capabilities and rapid convergence. This algorithm requires no prior knowledge or human intervention, exhibits excellent adaptability and scalability, and has broad practical application prospects. The MGO algorithm has the following advantages:

[0063] ① Fast convergence speed: The MGO algorithm can quickly find the global optimal solution because it takes advantage of swarm intelligence and uses adaptive strategies to quickly adapt to complex optimization problems.

[0064] ② Strong robustness: The MGO algorithm can effectively overcome local minima in the search space because it is diverse and random and can explore in multiple search spaces, thus avoiding falling into local optimal solutions.

[0065] ③Good scalability: The MGO algorithm can be used to solve various types of optimization problems because its design is general and can adapt to a variety of different optimization problems.

[0066] ④ Few algorithm parameters: The MGO algorithm has few parameters. Only some basic parameters need to be set, such as population size and maximum number of iterations, so it is easy to use and implement.

[0067] ⑤ Efficiency: Because the MGO algorithm is an optimization algorithm based on swarm intelligence, it can leverage the advantages of parallel computing to achieve highly efficient computation on multi-core processors and in distributed computing environments. To verify the advantages of the MGO algorithm, we also compared it with other optimization algorithms.

[0068] MGO can be described as the following mathematical model:

[0069] The update formula for the mountain gazelle's position is:

[0070]

[0071]

[0072] in, represents the position of the i-th mountain gazelle in the j-th dimension at the t-th iteration, is a random number ranging from [0,1], p ij It is a random number in the range of [0,1]. p1 is an adjustable parameter. rand() means generating a random number.

[0073] The speed update formula of the mountain gazelle is:

[0074]

[0075] in, represents the velocity inertia factor of the i-th mountain gazelle in the j-th dimension at the t-th iteration, c1 and c2 are acceleration coefficients, Pbest represents the optimal position of the i-th mountain gazelle in the first t iterations, and Gbest represents the value of the optimal position of all mountain gazelles in the first t iterations in the j-th dimension.

[0076] The acceleration update formula of the mountain gazelle is:

[0077]

[0078] in, represents the speed scaling factor of the i-th mountain gazelle at the t-th iteration, s max and s min They are the upper and lower limits of the velocity scaling factor, which are adjustable. α is a parameter that controls the magnitude of acceleration.

[0079] Mountain Gazelle jumping ability update formula:

[0080]

[0081] Here, i, j, and k represent the individual index, dimension index, and jump index in the population, respectively. r is a random number sampled uniformly from the interval [0, 1]. The Round() function rounds the number to the nearest integer. The formula states: If the current individual's jump ability is less than the maximum jump ability, the jump is updated based on the current individual's jump ability and the random number. If the current individual's jump ability is greater than or equal to the maximum jump ability, the jump is updated to the maximum jump ability.

[0082] 2.RVFL Network

[0083] Traditional Softmax classifiers suffer from high computational complexity, prone to overfitting, sensitivity to outliers, and imbalanced classification. Unlike traditional classifiers, the weights of neurons in the hidden layer of RVFL are randomly initialized, eliminating the need for backpropagation training. RVFL offers fast training, low computational complexity, and strong robustness to noise and overfitting, making it suitable for specific application scenarios such as classification and regression tasks.

[0084] The following is the structure of the RVFL neural network. The input layer receives raw data as input, and the hidden layer contains a large number of linear neurons with random weights. In RVFL, the weights of the hidden layer are randomly initialized. Its randomness makes the network more robust to noise and overfitting. The network structure is as follows Figure 3 shown

[0085] The RVFL model can be expressed as:

[0086]

[0087] where X i =[x i1 ,x i2 ,......x in ] T ∈R n ;o i =[o i1 ,o i2 ,......,o im ] T ∈R m; n, m are vector dimensions, L is the number of hidden layer nodes. W j =[w j1 ,w j2 ,......,w jn ] T is the input weight; b j =[b j1 ,b j2 ,......,b jn ] T is the bias; g(x) is the activation function Sigmoid; d is the input data dimension; β j =[β j1 ,β j2 ,.......,β jm ] T is the output weight; RVFL randomly generates W j and b j .

[0088] Formula (6) can be simplified to:

[0089] Hβ=o (7)

[0090] In formula (7), the matrix H is the input multiplied by the input weights Weights plus the hidden layer bias bias activated by the activation function, and the matrix H is concatenated with the input matrix H2 by row; β is the output weight; o is the expected output; the parts are shown below:

[0091]

[0092]

[0093]

[0094] In order to obtain the output weight and make the output error reaches the minimum value 0, so let So formula (7) can be transformed into solving Among them H + is the Moore-Penrose pseudoinverse of the matrix H.

[0095] 3. DarkNet53-MGO-RVFL underwater target classification model

[0096] Using DarkNet53-MGO-RVFL to classify underwater images demonstrates the high classification accuracy of MGO-RVFL and the efficient feature extraction of DarkNet53. The classification process of the DarkNet53-MGO-RVFL model involves the following three steps:

[0097] The first step is to use DarkNet53 to extract features from underwater target images. DarkNet53 performs batch normalization after each convolution to accelerate network convergence and improve generalization capabilities.

[0098] The second step is to use PCA to reduce the dimensionality of the extracted features. The dimension obtained by dimensionality reduction is the number of input layer nodes of RVFL. That is, optimizing the number of input layer nodes can reduce the number of input nodes while retaining the main information of the data set, thereby speeding up the calculation.

[0099] The third step is to classify the features using MGO-RVFL. First, the reduced image features and label information are obtained. The RVFL input weights (weights), hidden layer bias (bias), regularization coefficient (C), and error are then used as MGO parameters. The MGO algorithm then updates the individual's position and calculates the corresponding error. The error is used as the individual's fitness. If the calculated fitness is less than the current optimal fitness, the optimal solution in the population is updated; otherwise, no update is made. The optimal solution is returned after the number of iterations reaches a maximum. The RVFL weights, bias, and C are calculated after the algorithm completes the optimal solution and is rearranged. Next, the output weight matrix β is derived. The RVFL input is multiplied by the input weights and then activated by the hidden layer bias. This is followed by activation by the activation function to obtain the matrix H1. This matrix is concatenated with the input matrix H2 by rows to form the matrix H. The output weight matrix β is then multiplied by the Moore-Penrose pseudo-inverse of H to obtain the RVFL output matrix.

[0100] Then, by combining the data of the test set with the previously obtained optimal Weights, bias, C and derived β, the predicted value of the test set is obtained. The process of the DarkNet53-MGO-RVFL algorithm is as follows Figure 1 shown.

[0101] Figure 4The figure shows the mapping process from the individual positions of the MGO population to the RVFL parameters. Here, m and n represent the number of hidden layer nodes and input layer nodes of the RVFL, respectively. W and b represent the input weights and hidden layer biases of the RVFL, respectively. C represents the regularization coefficient of the RVFL, and β represents the output weights of the RVFL. As can be seen from the figure, in the MGO optimization algorithm, the position of the individual in the population is a row vector of dimension m×(n+1)+1. The first m×n particles of the individual position in the population are divided into the input weights of the RVFL, which are rearranged into an m×n matrix to serve as the input weights of the RVFL. The next m particles are divided into the hidden layer bias of the RVFL, which are rearranged into an m×1 column vector. It can be used as the hidden layer bias of the RVFL. The last particle is the regularization coefficient of the RVFL. To derive the output weight matrix β, the RVFL input is multiplied by the input weights Weights and the hidden layer bias is activated by the activation function to obtain the matrix H1, which is concatenated with the input matrix H2 by rows to form the matrix H. The output weight matrix β can be obtained by multiplying the Moore-Penrose pseudo-inverse matrix of the matrix H by the output matrix of the RVFL.

[0102] The following are the specific model training steps.

[0103] (4.1) Selection of RVFL activation function

[0104] Different activation functions have different effects on RVFL classification. To select the most effective activation function for RVFL, we compared several different activation functions. Table 1 shows the classification accuracy results for RVFL using these activation functions. The data in this table clearly demonstrates that Sigmod performs relatively well. All subsequent experiments will use Sigmod.

[0105] Table 1 Effect of activation function on classification accuracy

[0106]

[0107]

[0108] (4.2) The impact of the number of hidden layer nodes on the RVFL algorithm

[0109] The number of hidden layer nodes of RVFL is also an important parameter. When the number is too large, overfitting will occur, and when it is too small, the model accuracy is not high. In order to find a relatively good value, the number of hidden layer nodes is set to 5 to 100, and the accuracy of the models of different optimization algorithms with different numbers is compared. The experimental results are shown in Table 2 and Figure 5 shown.

[0110] Table 2 Impact of the number of nodes on classification accuracy

[0111]

[0112] From Table 2 and Figure 5 It can be seen that the accuracy of different models will continue to increase with the increase in the number, and tend to be stable after 80. When the optimization algorithm selects MGO, the accuracy is the highest. Through the above experimental content, in order to obtain a better accuracy, the number is set to 80.

[0113] (4.3) Parameter study of MGO algorithm

[0114] The population size and the number of iterations have a great influence on MGO. The values of these two parameters are selected as 10 to 50 and 5 to 25, and each combination is tested in DarkNet53-MGORVFL to obtain relatively good parameter values. The number of hidden layer nodes is set to 80. The accuracy is shown in Table 3 below. Figure 6 shown.

[0115] Table 3. The impact of iteration number and population size on classification accuracy

[0116]

[0117] As shown in Table 3 and Figure 6 It can be seen that when the population size and the number of iterations increase, the accuracy of the model increases and finally tends to be stable. When the population size is selected as 40 and 50, the model accuracy remains basically unchanged. In order to improve the accuracy of the model and speed up the calculation, this experiment selects a population size of 40. Because it will be compared with other algorithms later, the number of iterations is selected as 40, which can reduce the impact caused by the inconsistent convergence speed of different algorithms.

[0118] (4.4) Final parameter setting of the algorithm

[0119] The parameter settings of RVFL and the three optimization algorithms of MGO, MFO, and GWO are shown in Table 4.

[0120] Table 4 Parameter settings

[0121]

[0122] Step 5: Output underwater target classification results

[0123] After completing the training of the DarkNet53-MGO-RVFL model, the test set is input into the trained DarkNet53-MGO-RVFL model to obtain the final predicted fish species classification results.

[0124] Then a comparative analysis of algorithm performance is conducted.

[0125] Eight algorithms were tested on the Fish4 Knowledge and Kaggle Fisheries Monitoring datasets. Each experiment was run 10 times to avoid errors. Tables 5 and 6 show the experimental results of different models.

[0126] Table 5 Experimental results on the Fish4 Knowledge dataset (the best value is shown in bold)

[0127]

[0128] Table 6 Experimental results on the Kaggle Fisheries Monitoring dataset (the best value is shown in bold)

[0129]

[0130] As shown in Table 5, the maximum, minimum, and average accuracy of the DarkNet53-MGO-RVFL algorithm are better than those of other algorithms, and the standard deviation is slightly worse than that of DarkNet53-GWO-RVFL. As shown in Table 6, the maximum, minimum, average accuracy, and standard deviation of the DarkNet53-MGO-RVFL algorithm are better than those of other classification algorithms.

[0131] Algorithm stability analysis:

[0132] In order to verify the stability of the DarkNet53-MGO-RVFL algorithm, we compare it with the box plots of the other algorithms. We draw the 10 results of each algorithm into a box plot. The higher the accuracy of the algorithm, the higher the median line on the box plot. The stability of the algorithm is determined by comparing the size of the box, that is, the distance between the upper and lower quartiles. The larger the box and the farther the distance, the more unstable it is, and vice versa. Figure 7 As shown in the figure, A, B, C, D, E, F, G, and H represent DarkNet53-MGO-RVFL, DarkNet53-MFO-RVFL, DarkNet53-GWO-RVFL, DarkNet53-RVFL, ResNet50-MGO-RVFL, ResNet50-MFO-RVFL, ResNet50-GWO-RVFL, and ResNet50-RVFL. On the Fish4 Knowledge dataset, the stability of the DarkNet53-MGO-RVFL proposed in this paper is slightly worse than that of DarkNet53-GWORVFL, but its accuracy is the best among all algorithms. Since the optimization algorithm is not used to optimize the parameters, the accuracy and stability of DarkNet53-RVFL and ResNet-RVFL are the worst.

[0133] Depend on Figure 8 As shown in the figure, A, B, C, D, E, F, G, and H represent DarkNet53-MGO-RVFL, DarkNet53-MFO-RVFL, DarkNet53-GWO-RVFL, DarkNet53-RVFL, ResNet50-MGO-RVFL, ResNet50-MFO-RVFL, ResNet50-GWO-RVFL, and ResNet50-RVFL, respectively. The stability and accuracy of the DarkNet53-MGO-RVFL algorithm proposed in this paper are the best on the Kaggle Fisheries Monitoring dataset.

[0134] Algorithm convergence analysis:

[0135] On the Fish4 Knowledge dataset, the convergence characteristics of the proposed DarkNet53-MGO-RVFL algorithm are explored by comparing its convergence with those of DarkNet53-MGO-RVFL, DarkNet53-MFO-RVFL, DarkNet53-GWO-RVFL, ResNet50-MGO-RVFL, ResNet50-MFO-RVFL, and ResNet50-GWO-RVFL algorithms during optimization. Figure 9 The following are the convergence curves of the six algorithms. It can be seen from the figure that DarkNet53-MGO-RVFL has better convergence than other optimization algorithms and reaches convergence the fastest. It can achieve better results when optimizing the parameters of RVFL.

[0136] On the Kaggle Fisheries Monitoring dataset, the convergence curves of DarkNet53-MGO-RVFL, DarkNet53-MFO-RVFL, DarkNet53-GWO-RVFL, ResNet50-MGO-RVFL, ResNet50-MFO-RVFL, and ResNet50-GWO-RVFL are compared to determine the convergence of DarkNet53-MGO-RVFL. Figure 10 The following are the convergence curves of the six algorithms. As can be seen from the figure, DarkNet53-MGO-RVFL has better convergence than the other optimization algorithms and reaches convergence the fastest, which can achieve better results when optimizing the RVFL parameters.

[0137] According to experiments, it can be concluded that the maximum, minimum, average accuracy and standard deviation of the classification of the model proposed by the present invention are greater than those of other algorithm models, and it has excellent classification prediction performance.

Claims

1. An underwater fish classification method based on MGO optimized RVFL, characterized in that: The method comprises the following steps: Step 1: Obtain a dataset of labeled fish species and preprocess it Step 2: Build a DarkNet53 feature extraction network based on transfer learning Using the ImageNet dataset for pre-training to obtain an initial network model DarkNet53, performing transfer learning on the initial network model DarkNet53, and fine-tuning the network parameters of the initial network model DarkNet53 to obtain a DarkNet53 feature extraction network; Step 3: Input the data in the training set into the DarkNet53 feature extraction network obtained in step 2, perform PCA dimensionality reduction, and finally save the image features; The dimension of the PCA dimensionality reduction is a parameter that needs to be adjusted. By adjusting the dimension of the dimensionality reduction, the dimension of the PCA dimensionality reduction that minimizes the error of the prediction result is found; Step 4: Use the MGO algorithm to optimize the RVFL network and obtain the DarkNet53-MGO-RVFL model First, obtain the image features and their corresponding fish label information obtained after PCA dimensionality reduction in step 3; Then, the iteration begins: the position of the individual in the MGO algorithm is updated using the MGO algorithm and the corresponding error is calculated. The error is used as the fitness of the individual and the optimal fitness is set. If the fitness of the individual is less than the current optimal fitness, the optimal solution of the population in the MGO algorithm is updated, otherwise it is not updated. Set the maximum number of iterations. When the number of iterations reaches the maximum number of iterations, return the optimal solution. Based on the returned optimal solution, the input weights Weights, the hidden layer bias bias and the regularization coefficient C of the RVFL network are obtained by matrix rearrangement; Multiply the input of the RVFL network by the input weights and add the hidden layer bias to get the matrix H1 after activation by the activation function. Then concatenate the matrix H with the input matrix H2 by rows to get the matrix H. Multiply the Moore-Penrose pseudo-inverse matrix of the matrix H by the output matrix of the RVFL to get the output weight matrix β. Based on the input weights Weights, hidden layer bias bias, regularization coefficient C and output weight matrix β of the RVFL network that have been obtained, a DarkNet53-MGO-RVFL model is obtained; Input the data in the test set into the DarkNet53-MGO-RVFL model to obtain the predicted value of the test set; Set a preset accuracy rate, calculate the accuracy rate of the predicted value, and when the accuracy rate reaches the preset accuracy rate, proceed to step 5; when the accuracy rate does not reach the preset accuracy rate, return to step 4; Step 5: Obtain the fish image to be classified and input it into the DarkNet53-MGO-RVFL model to obtain fish classification information.

2. The underwater fish classification method based on MGO optimized RVFL according to claim 1, characterized in that: In the step 1, Said datasets include Fish4Knowledge and Kaggle Fisheries Monitoring datasets; The preprocessing includes: dividing the Fish4Knowledge and Kaggle Fisheries Monitoring datasets into training sets and test sets according to preset ratios respectively; and uniformly setting the length and width of the photos in the datasets to the same preset length and width for subsequent processing.

3. The underwater fish classification method based on MGO optimized RVFL according to claim 2, characterized in that: In step 1, the preset ratio is 9:1; the preset length and width are 256×256.

4. The underwater fish classification method based on MGO optimized RVFL according to claim 3, characterized in that: The calculation of the accuracy of the predicted value includes: comparing the predicted value with the true value represented by the label of the test set. A correct classification means that the two values are equal, otherwise it is an error. The accuracy is calculated by dividing the number of correct values by the total number of the test set.

Citation Information

Patent Citations

  • Method for identifying Manuka honey based on SIMCA model

    CN108614000A

  • Night underwater fish target detection method

    CN112232180A