| Ocean resources are an essential component of human survival and development,and fish,as an important resource,have high economic and scientific research value.However,traditional fish classification methods are subject to subjectivity and professional limitations,making it difficult to meet the needs of large-scale data processing and automated classification.Therefore,fish detection and classification methods based on deep learning technology have gained widespread attention.This study uses deep learning technology to construct a two-stage fish object detection and classification model.The main work includes:1).Due to the difficulty of YOLOv5 object detection network in effectively classifying fish subclasses and its inability to meet the requirements of object detection on self-built fish datasets,this study constructs a two-stage fish detection and classification model.In the first stage,this study uses the YOLOv5s object detection network with added SimAM attention to identify fish as a class and achieve target localization for each fish in the image.In the second stage,this study uses a machine learning classifier based on the ResNet50 network to classify the located fish.Experiments show that the YOLOv5s network with added SimAM attention can effectively improve precision and recall,reaching 80.7% and 81.5%,respectively,while mAP@0.5 and mAP@0.5:0.95 reach 81% and 51.2%,respectively,while keeping the network parameter volume unchanged.2)In response to the overfitting problem of deep learning classification networks on smallsample data in self-built datasets,this study constructs a classification network model,using the ResNet50 network as the feature extractor,and using machine learning methods in place of ResNet50’s fully connected layer as the classifier.The feature extractor is trained using transfer learning,converting the original dataset images into high-dimensional feature vectors,and using Grid Search in sklearn to optimize hyperparameters for three classifiers: Random Forest,Support Vector Machine,and K-Nearest Neighbor,to determine the best hyperparameter combination on the fish data set.Then,cross-validation is used to evaluate the performance of each combination.The SVM with the best classification effect was selected as the classifier for the classification network model.Compared with the original ResNet50 network,the ResNet50-SVM network classification model achieves a top1 accuracy rate of 97.7% and a top5 accuracy rate of 99.9% on the test set.This study also compares Mobile Netv3,VGG16,Inceptionv3,and ResNeSt-101 e networks to validate the effectiveness of the proposed fish classification model.3)In response to the lack of practical application in current fish classification research,this study uses the two-stage fish detection and classification model constructed above to build a multi-terminal cross-platform fish classification system using Django technology,PyQt5 framework,Web framework,and We Chat Small Program framework,achieving the function of identifying fish species and information based on user uploaded images.The system supports multiple devices and operating systems,and the fish detection and classification system based on C/S and B/S architecture can realize remote calling and data exchange,providing users with fast access to fish classification results.Experimental results show that the proposed fish classification system has the advantages of high efficiency,accuracy,stability,and reliability,with a good user interface and interactive experience,providing a convenient tool for fish enthusiasts and researchers to meet practical application requirements. |