Method for determining black shell area of oysters caused by polynices polynices based on deep learning
By automatically measuring the black shell area of oysters using deep learning technology, the problems of low efficiency and strong subjectivity of traditional methods are solved, and the quantification of the black shell area of oysters is achieved quickly and accurately, which is suitable for real-time monitoring and control in large-scale aquaculture.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTH CHINA SEA FISHERIES RES INST CHINESE ACAD OF FISHERY SCI
- Filing Date
- 2025-01-13
- Publication Date
- 2026-07-21
AI Technical Summary
Traditional methods for determining the black shell area of oysters rely on manual observation and measurement, which is inefficient, time-consuming, and subjective, making it difficult to meet the needs of precise monitoring and timely disease control in large-scale aquaculture.
Using deep learning technology, image data is acquired through high-resolution imaging equipment. DeepLabV3 is used to improve the network and add the CBAM attention mechanism for image preprocessing and model training. Features are automatically extracted to achieve segmentation and area calculation of the black shell region of oysters.
It enables rapid, objective, and high-precision quantitative analysis of oyster black shell area, reducing errors. It is suitable for real-time monitoring and control in large-scale aquaculture and has high versatility and scalability.
Smart Images

Figure CN122435006A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of aquaculture technology, and more specifically discloses a method for determining the area of black shells in oysters caused by the insect *Cyprinus spp.* based on deep learning. Background Technology
[0002] In modern marine aquaculture, oysters are an important economic shellfish, and the aquaculture industry is large-scale. However, the black shell phenomenon caused by the oyster worm *Gnaphalium affine* has become a key problem that seriously restricts the efficiency and quality improvement of oyster farming. Traditionally, the determination of the black shell area of oysters mainly relies on manual observation and measurement. This method is not only inefficient and consumes a lot of manpower and time, but also highly subjective and prone to large errors, making it difficult to meet the needs of precise monitoring and timely disease control in large-scale aquaculture.
[0003] With the rapid development of computer technology, deep learning has demonstrated outstanding performance in fields such as image recognition and analysis. It can efficiently process massive amounts of image data and accurately extract complex features, and has been widely applied in various fields such as medical image diagnosis and agricultural pest and disease identification. In the field of marine aquaculture, the introduction of deep learning technology to determine the area of black shells on oysters caused by the insect *Gnaphalium affine* is expected to overcome the shortcomings of traditional measurement methods, achieving rapid, objective, and high-precision quantitative analysis of black shell area. This will provide new technical support and decision-making basis for intelligent management, disease early warning, and scientific prevention and control in oyster farming, promoting the modernization and precision of marine aquaculture. Summary of the Invention
[0004] Purpose of the invention: The purpose of this invention is to solve the problem that the determination of the black shell area of oysters mainly relies on manual observation and measurement. This method is not only inefficient and consumes a lot of manpower and time, but also highly subjective and prone to errors, making it difficult to meet the needs of accurate monitoring and timely disease control in large-scale aquaculture.
[0005] To solve the above-mentioned technical problems, according to one aspect of the present invention, more specifically, a method for determining the area of black shells of oysters caused by the insect *Gnaphalium affine* based on deep learning, comprising the following steps:
[0006] S1. Data acquisition of oyster black shell images: Oyster samples infected with *Ceratophyllum demersum* were collected from aquaculture environments, and then images of the samples were acquired using high-resolution imaging equipment.
[0007] S2. Data preprocessing: The acquired images are denoised to remove background noise and artifacts introduced by the imaging equipment. Then, based on the DeepLabV3 improved network and with the addition of the CBAM attention mechanism, the black shell region of the acquired oyster images is segmented. Afterwards, in order to increase the scale and diversity of the dataset and reduce the risk of model overfitting, data augmentation operations are performed on the labeled images, including but not limited to rotation, flipping, scaling, translation geometric transformations, as well as brightness adjustment, contrast adjustment and photometric transformation with added noise.
[0008] S3. Deep Learning Model Selection and Construction: Convolutional Neural Network (CNN) was selected as the basic model architecture to automatically extract features from the image. Then, the model was built based on DeepLabV3. DeepLabV3 mainly adopts an encoder-decoder structure, where the encoder part is used to extract image features, while the decoder part is used to recover spatial information and generate the final segmentation result.
[0009] Encoder: The encoder uses a deep convolutional neural network (DCNN) as the backbone. After pre-training, it can extract high-level features of the image. In DeepLabV3, dilated / atrous convolution and atrous spatial pyramid pooling (ASPP) modules are introduced to enhance the feature extraction capability.
[0010] S4. Model training: Divide the preprocessed dataset into training, validation and test sets according to a certain ratio. Then, select an appropriate loss function according to the nature of the damage classification problem. After that, use an optimization algorithm to update the model parameters. Finally, use the preprocessed dataset to train the DeepLabV3 model.
[0011] S5. Model Evaluation and Optimization: Evaluate the model's performance on the validation set using accuracy, recall, F1 score, or intersection-over-union (IoU). Then, adjust the model's learning rate, batch size, or dilation rate based on the evaluation results. Afterward, use a deeper backbone network, introduce an attention mechanism, and use a complex loss function to improve the model's performance.
[0012] S6. Damage Severity Analysis and Visualization: The trained model is applied to real-world data to measure the area of blackened oyster shells caused by the 'Gnaphalium affine' in real time. For newly acquired images, the model quickly outputs the damage area results, providing timely information for aquaculture and marine conservation workers. Then, by analyzing historical and real-time data using the model, the development trend of the 'Gnaphalium affine' damage area is predicted. Visualization tools such as line graphs and heat maps are used to show the changes in damage severity over time and space, intuitively presenting the dynamic evolution of 'Gnaphalium affine' damage and assisting in decision-making.
[0013] Furthermore, in step S1, during the collection of oyster samples infected with *Gnaphalium affine*, the samples should cover different degrees of damage to ensure the diversity and comprehensiveness of the data. At the same time, for each sample, images should be taken from multiple angles and at different magnifications to obtain images that comprehensively display the damage characteristics of *Gnaphalium affine*, and the resolution and quality of the images should meet the requirements of subsequent deep learning models for detail recognition.
[0014] Furthermore, in S2, during the data preprocessing, classic image filtering methods such as median filtering and Gaussian filtering are used to ensure image quality. Then, the image is cropped to remove unnecessary edge areas, so that the image content focuses on the areas related to the damage of the worm, thereby improving the model training efficiency and accuracy.
[0015] Furthermore, in S3, during the deep learning model selection and construction process, dilated convolution is used: dilated convolution injects holes into the standard convolution kernel to increase the receptive field, thereby capturing a wider range of contextual information. By adjusting the dilation rate, the number of intervals of the convolution kernel is controlled, thereby controlling the size of the receptive field.
[0016] Spatial Pyramid Pooling (ASPP) Module: The ASPP module consists of multiple parallel dilated convolutions, each with a different dilation rate. These dilated convolutions can capture features at different scales and are integrated through concatenation and subsequent 1x1 convolutions. In addition, the ASPP module also includes a Global Average Pooling branch to capture global contextual information.
[0017] Decoder: The decoder is responsible for fusing the high-level features extracted by the encoder with the low-level features and restoring the spatial information. The decoder upsamples the feature map output by the encoder, then concatenates or adds it with the low-level features from the backbone network. Finally, the final segmentation result is generated through convolutional layers.
[0018] Furthermore, in step S2, during the image denoising process, grayscale value information is collected and analyzed to obtain the grayscale value of the denoised image.
[0019] y (m,n) =median{x (m+k,n+l)}
[0020] Among them, y (m,n) To represent the grayscale value at pixel position (m, n) in the denoised image, `median{}` performs a median operation, which sorts all values within the parentheses and selects the median value as the result. (m+k,n+l) is the gray value of the original image at pixel position (m+k, n+l), where k and l are the offsets within the filter window.
[0021] Furthermore, in step S4, during the selection of the loss function, the cross-entropy loss function is used to classify the degree of damage. The specific formula for the cross-entropy loss function is as follows:
[0022]
[0023] Where L is the value of the loss function, representing the degree of difference between the model's predicted result and the true label, q is the number of samples, i.e., the total number of categories in the classification problem, and p i Let p be the true label of the i-th sample. For a binary classification problem, p i The value can be 0 or 1. Let be the predicted probability of the i-th sample, that is, the probability that the model considers the sample to belong to the positive class.
[0024] Furthermore, in step S6, during the analysis of oyster shell damage, information data on the number of pixels in the black shell area and the total shell area are collected and analyzed to determine the black shell area.
[0025]
[0026] Among them, S bk S represents the area of the oyster's black shell, N is the number of pixels in the black shell area, and S... e The actual physical area corresponding to each pixel is P, which is the proportion of the black shell area of the oyster, and S is the area of the entire oyster shell.
[0027] The beneficial effects of the method for determining the area of black shells in oysters caused by the 'Gymnocalycium mihanovichii' based on deep learning in this invention are as follows:
[0028] 1. Deep learning models can automatically learn the image features of the silkworm and its damage. Compared with traditional manual assessment or simple rule-based analysis methods, the assessment of the degree of damage to the silkworm is more accurate and detailed, which can effectively reduce the misjudgment rate and provide a more reliable basis for subsequent prevention and control decisions.
[0029] 2. This method can quickly process a large number of images, enabling rapid analysis and assessment of the damage area of the worm, greatly saving the time and manpower costs required for manual observation, measurement and analysis. It is especially suitable for large-scale aquaculture areas or marine ecological monitoring projects, and can provide timely data support for relevant management and decision-making.
[0030] 3. The analysis process of deep learning models is data-driven and unaffected by subjective factors. It avoids the evaluation differences caused by personal experience, fatigue, emotions and other factors in manual evaluation, and ensures the objectivity and consistency of the analysis results. Different researchers or monitors can obtain the same evaluation results by using this method, which is conducive to data comparison and sharing.
[0031] 4. As the amount of data increases and new feature data is introduced, deep learning models can be continuously optimized and updated to adapt to more complex real-world situations and higher analytical requirements. Furthermore, this method can be easily extended to other similar fields of biological damage assessment or pest and disease monitoring, demonstrating high versatility and scalability.
[0032] 5. This invention provides a new and powerful tool for research in marine biology, aquaculture, and related fields. It helps to gain a deeper understanding of the ecological habits of the *Gymnocladus orientalis*, its interaction with its host, and its impact on marine ecosystems, thus promoting the development of related disciplines and providing theoretical support for further exploration of more effective control methods and protection strategies. Simultaneously, this invention can enhance the technological competitiveness and innovative image of enterprises or research institutions in aquaculture, marine conservation, and other fields, increasing market recognition and cooperation opportunities, positively impacting enterprise development and the implementation of research projects, and also helping to attract more investment and resource support. Attached Figure Description
[0033] The present invention will now be described in further detail with reference to the accompanying drawings and specific implementation methods.
[0034] Figure 1 This is a flowchart illustrating the method.
[0035] Figure 2 Image of a black-shelled oyster sample;
[0036] Figure 3 A map showing the accuracy of black-shell region identification;
[0037] Figure 4This is a diagram showing the percentage of the black shell area. Detailed Implementation
[0038] The present invention will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the present application can be combined with each other.
[0039] According to one aspect of the invention, such as Figures 1-4 As shown, a method based on deep learning is provided for determining the area of black shells in oysters caused by the 'Gymnocalycium mihanovichii' (a type of insect):
[0040] First, images of the Hong Kong oysters to be analyzed are acquired. This step involves capturing high-resolution images of the nacreous layer of the Hong Kong oysters using a high-resolution camera. To ensure image quality, appropriate lighting conditions must be selected during shooting to avoid shadows and reflections. Simultaneously, the images undergo noise reduction processing. This is done by acquiring and analyzing the image's grayscale values to obtain the grayscale values of the denoised image.
[0041] y (m,n) =median{x (m+k,n+l)}
[0042] Among them, y (m,n) To represent the grayscale value at pixel position (m, n) in the denoised image, `median{}` performs a median operation, which sorts all values within the parentheses and selects the median value as the result. (m+k,n+l) Let be the grayscale value of the original image at pixel location (m+k, n+l), where k and l are offsets within the filter window. These offsets define the size and shape of the filter window, typically a square or rectangular window. Obtaining high-quality images is crucial for subsequent deep learning analysis. For example, in one embodiment, researchers used a camera to capture numerous images of oyster samples of varying sizes and black shell areas under natural lighting conditions. Figure 2 .
[0043] Then, the preprocessed dataset is divided into training, validation, and test sets according to a certain ratio. Based on the nature of the damage classification problem, the cross-entropy loss function is used to classify the damage level. The specific formula for the cross-entropy loss function is as follows:
[0044]
[0045] Where L is the value of the loss function, representing the degree of difference between the model's predicted result and the true label; q is the number of samples, i.e., the total number of categories in the classification problem (in binary classification problems, although there are usually only two categories, the formula still applies, and n can be considered as 1; however, it is more common to use this formula when dealing with multi-class problems and sum over each category); pi Let p be the true label of the i-th sample. For a binary classification problem, p i The value can be 0 or 1. Let be the predicted probability of the i-th sample, i.e., the probability that the model considers the sample to belong to the positive class (in binary classification problems). It should be noted that the cross-entropy loss function can effectively measure the difference between the model's prediction and the true label in multi-class problems, guiding the model to learn the correct classification. Simultaneously, stochastic gradient descent (SGD) and its variants Adagrad, Adadelta, and Adam algorithms can be used to update the model parameters, and transfer learning can be performed using the model weights of the healthy group. Then, an optimization algorithm is used to update the model parameters. The DeepLabV3 model is trained using a preprocessed dataset. Next, based on the improved DeepLabV3 network and with the addition of the CBAM attention mechanism, the black shell region of the acquired oyster image is segmented. This is the core step of the entire method. DeepLabV3 is a deep learning model widely used in image segmentation tasks. It increases the receptive field by introducing dilated convolutions, thereby improving segmentation accuracy while maintaining high resolution. To solve the specific problem of accurately identifying and segmenting the black shell region caused by the oyster larvae, we added the CBAM (Convolutional Block Attention Module) attention mechanism to DeepLabV3. CBAM enhances the network's ability to identify key regions by applying an attention mechanism in both spatial and channel dimensions. Specifically, when the network receives an input image, CBAM adaptively adjusts the importance of each feature map, thereby more accurately locating the black-shell region. This not only improves segmentation accuracy but also reduces the false positive rate. For example, in experiments, researchers found through comparative tests that adding CBAM improved the recognition accuracy of the black-shell region by approximately 2.2%. Figure 3 .
[0046] Next, the area ratio of the segmented black-shell region is calculated. This step aims to quantify the area of the black-shell region on the oyster shell caused by the infestation of the oyster worm. After image segmentation, the segmented black-shell region is presented as a binary image, where red represents the black-shell region and green represents the non-black-shell region. Then, by converting between the number of pixels and their actual physical size, the proportion of the black-shell region to the total area is calculated. The specific calculation formula is as follows:
[0047] Among them, S bk S represents the area of the oyster's black shell, N is the number of pixels in the black shell area, and S... eLet P be the actual physical area corresponding to each pixel, P be the percentage of the black shell area of the oyster, and S be the area of the entire oyster shell. For example, in two embodiments, using the above formula, researchers calculated that the percentage of the black shell area on the oyster shells of two samples was 33.18% and 4.34%, respectively. Figure 4 .
[0048] In summary, this invention, through a series of systematic steps, effectively solves the problem of accurately analyzing the proportion of black shell area in Hong Kong oysters caused by the 'Talented Woman Insect', which not only improves the segmentation accuracy but also provides a scientific basis and technical support for the healthy development of the oyster farming industry.
[0049] The above-described embodiments are merely one implementation of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A method for determining the area of black shells in oysters caused by the insect *Gnaphalium affine* based on deep learning, characterized in that... Includes the following steps: S1. Data acquisition of oyster black shell images: Oyster samples infected with *Ceratophyllum demersum* were collected from aquaculture environments, and then images of the samples were acquired using high-resolution imaging equipment. S2. Data preprocessing: The acquired images are denoised to remove background noise and artifacts introduced by the imaging equipment. Then, based on the DeepLabV3 improved network and with the addition of the CBAM attention mechanism, the black shell region of the acquired oyster images is segmented. Afterwards, in order to increase the scale and diversity of the dataset and reduce the risk of model overfitting, data augmentation operations are performed on the labeled images, including but not limited to rotation, flipping, scaling, translation geometric transformations, as well as brightness adjustment, contrast adjustment and photometric transformation with added noise. S3. Deep Learning Model Selection and Construction: Convolutional Neural Network (CNN) was selected as the basic model architecture to automatically extract features from the image. Then, the model was built based on DeepLabV3. DeepLabV3 mainly adopts an encoder-decoder structure, where the encoder part is used to extract image features, while the decoder part is used to recover spatial information and generate the final segmentation result. Encoder: The encoder uses a deep convolutional neural network (DCNN) as the backbone. After pre-training, it can extract high-level features of the image. In DeepLabV3, dilated / atrous convolution and atrous spatial pyramid pooling (ASPP) modules are introduced to enhance the feature extraction capability. S4. Model training: Divide the preprocessed dataset into training, validation and test sets according to a certain ratio. Then, select an appropriate loss function according to the nature of the damage classification problem. After that, use an optimization algorithm to update the model parameters. Finally, use the preprocessed dataset to train the DeepLabV3 model. S5. Model Evaluation and Optimization: Evaluate the model's performance on the validation set using accuracy, recall, F1 score, or intersection-over-union (IoU). Then, adjust the model's learning rate, batch size, or dilation rate based on the evaluation results. Afterward, use a deeper backbone network, introduce an attention mechanism, and use a complex loss function to improve the model's performance. S6. Damage Severity Analysis and Visualization: The trained model is applied to real-world data to measure the area of blackened oyster shells caused by the 'Gnaphalium affine' in real time. For newly acquired images, the model quickly outputs the damage area results, providing timely information for aquaculture and marine conservation workers. Then, by analyzing historical and real-time data using the model, the development trend of the 'Gnaphalium affine' damage area is predicted. Visualization tools such as line graphs and heat maps are used to show the changes in damage severity over time and space, intuitively presenting the dynamic evolution of 'Gnaphalium affine' damage and assisting in decision-making.
2. The method for determining the area of black shells in oysters caused by the insect *Gnaphalium affine* based on deep learning, as described in claim 1, is characterized in that: In step S1, during the collection of oyster samples infected with *Gnaphalium affine*, the samples should cover different degrees of damage to ensure the diversity and comprehensiveness of the data. At the same time, for each sample, images should be taken from multiple angles and at different magnifications to obtain images that comprehensively show the damage characteristics of *Gnaphalium affine*, and the resolution and quality of the images should meet the requirements of subsequent deep learning models for detail recognition.
3. The method for determining the area of black shells in oysters caused by the insect *Gnaphalium affine* based on deep learning, as described in claim 1, is characterized in that: In step S2, during the data preprocessing, classic image filtering methods such as median filtering and Gaussian filtering are used to ensure image quality. Then, the image is cropped to remove unnecessary edge areas, so that the image content focuses on the areas related to the damage of the worm, thereby improving the model training efficiency and accuracy.
4. The method for determining the area of black shells in oysters caused by the insect *Gnaphalium affine* based on deep learning, as described in claim 1, is characterized in that: In S3, during the deep learning model selection and construction process, dilated convolution is a process of injecting holes into a standard convolution kernel to increase the receptive field and capture a wider range of contextual information. By adjusting the dilation rate, the number of intervals in the convolution kernel is controlled, thereby controlling the size of the receptive field. Spatial Pyramid Pooling (ASPP) Module: The ASPP module consists of multiple parallel dilated convolutions, each with a different dilation rate. These dilated convolutions can capture features at different scales and are integrated through concatenation and subsequent 1x1 convolutions. In addition, the ASPP module also includes a Global Average Pooling branch to capture global contextual information. Decoder: The decoder is responsible for fusing the high-level features extracted by the encoder with the low-level features and restoring the spatial information. The decoder upsamples the feature map output by the encoder, then concatenates or adds it with the low-level features from the backbone network. Finally, the final segmentation result is generated through convolutional layers.
5. The method for determining the area of black shells in oysters caused by the insect *Gnaphalium affine* based on deep learning, as described in claim 1, is characterized in that: In step S2, during the image denoising process, grayscale value information is collected and analyzed to obtain the grayscale value of the denoised image. and (m,n) =median{x (m+k,n+l) } Among them, y (m,n) To represent the grayscale value at pixel position (m, n) in the denoised image, `median{}` performs a median operation, which sorts all values within the parentheses and selects the median value as the result. (m+k,n+l) is the gray value of the original image at pixel position (m+k, n+l), where k and l are the offsets within the filter window.
6. The method for determining the area of black shells in oysters caused by the insect *Gnaphalium affine* based on deep learning, as described in claim 1, is characterized in that: In step S4, during the selection of the loss function, the cross-entropy loss function is used to classify the degree of damage. The specific formula for the cross-entropy loss function is as follows: Where L is the value of the loss function, representing the degree of difference between the model's predicted result and the true label, q is the number of samples, i.e., the total number of categories in the classification problem, and p i Let p be the true label of the i-th sample. For a binary classification problem, p i The value can be 0 or 1. Let be the predicted probability of the i-th sample, that is, the probability that the model considers the sample to belong to the positive class.
7. The method for determining the area of black shells in oysters caused by the insect *Gnaphalium affine* based on deep learning, as described in claim 1, is characterized in that: In step S6, during the analysis of oyster shell damage, information on the number of pixels in the black shell area and the total shell area of the oyster is collected and analyzed to determine the black shell area. Among them, S bk S represents the area of the oyster's black shell, N is the number of pixels in the black shell area, and S... e The actual physical area corresponding to each pixel is P, which is the proportion of the black shell area of the oyster, and S is the area of the entire oyster shell.