Edge enhanced YOLO algae detection model, construction method, computer readable storage medium and electronic equipment
By introducing the Sobel module and multi-scale channel segmentation module in the YOLOv9 model, the detection ability of the algae detection model for small targets and complex backgrounds is enhanced, and the shortcomings of the YOLOv9 model in small target recognition are solved, and the detection accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202510517834.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-08-08
AI Technical Summary
The existing YOLOv9 model has low sensitivity to small target objects in algae detection, making it difficult to accurately identify subtle features in complex backgrounds, resulting in insufficient detection accuracy and efficiency.
The Sobel module is introduced into the backbone network of the YOLOv9 model to extract image edge information, and dynamically adjust the weight through a trainable convolution kernel, combined with the multi-scale channel segmentation module MCS module, to enhance the fusion ability of edge features and target features.
The detection accuracy and robustness of the model in small targets and complex contexts is significantly improved, and the sensitivity and detail capture capability to detect algae edges is improved, especially in high-density and morphologically complex images.
Smart Images

Figure CN120451971A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of algae detection, and in particular to an edge-enhanced YOLO algae detection model, a construction method, a computer-readable storage medium, and an electronic device. Background Art
[0002] With the global population growing and the acceleration of industrial development, the intensity of water resource utilization continues to increase, and water pollution is becoming increasingly prominent. Eutrophication has become a global problem. As primary producers in aquatic ecosystems, algae play a key role in maintaining ecological balance. However, when nutrients in water bodies are excessive, algal populations can rapidly multiply, forming harmful algal blooms (HABs), which in turn lead to deterioration of water quality. In addition, algal blooms not only consume large amounts of dissolved oxygen but also release toxic gases and chemicals, seriously damaging marine and freshwater ecosystems and threatening the living environment of aquatic life.
[0003] Therefore, algae detection has become a key indicator for water health assessment and a crucial technical support for water resource ecological protection. Because the classification and identification of algae is complex, involving multiple taxonomic levels (such as kingdom, phylum, and class), and because the taxonomic characteristics at different levels vary significantly, algae identification is a highly technical and specialized field.
[0004] Algae detection typically involves counting, classification, and statistics using a microscope. Traditionally, classification and counting tasks are performed manually. While this method provides relatively accurate results, it requires significant expertise and experience, making the process tedious and time-consuming. Furthermore, manual testing can be highly subjective, with inconsistent results resulting from differences in perspective and experience between different inspectors.
[0005] Since its release, YOLOv9 has incorporated numerous cutting-edge research and technological innovations, making the object detection model more lightweight and efficient while maintaining accuracy, making it one of the most advanced object detection methods. Composed of a backbone network, a neck structure, and a prediction head, YOLOv9 not only inherits the features of the Path Aggregation Network (PANet) architecture of YOLOv8, but also introduces Programmable Gradient Information (PGI) and Generalized Efficient Layer Aggregation Network (GELAN) to effectively enhance the feature fusion process. These technologies address the problem of information loss in deep neural networks, ensuring high efficiency, high accuracy, and high adaptability.
[0006] As the latest version of the YOLO model series, it demonstrates significant advantages in object detection tasks, offering significant improvements in multiple areas. Compared to existing methods, it significantly enhances accuracy, parameter count, and computational complexity, improving both detection precision and speed. These features make YOLOv9 highly adaptable and practical across a wide range of devices and application scenarios. Figure 1 The traditional YOLOv9 model architecture is illustrated.
[0007] Although YOLOv9 has improved its overall performance, its sensitivity is lower when dealing with small objects, especially in the algae detection task, which makes the detection of small objects more challenging. Therefore, in order to improve the accuracy and efficiency of algae detection, it is necessary to optimize the YOLOv9 model to enhance its detection capabilities for small objects. Summary of the Invention
[0008] The present invention aims to improve the deficiencies of the prior art and provide an edge-enhanced algae detection model.
[0009] According to a first aspect of the present invention, a method for constructing an edge-enhanced YOLO algae detection model is provided, comprising:
[0010] Based on the architecture of the YOLOv9 model, a Sobel module is introduced into the backbone network of the YOLOv9 model to extract the edge information of the image from the original feature map of the algae cells input to the model;
[0011] The edge information extracted by the Sobel module is transformed to the feature length, width and number of channels consistent with the input of each RepNCSPELAN4 module in the YOLOv9 model, and then superimposed before the input of each RepNCSPELAN4 module;
[0012] The MCS module is introduced after the backbone network output of the YOLOv9 model to extract target feature information of different sizes, and the target feature information is fused into the feature map of the SPPENLAN module in the input YOLOv9 model.
[0013] As an improved solution, the Sobel module is configured to at least include: replacing the fixed Sobel kernel in the Sobel operator with a trainable convolution kernel, initializing the Sobel kernel; introducing adaptive weight parameters to the Sobel kernel, and dynamically adjusting the weights based on a machine learning training process. Furthermore, the Sobel module is further configured to introduce two diagonal convolution kernels based on the Sobel operator.
[0014] As an example, the Sobel module includes:
[0015] Change the Sobel convolution kernel to:
[0016]
[0017] Where α and β are trainable parameters, initialized to 1 and 0;
[0018] On the basis of Sobel, two diagonal convolution kernels are added:
[0019] Diagonal direction from upper left to lower right
[0020]
[0021] Diagonal direction from upper right to lower left
[0022]
[0023] By convolving with the image, the gradients in four directions are calculated:
[0024] G x =I*K x , G y =I*K y , G d1 =I*K d1 , G d2 =I*K d2
[0025] Where I represents the input image;
[0026] Fuse edge features in four directions:
[0027]
[0028] As another improvement scheme, different upsampling or downsampling operations are used to adjust the length, width and number of channels of the features.
[0029] As another improvement scheme, the MCS module is configured to at least include: obtaining feature maps of different sizes by passing the input feature map through different kernel average pooling layers; adjusting the channel using convolution and adopting upsampling operation to match the width and height of each feature map until the dimensional difference between multi-scale features is eliminated; performing channel dimension splicing and inputting Sigmoid activation function to normalize the feature value to between 0 and 1; multiplying the normalized feature map with the input feature map.
[0030] According to a second aspect of the present invention, an edge-enhanced YOLO algae detection model is provided. Based on the architecture of the YOLOv9 model, the following modules are added:
[0031] The Sobel module is configured as the backbone network introduced into the YOLOv9 model to extract edge information of the image from the original feature map of the algae cells input into the model;
[0032] The fusion module transforms the edge information extracted by the Sobel module to a feature length, width, and number of channels that are consistent with the input of each RepNCSPELAN4 module in the YOLOv9 model, and then superimposes it before the input of each RepNCSPELAN4 module;
[0033] The MCS module is configured to be introduced after the backbone network output of the YOLOv9 model to extract target feature information of different sizes and fuse the target feature information into the feature map of the SPPENLAN module in the input YOLOv9 model.
[0034] A computer-readable storage medium is also provided, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, the above method is implemented.
[0035] According to a third aspect of the present invention, an electronic device is further provided, further comprising a memory arranged to store computer-executable instructions, wherein when the executable instructions are executed, the processor is caused to perform the above method.
[0036] The present invention proposes to enhance the edge feature adaptation capability of the YOLO model by using a trainable Sobel edge enhancement module. This module adopts a dual-path (horizontal and vertical directions) trainable gradient convolution layer, and significantly improves the model's capability and sensitivity in algae edge detection by dynamically adjusting the weights of the convolution kernel and the feature fusion coefficient. In addition, the model also introduces a multi-scale channel segmentation module to further enhance the collaborative analysis capability of the algae distribution morphology and local texture features. By strengthening the learning of information feature channels, a Sobel edge module from the original input is added to each trunk road, and the initial information flow is transferred to each trunk road. The module can adaptively calibrate feature attributes, thereby improving detection accuracy, especially when dealing with complex backgrounds and subtle features, showing stronger robustness and accuracy.
[0037] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. In addition, the same reference numerals are used throughout the accompanying drawings to represent the same components.
[0039] In the attached figure:
[0040] Figure 1 The traditional YOLOv9 model architecture is shown;
[0041] Figure 2 The improved edge-enhanced YOLOv9 model architecture adopted by the present invention is shown;
[0042] Figure 3 The Sobel factor composed of four convolution kernels is shown;
[0043] Figure 4 shows a schematic diagram of the edge enhancement module;
[0044] Figure 5 Shows the multi-scale channel segmentation module architecture;
[0045] Figure 6 shows images of various microalgae cells recorded from dynamic videos under different fields of view and imaging conditions;
[0046] Figure 7 shows a data label distribution graph;
[0047] Figure 8 A schematic diagram showing the architecture of an electronic device on a program system is shown;
[0048] Figure 9 A schematic structural diagram of a computer-readable storage medium is shown. DETAILED DESCRIPTION
[0049] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0050] It should also be understood that the term “and / or” used in exemplary embodiments of the present disclosure refers to and includes any and all possible combinations of one or more of the associated listed items.
[0051] In addition, in the description of the exemplary embodiments of the present disclosure, the terms “first,” “second,” “third,” etc. are merely used to distinguish the descriptions and are not to be understood as indicating or implying relative importance.
[0052] 1. Proposed Method
[0053] Figure 2 The improved edge-enhanced YOLOv9 model architecture adopted by the present invention is shown.
[0054] like Figure 2 As shown in the architecture, the exemplary solution of the present invention is Figure 1 Based on the YOLOv9 model architecture, a trainable Sobel module is introduced, which is combined with the backbone network of the YOLOv9 model in a plug-in manner. The core function of the Sobel module is to extract the edge information of the image from the original input feature map. This edge information is achieved by calculating the gradient value of the image, which can effectively highlight the contour and boundary information in the image. This is especially true when processing slice images with dense algae distribution. Since algae cells often present complex morphology and blurred edges in these images, traditional models may find it difficult to accurately distinguish the subtle differences between various targets. Especially in high-density areas, the boundaries of algae are often unclear, and the model is prone to losing important local detail information, which affects the detection accuracy.
[0055] To improve the model's performance in these scenarios, the edge information extracted by the Sobel module is passed through a fusion module using different upsampling or downsampling operations to ensure that the feature length, width, and number of channels are consistent with the input of each RepNCSPELAN4 module in YOLOv9, effectively superimposing the edge information before the input of these modules. After feature alignment, the fusion module fuses the edge information with the original input features. This can be achieved through addition, concatenation, or other operations, so that the edge information can effectively enhance the expressive power of the original input features. By adding edge information to the input of the RepNCSPELAN4 module, the model can perform better in tasks such as edge detection and object contour extraction. Especially in complex scenes, edge information can help the model identify more detailed object structures.
[0056] The main function of the fusion module proposed in this paper is to fuse the edge information extracted by the Sobel module with the input of each RepNCSPELAN4 module in YOLOv9. To ensure that the edge information can match the input of these modules, the fusion module adjusts the length, width and number of channels of the features through different upsampling (UpFusionModule) or downsampling (DownFusionModule) operations.
[0057] The RepNCSPELAN4 module, a key feature extraction unit in YOLOv9, is primarily responsible for extracting deep image features through multi-layer convolution operations. By incorporating Sobel edge information, the model optimizes edge features during the input phase, capturing image details and boundaries in detail and enhancing local features. This improves detection accuracy and robustness for complex backgrounds, small objects, or images with blurred edges. This effectively combines edge information with deep feature learning, enhancing edge features at multiple levels during training and significantly improving detection accuracy for low-contrast and blurred images.
[0058] Finally, the MCS module (Multi-Scale Channel Segmentation module) is introduced after the backbone network output of the YOLOv9 model. This module further refines the information processing and fusion at different scales through a multi-scale feature segmentation strategy. Based on the deep-level features extracted by the backbone network, the MCS module can effectively separate and optimize target features of different sizes, ensuring that key information at each scale is fully extracted and processed. With the addition of this module, the model can better adapt to different visual scenarios when dealing with complex backgrounds, small targets, or multi-scale targets, significantly improving the accuracy and robustness of detection, especially in high-density, morphologically complex images.
[0059] 1.1 Trainable Sobel edge enhancement module
[0060] The Sobel operator, also known as the Sobel operator, is widely used in image edge detection tasks, typically to extract edge information. It performs a convolution operation on an image, calculating the gradient information of each pixel in the image, thereby highlighting edges. The Sobel operator is a gradient-based edge detection method that primarily calculates the first-order derivatives of the image in the horizontal and vertical directions to determine the strength and direction of the edge.
[0061] The Sobel operator consists of two convolution kernels: one for detecting horizontal edges (Sobel_X) and the other for detecting vertical edges (Sobel_Y). These two convolution kernels determine the gradient magnitude and direction of image pixels, thereby enhancing image edge information. The Sobel operator's advantages lie in its simplicity, ease of use, and rapid, effective detection of edges and contours in images.
[0062] The traditional Sobel operator uses two fixed convolution kernels to calculate the horizontal and vertical gradients of the image:
[0063] Horizontal kernel Sobel_X:
[0064]
[0065] Vertical kernel Sobel_Y:
[0066]
[0067] By convolving with the image, we can calculate the gradients in the horizontal and vertical directions:
[0068] G x =I*K x , G y =I*K y
[0069] Then calculate the gradient magnitude and direction:
[0070]
[0071] Figure 3 The Sobel factors composed of four convolution kernels are shown. Figure 4 Figure 3 shows a schematic diagram of the edge enhancement module. The trainable edge enhancement module (TrainableEdgeEnhancementModule) is inspired by the edge detection operator and introduces learnable parameters. Unlike the traditional Sobel method that uses a fixed convolution kernel, this module enables the convolution operator to be dynamically adjusted during training. This mechanism can adaptively extract edge features of various intensities in different scenarios, thereby improving the flexibility of detection. In order to capture edge information in different directions, the module uses four different convolution kernels to detect edge information in the vertical, horizontal, and two diagonal directions respectively.
[0072] Replace the fixed Sobel kernel with a trainable convolution kernel, initialized to the Sobel kernel.
[0073] Adaptive weight parameters α and β are introduced to dynamically adjust kernel weights during training.
[0074] Added diagonal direction detection to obtain more edge information.
[0075] Change the Sobel convolution kernel to:
[0076]
[0077] α and β are trainable parameters, initialized to 1 and 0.
[0078] During training, the model automatically adjusts these two parameters to optimize edge detection.
[0079] On the basis of the traditional Sobel, two diagonal convolution kernels are added:
[0080] Diagonal direction from upper left to lower right
[0081]
[0082] Diagonal direction from upper right to lower left
[0083]
[0084] By convolving with the image, the gradients in four directions are calculated:
[0085] G x =I*K x , G y =I*K y , G d1 =I*K d1 , G d2 =I*K d2
[0086] Where I represents the input image;
[0087] Fuse edge features in four directions:
[0088]
[0089] refer to Figure 3 Each group of Sobel factors contains four convolution kernels and keeps the changes within the group consistent during the training process, so that edge information of different intensities and directions can be captured at the same time, thereby improving the effect of detecting edge information.
[0090] Figure 4 This module operates on the original image input, performing convolution operations using multiple sets of trainable Sobel operators as convolution kernels to generate a corresponding number of edge feature maps. To preserve the original image information, the edge enhancement module also includes an identity mapping that stacks the input algae image and the edge feature map along the channel dimension to produce the final feature output.
[0091] 1.2 Multi-scale Channel Split (MCS)
[0092] In convolutional neural networks, the receptive field refers to the size of the region in the input image that each neuron in the network covers. The size of the receptive field has a significant impact on feature extraction. Smaller receptive fields help capture local details, while larger ones help capture global semantic information. Therefore, properly designing the receptive field size is crucial for various computer vision tasks.
[0093] Research has shown that using convolutions with different receptive field sizes in computer vision tasks significantly affects the extraction of target feature information. The smaller the receptive field, the more local image information the network can observe. Conversely, the larger the receptive field, the better the network understands the global information of the input features.
[0094] Figure 5 The architecture of the multi-scale channel split module is illustrated. The MCS (Multi-scale Channel Split) module improves the model's ability to perceive target feature information at different scales. This module passes the input feature map through four different kernel average pooling layers to obtain feature maps of different sizes. It then uses convolution to adjust the channels and employs upsampling operations to match the width and height of the four feature maps, eliminating the dimensional differences between multi-scale features. Channel-dimensional splicing is then performed. After the Sigmoid activation function, the input feature values are normalized to between 0 and 1 and then multiplied with the input feature map. This mechanism dynamically assigns channel attention weights, strengthening information-rich feature channels while suppressing redundant channels, thereby achieving adaptive feature calibration.
[0095] The MCS module (multi-scale channel segmentation module) plays a key role in introducing the Sobel operator and module fusion in the model. Its improvements are reflected in the following aspects:
[0096] 1. Introducing the Sobel operator to enhance edge features: The MCS module embeds the Sobel operator into the model through a multi-scale feature segmentation strategy to enhance edge features. The Sobel operator extracts edge information in multiple image directions, including horizontal, vertical, and diagonal directions, thereby enhancing edge responses in the feature map. This enhancement enables the model to more sensitively capture boundary and contour details during detection.
[0097] 2. Multi-Scale Channel Segmentation and Fusion (MCS) Module: By segmenting feature maps at multiple scales, the module independently extracts and processes information at different scales, helping to capture both object details and overall features. Furthermore, the module employs an adaptive fusion strategy to align and fuse multi-scale features. This not only enhances feature representation but also effectively integrates edge features at different scales, guided by Sobel edge information.
[0098] 3. Feature Alignment and Dynamic Fusion: In MCS, feature alignment and dynamic fusion mechanisms further enhance model flexibility. First, feature alignment ensures spatial consistency of multi-scale features, preventing information misalignment caused by scale differences. Second, the dynamic fusion mechanism adaptively adjusts feature weights based on scenario requirements, enabling the model to more accurately detect targets in complex backgrounds.
[0099] 4. Synergy of Multi-Scale Enhancement and Edge Perception: The MCS module's multi-scale segmentation and fusion strategy synergizes with the Sobel operator's edge enhancement mechanism. During detection, multi-scale features capture the overall structure of the target, while the Sobel operator enhances edge details. The combined effect of these two enables the model to achieve superior detection results in complex scenarios.
[0100] 2. Experiment
[0101] In order to verify the effectiveness of the proposed model, the training set and test set of the experiment used the high-throughput algae cell detection dataset provided on the Kaggle platform. Figure 6 The dataset records images of various microalgae cells through dynamic videos under different fields of view and imaging conditions, aiming to provide rich labeled samples for algae cell detection. The experiment includes six types of microalgae cells, namely Platymonas, Chlorella, Dunaliellasalina, Effrenium, Porphyridium and Haematococcus. Each cell has significant differences in size and morphology, which places high demands on the model when dealing with extremely small targets and complex backgrounds. Especially for those algae cells with tiny size and irregular shape, traditional target detection methods are often difficult to accurately identify, which increases the challenge of the model.
[0102] Table 1:
[0103]
[0104] The dataset consists of 700 images in the training set and 300 images in the test set, each with a resolution of 1920×1200. The image data covers a wide range of imaging conditions and diverse algal distributions, ensuring that the model is exposed to algal cells of different types and sizes during training, thereby improving its generalization and accuracy. Furthermore, these images are rich in detail, encompassing the various movements and changes of microalgae cells in their natural environment, further enhancing the complexity and challenge of the dataset. By using this high-throughput algae cell detection dataset, the present invention aims to further investigate the performance of the proposed model in microalgae cell detection tasks, particularly its robustness and accuracy in the presence of small-scale targets and complex backgrounds.
[0105] The Chlorella class has the largest number of samples, with over 700 instances, ranking first, while the number of samples in the other classes is relatively balanced. Figure 7In the image, samples of each category are distributed along the x and y coordinates, with each dot representing the location of a sample. The dot distribution in the image is relatively uniform, lacking any apparent regularity. The sample locations appear random, with no concentration in a specific area. Most samples have a small width and height, indicating that the objects are generally compact.
[0106] Table 2:
[0107]
[0108]
[0109] The YOLOv9 series performs exceptionally well in object detection tasks, offering significant improvements over previous YOLO versions. The data in the table shows that YOLOv9 outperforms YOLOv5 and YOLOv8 in both mAP50 and mAP50-95. These results demonstrate significant improvements in both precision and recall, particularly when detecting multi-scale objects and in complex scenes.
[0110] Although YOLOv9's box_loss and cls_loss have increased compared to YOLOv8, YOLOv9 performs better in precision and recall. This shows that YOLOv9 can reduce false positives and missed detections while improving detection accuracy, thus enhancing model stability.
[0111] Compared to the YOLOv10 series, YOLOv9 offers a more balanced box_loss and cls_loss. While YOLOv10 boasts faster inference speed, it may compromise accuracy compared to YOLOv9-Sobel-mcs. Therefore, YOLOv9 maintains more stable and refined results in high-precision detection tasks. Choosing the right version for each task is crucial: YOLOv9 is more suitable for scenarios requiring high accuracy and robustness, while YOLOv10 is a better choice for applications requiring high inference speed.
[0112] As can be seen, the YOLOv9 series models outperform YOLOv5 and YOLOv8 in core metrics such as precision, recall, and mAP50, demonstrating greater adaptability and robustness in multi-scale object detection and complex scene processing. By introducing the Sobel operator and multi-scale fusion technology, YOLOv9 further improves its detection capabilities for small objects and occlusions, providing a more efficient and accurate solution for object detection tasks.
[0113] Table 3: Ablation experiment index table
[0114]
[0115]
[0116] Among the YOLOv9 variants that incorporate the Sobel (edge enhancement) and MCS (multi-scale fusion) modules, YOLOv9-Sobel (mAP50: 0.97849, mAP50-95: 0.79046) and YOLOv9-Sobel-mcs (mAP50: 0.9808, mAP50-95: 0.7985) performed particularly well, further optimizing their capabilities in detecting complex backgrounds and small objects. These improvements have brought the YOLOv9 family of models to new heights in detection accuracy and handling of complex objects.
[0117] 3. Conclusion
[0118] This paper proposes a new method for algae target detection: the E2-YOLO model. This model is based on a modified YOLOv9 framework and incorporates two key modules: the Sobel module (a trainable Sobel edge enhancement module) and the MCS module (Multi-scale Channel Split). The design and integration of these two innovative modules significantly improves the model's performance in small-scale algae target detection.
[0119] First, in terms of model design, the original YOLOv9 architecture was optimized, focusing on addressing its limitations in processing small algae targets. By adding a Sobel edge detection module, edge information in the image is enhanced, especially in small target areas, enabling the network to more accurately capture the contours and texture features of tiny targets. Furthermore, the Multi-Scale Channel Segmentation (MCS) module further optimizes the model's ability to represent small target features through multi-level comparison and adaptive adjustment of feature maps of different resolutions, particularly enhancing target distinguishability against complex backgrounds.
[0120] Secondly, in terms of experimental validation, the E2-YOLO model demonstrated excellent performance on multiple algae datasets. Comparative experiments with classic models such as YOLOv5 and YOLOv8 revealed significant advantages in average mean average precision (mAP50), recall, and localization accuracy, with E2-YOLO performing particularly well in the key metric of small object detection. Furthermore, the model achieved accurate recognition of small algae objects while maintaining efficient inference speed, fully validating the effectiveness and superiority of the proposed module design.
[0121] In conclusion, this paper provides an innovative solution for algae detection and lays a foundation for optimizing water environment monitoring technology. Future research directions include further exploring the robustness of the model under different lighting conditions and complex backgrounds, and exploring the application of E2-YOLO to real-time monitoring systems in practical environments to achieve broader practical applications.
[0122] By introducing the Sobel edge detection module and the multi-scale channel segmentation module, the present invention successfully overcomes the limitations of the traditional YOLO framework in small target detection, and provides a new technical path for the field of algae target detection.
[0123] It should be noted that the algorithms and displays provided herein are not inherently related to any particular computer, virtual device, or other equipment. Various general-purpose devices may also be used together with the teachings herein. Based on the above description, it is apparent that the structure required for constructing such devices is suitable. In addition, the present invention is not directed to any specific programming language. It should be understood that various programming languages can be utilized to implement the present invention described herein, and the description of specific languages above is intended to disclose the best mode of implementation of the present invention.
[0124] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.
[0125] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Accordingly, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of the invention.
[0126] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition may be divided into multiple submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed herein may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0127] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of the present invention and to form different embodiments. For example, in the claims below, any of the claimed embodiments may be used in any combination.
[0128] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for performing a portion or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0129] For example, Figure 8The schematic diagram of the architecture of the electronic device according to the present invention on the program system is shown. The electronic device conventionally includes a processor 101 and a memory 102 arranged to store computer executable instructions (program code). The memory 102 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 102 has a storage space 103 for storing a program code 104 for executing any method steps in the embodiment. For example, the storage space 103 for program code can include individual program codes 104 for respectively implementing various steps in the above method. These program codes can be read from or written to one or more computer program products. These computer program products include program code carriers such as a hard disk, a compact disk (CD), a memory card or a floppy disk. Such a computer program product is typically, for example Figure 9 The computer readable storage medium may have Figure 8 The memory 102 in the electronic device is similarly arranged as a storage segment, storage space, etc. The program code can be compressed, for example, in an appropriate form. Generally, the storage unit stores program code 111 for executing the steps of the method according to the present invention, that is, program code that can be read by a processor such as 101. When this program code is executed by the electronic device, it causes the electronic device to execute the various steps of the method described above.
[0130] It should be noted that the embodiments described illustrate rather than limit the invention, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising several different elements and by means of suitably programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
Claims
1. A method for constructing an edge-enhanced YOLO algae detection model, characterized in that: include: Based on the architecture of the YOLOv9 model, a Sobel module is introduced into the backbone network of the YOLOv9 model to extract the edge information of the image from the original feature map of the algae cells input to the model; The edge information extracted by the Sobel module is transformed to the feature length, width and number of channels consistent with the input of each RepNCSPELAN4 module in the YOLOv9 model, and then superimposed before the input of each RepNCSPELAN4 module; The MCS module is introduced after the backbone network output of the YOLOv9 model to extract target feature information of different sizes, and the target feature information is fused into the feature map of the SPPENLAN module in the input YOLOv9 model.
2. The construction method according to claim 1, wherein The Sobel module is configured to include at least: Replace the fixed Sobel kernel in the Sobel operator with a trainable convolution kernel and initialize the Sobel kernel; Adaptive weight parameters are introduced to the Sobel kernel, and the weights are dynamically adjusted based on the machine learning training process.
3. The construction method according to claim 2, wherein: The Sobel module is further configured to introduce two diagonal convolution kernels based on the Sobel operator.
4. The construction method according to claim 3, wherein: The Sobel module includes: Change the Sobel convolution kernel to: Where α and β are trainable parameters, initialized to 1 and 0; On the basis of Sobel, two diagonal convolution kernels are added: ●Diagonal direction from upper left to lower right ●Diagonal direction from upper right to lower left By convolving with the image, the gradients in four directions are calculated: G x =I*K x ,G y =I*K y ,G d1 =I*K d1 ,G d2 =I*K d2 Where I represents the input image; Fuse edge features in four directions:
5. The construction method according to claim 1, wherein: Different upsampling or downsampling operations are used to adjust the length, width and number of channels of the features.
6. The construction method according to claim 1, wherein: The MCS module is configured to include at least: The input feature map is passed through different kernel average pooling layers to obtain feature maps of different sizes; Use convolution to adjust the channels and use upsampling operations to match the width and height of each feature map until the dimensional differences between multi-scale features are eliminated; After performing channel dimension splicing, the Sigmoid activation function is input to normalize the eigenvalues to between 0 and 1; Multiply the normalized feature map with the input feature map.
7. Edge-enhanced YOLO algae detection model, based on the architecture of the YOLOv9 model, characterized by: The architecture at least includes: The Sobel module is configured as the backbone network introduced into the YOLOv9 model to extract edge information of the image from the original feature map of the algae cells input into the model; The fusion module transforms the edge information extracted by the Sobel module to a feature length, width, and number of channels that are consistent with the input of each RepNCSPELAN4 module in the YOLOv9 model, and then superimposes it before the input of each RepNCSPELAN4 module; The MCS module is configured to be introduced after the backbone network output of the YOLOv9 model to extract target feature information of different sizes and fuse the target feature information into the feature map of the SPPENLAN module in the input YOLOv9 model.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, the method of any one of claims 1 to 6 is implemented.
9. An electronic device, characterized in that Also included is a memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method according to any one of claims 1-6.