Freshwater fish species identification method based on improved ResNet50 model
-
-
Abstract
Abstract: Species identification of freshwater fish has a wide range of applications in most fields, such as breeding, fishing, and processing. However, most traditional algorithms of fish identification cannot meet the ever-increasingly high requirements in recent years, such as simple feature extraction, high accuracy, and portability. In this study, a new identification algorithm was proposed for the freshwater fish species using an improved ResNet50 model. Six types of freshwater fish were taken as the research objects, including the bighead, bream, carp, crucian, grass carp, and silver carp. An image acquisition system was established for the freshwater fish images with a single background. As such, an image dataset of freshwater fish was constructed to joint those images with interference background on the Internet. A Pytorch framework was then selected to perform image preprocessing of freshwater fish for the sample diversity. An improved ResNet50 model was thus built to identify the freshwater fish species. Firstly, the fully connected layer Fc1 and Dropout were added, while the migration learning was introduced to train the model. Secondly, CELU was selected as the activation function to improve the expression of the neural network. Finally, Adam optimization was used to update the gradient. A cosine annealing was also embedded to attenuate the learning rate. In addition, the hyperparameters of the model were optimized in the multiple model training. Correspondingly, six kinds of freshwater fish were identified to verify the accuracy and performance of the improved ResNet50 model. A single validation test under a four-fold cross-validation model was carried out to train and evaluate the model. The confusion matrix was used to visualize the recognition of each type of fish. The results showed that: the image dataset of freshwater fish consisting of a single and interference background images was selected to train the model under the single validation, where the accuracy rate was 96.94%, 1.22% higher than before. The average detection time was 0.2345s for a single freshwater fish image. The accuracy rate of the model was 100% under the four-fold cross-validation, when the dataset of the freshwater fish image was selected with a single background. By contrast, the accuracy rate of the model was 96.20%, when the dataset of freshwater fish image consisted of a single and interference background, indicating an excellent general performance and robustness. The accuracy, recall and F1 score of each type of freshwater fish were relatively high visualized to the confusion matrix, when the model was trained on the freshwater fish image and a single background dataset, indicating the superior performance of the model. The improved ResNet50 model presented a general structure and training, while a high accuracy rate under different backgrounds. The finding can provide a sound technical reference for the identification of freshwater fish species in intelligent aquaculture.
-
-