Target detection method based on improved yolov8 algorithm

By adding a lightweight adaptive weight downsampling module and P2 detection head to the yolov8 algorithm and designing a new loss function, the problems of low detection accuracy and information loss are solved, and the target detection accuracy is improved.

CN119540542APending Publication Date: 2025-02-28NANJING TECH UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411352114.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing yolov8 algorithm has low detection accuracy in small object, and there is a problem of information loss during conventional convolution and downsampling.

Method used

Add a lightweight adaptive weight downsampling module to the backbone layer, add a P2 detection head to the head layer, and design a new loss function based on the three loss functions of WiseIoU, InnerIoU, and MPDIoU.

Benefits of technology

It effectively avoids information loss, improves the accuracy of small object detection, and improves the algorithm lossless accuracy through the designed loss function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540542A_ABST
    Figure CN119540542A_ABST
Patent Text Reader

Abstract

The invention discloses a target detection method based on an improved yolov8 algorithm, and relates to the technical field of computer vision and deep learning, and the method comprises the steps: collecting picture data according to a target object needing to be detected, marking a picture data set through Label, dividing a training set, a verification set and a test set in the data set according to the proportion of 7: 1: 2, and obtaining a training set, a verification set and a test set; completing the manufacturing of a data set of the target object; secondly, a target detection model is constructed based on a YOLOv8 algorithm, a backbone layer, a head layer and a loss function part of the YOLOv8 algorithm are improved, a lightweight adaptive weight down-sampling module is added to the backbone layer, a P2 detection head is added to the head layer, and a new loss function is designed in combination with the thoughts of WiseIoU, InnerIoU and MPDIOU; and then, obtaining a final prediction result by using the trained target detection and recognition model. And finally, comparing and analyzing the advantages of the improved algorithm in combination with a final result. In a word, target detection based on the improved yolov8 algorithm can be realized, and meanwhile, the precision of target detection is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision and deep learning technology, and in particular to a target detection method based on an improved YOLOv8 algorithm. Background Art

[0002] Object detection technology plays a key role in the field of computer vision. Its main tasks include predicting the location and category information of the target. In the scene of object recognition and grasping, accurately identifying the target object is one of the key steps to complete the grasping task, which can be achieved through the object detection algorithm. Therefore, it is necessary to study the object detection method of improving the yolov8 algorithm.

[0003] The development of object detection algorithms has gone through several key stages, each of which has promoted significant progress in the field of computer vision. The earliest object detection relied on traditional computer vision methods, such as the Viola-Jones algorithm, which used Haar-like features and AdaBoost classifiers to achieve real-time face detection and became the basis of many applications. During the same period, the HOG algorithm was also widely used in pedestrian detection, which effectively improved the detection accuracy by capturing the gradient direction features in the image. In the 2010s, the rise of deep learning completely changed the landscape of object detection. R-CNN first introduced convolutional neural networks (CNNs) into object detection, and achieved unprecedented detection accuracy by combining candidate region generation with CNN. However, R-CNN was slow, so FastR-CNN and FasterR-CNN were proposed successively, which transformed object detection into an end-to-end learning process by optimizing the network structure and introducing the region proposal network (RPN), greatly improving efficiency. After that, single-stage detectors such as YOLO and SSD became a research hotspot. These algorithms integrate candidate region generation and classification tasks for object detection, greatly speeding up the detection speed and achieving real-time detection while maintaining accuracy. Figure 1 This is the development process of common target detection algorithms. However, for specific target detection scenarios, the algorithm model needs to be modified and improved according to actual conditions to improve the accuracy of target detection. Summary of the invention

[0004] In view of the above existing problems, the present invention is proposed.

[0005] Therefore, the purpose of the present invention is to improve the accuracy of target detection, and propose a target detection method based on the improved yolov8 algorithm, which can effectively complete the small target detection task. In view of the problem of information loss during downsampling and convolution of the yolov8 algorithm, a lightweight adaptive weight downsampling module is added to the backbone layer; in view of the problem that the small target detection accuracy of the yolov8 algorithm is not high, a P2 detection head is added to the head layer; in view of the problem that the loss function of the yolov8 algorithm is too single, a new loss function is designed by combining the three ideas of WiseIoU, InnerIoU and MPDIoU.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions, a target detection method based on an improved yolov8 algorithm, comprising:

[0007] Create and preprocess the dataset.

[0008] A target detection model is constructed. The target detection model uses the YOLOv8n network as the basic network, replaces the conventional convolution in the backbone layer of the YOLOv8n network with a lightweight adaptive weight downsampling module; adds a p2 detection head to the head layer; and uses Wise-Inner-MPDIoU as the regression loss function of the difference between the model output prediction value and the true label.

[0009] Configure the training environment to use the preprocessed dataset as input to train the small object detection model.

[0010] Apply the trained small target detection model and use the validation set as input to output the detection results.

[0011] As a preferred solution of the target detection method based on the improved yolov8 algorithm described in the present invention, wherein: the preparation of the data set and preprocessing include, integrating the Focus network slicing idea, performing 2*2 segmentation processing on the input image and completing the softmax operation on each 2*2 matrix part; using the rearrange function to organize the array format of the output results of each 2*2 matrix part; performing a 1*1 convolution operation on the result after the softmax operation and completing the integration of the results of each part; using the rearrange function to organize the array format of the output results of each 2*2 matrix part, and outputting the final result.

[0012] As a preferred solution of the target detection method based on the improved yolov8 algorithm described in the present invention, wherein: the adding of the p2 detection head in the head layer includes adding an upsampling link and a convolution link as the p2 detection head after the p3 layer of the head layer of the YOLOv8n network.

[0013] As a preferred solution of the target detection method based on the improved yolov8 algorithm described in the present invention, the regression loss function includes combining the three loss function ideas of WiseIoU, InnerIoU and MPDIoU, and the loss function formula is:

[0014] MPDIoU is defined as:

[0015]

[0016]

[0017] in, Respectively represent the left horizontal coordinate, right horizontal coordinate, upper vertical coordinate, lower vertical coordinate of the target box, the left horizontal coordinate, right horizontal coordinate, upper vertical coordinate, lower vertical coordinate of the prediction box, the upper left distance and lower right distance of the target box and the prediction box; B prd and B gt Represent the prediction box and target box respectively; w and h represent the width and height of the input image respectively; after defining MPDIoU, the corresponding loss function L MPDIoU It can be defined as:

[0018] L MPDIoU =1-MPDIoU

[0019] Get the matrix box information that can envelop the entire target box and prediction box:

[0020]

[0021] Among them, |C| represents the area of ​​the matrix box that envelops the entire target box and the prediction box.

[0022] As a preferred solution of the target detection method based on the improved yolov8 algorithm described in the present invention, wherein: the regression loss function also includes:

[0023]

[0024]

[0025] in, They represent the center horizontal coordinate, center vertical coordinate of the target box, center horizontal coordinate, center vertical coordinate of the predicted box, width, height of the target box, width and height of the predicted box respectively.

[0026] As a preferred solution of the target detection method based on the improved yolov8 algorithm described in the present invention, wherein: the regression loss function includes, the Inner box coordinates are obtained as follows:

[0027]

[0028]

[0029] Among them, ratio is the scaling factor for obtaining InnerIoU, Respectively represent the left horizontal coordinate, right horizontal coordinate, upper vertical coordinate, and lower vertical coordinate of the target frame after correction by the scale factor, and the left horizontal coordinate, right horizontal coordinate, upper vertical coordinate, and lower vertical coordinate of the prediction frame after correction by the scale factor;

[0030] As a preferred solution of the target detection method based on the improved yolov8 algorithm described in the present invention, the regression loss function includes defining InnerIoU and its loss function solution as follows:

[0031]

[0032] union=(w gt *h gt )*(ratio) 2 +(w prd *h prd )*(ratio) 2 -inter

[0033]

[0034] Among them, inter represents the intersection area of ​​the target box and the prediction box after the inner operation, that is, the numerator of InnerIoU; union represents the union area of ​​the target box and the prediction box after the inner operation, that is, the denominator of InnerIoU; L Inner-IoU Represents the loss function of InnerIoU.

[0035] As a preferred solution of the target detection method based on the improved yolov8 algorithm described in the present invention, wherein: the regression loss function also includes:

[0036] L Inner-MPDIoU =L MPDIoU +IoU-InnerIoU

[0037]

[0038] Among them, L WInner-MPDIoU represents the loss function of Wise-Inner-MPDIoU, L Inner-MPDIoU represents the loss function of Inner-MPDIoU, R WInner-MPDIoU Represents the compensation coefficient of the loss function.

[0039] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, steps of a target detection method based on an improved yolov8 algorithm are implemented.

[0040] A computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of a target detection method based on an improved yolov8 algorithm are implemented.

[0041] Beneficial effects of the present invention: The present invention avoids the problem of low accuracy of the YOLOv8 algorithm in detecting small target objects and the loss of important information in the conventional convolution and downsampling process, and at the same time uses the designed loss function to losslessly improve the accuracy of the algorithm, thereby greatly improving the target detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0043] Figure 1 A flowchart of a target detection method based on an improved YOLOv8 algorithm is provided for one embodiment of the present invention.

[0044] Figure 2 A schematic diagram of the development process of a common target detection algorithm for a target detection method based on an improved yolov8 algorithm provided in one embodiment of the present invention.

[0045] Figure 3 A schematic diagram of simulation comparison of modules of a traditional YOLOv8 algorithm and an improved YOLOv8 algorithm for a target detection method based on an improved YOLOv8 algorithm provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0047] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0048] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0049] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0050] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0051] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0052] Example 1, reference Figure 1 , which is the first embodiment of the present invention, and provides a target detection method based on an improved yolov8 algorithm, comprising:

[0053] Step 1: Collect image data according to the target object to be detected, use Labelimg to annotate the above image dataset, and divide the training set, validation set, and test set in the dataset into a ratio of 7:1:2 to complete the production of the target object dataset;

[0054] Step 2: Build a target detection model, which uses the YOLOv8n network as the basic network and replaces the conventional convolution in the backbone layer of the YOLOv8n network with a lightweight adaptive weight downsampling module;

[0055] Step 3: Add a p2 detection layer in the head layer as the detection head for small target detection;

[0056] Step 4: Use Wise-Inner-MPDIoU as the regression loss function for the difference between the model output prediction value and the true label;

[0057] Step 5: Configure the training environment and use the preprocessed dataset as input to train the small object detection model;

[0058] Step 6: Apply the trained small target detection model and use the validation set as input to output the detection results.

[0059] The lightweight adaptive weight downsampling method in step 2 is as follows:

[0060] Step 1: Integrate the Focus network slicing idea, split the input image into 2*2 parts and complete the softmax operation on each 2*2 matrix part;

[0061] Step 2: Use the rearrange function to organize the array format of the output results of each 2*2 matrix;

[0062] Step 3: Perform 1*1 convolution operation on the result after softmax operation and integrate the results of each part;

[0063] Step 4: Use the rearrange function to organize the array format of each 2*2 matrix partial output result and output the final result;

[0064] The Wise-Inner-MPDIoU loss function in step 4 combines the ideas of the three loss functions of WiseIoU, InnerIoU, and MPDIoU. The calculation formula is as follows:

[0065] First, define an MPDIoU and get its loss function formula. Then, obtain the corresponding Inner box coordinate information through the coordinate information of the target box and the predicted box, and then solve IoU inner and its loss function, and finally integrate the idea of ​​WiseIoU to obtain the Wise-Inner-MPDIoU loss function.

[0066]

[0067]

[0068] L MPDIoU =1-MPDIoU

[0069]

[0070]

[0071]

[0072]

[0073]

[0074]

[0075] union=(w gt *h gt )*(ratio) 2 +(w prd *h prd )*(ratio) 2 -inter

[0076]

[0077] L Inner-MPDIoU =L MPDIoU +IoU-InnerIoU

[0078]

[0079] Among them, B prd and B gt Represent the prediction box and target box respectively; Respectively represent the left horizontal coordinate, right horizontal coordinate, upper vertical coordinate, lower vertical coordinate of the target box, the left horizontal coordinate, right horizontal coordinate, upper vertical coordinate, lower vertical coordinate of the prediction box, the upper left distance and lower right distance of the target box and the prediction box; w and h represent the width and height of the input image respectively; |C| represents the area of ​​the matrix box that envelops the entire target box and the prediction box; They represent the center horizontal coordinate, center vertical coordinate, center horizontal coordinate, center vertical coordinate, width, height, and width and height of the target box, respectively; ratio represents the scale factor of InnerIoU. They respectively represent the left horizontal coordinate, right horizontal coordinate, upper vertical coordinate, and lower vertical coordinate of the target box after correction by the scale factor, and the left horizontal coordinate, right horizontal coordinate, upper vertical coordinate, and lower vertical coordinate of the prediction box after correction by the scale factor; inter represents the intersection area of ​​the target box and the prediction box after the inner operation, that is, the numerator of InnerIoU; union represents the union area of ​​the target box and the prediction box after the inner operation, that is, the denominator of InnerIoU; L Inner-IoU represents the loss function of InnerIoU; L WInner-MPDIoU represents the loss function of Wise-Inner-MPDIoU; L Inner-MPDIoU represents the loss function of Inner-MPDIoU; R WInner-MPDIoU Represents the compensation coefficient of the loss function.

[0080] The above-mentioned target detection method based on the improved yolov8 algorithm, wherein: the improved yolov8 algorithm, on the basis of the traditional yolov8 algorithm, adds a lightweight adaptive weight downsampling module in the backbone layer, adds a P2 detection head in the head layer, and designs a new loss function by combining the ideas of WiseIoU, InnerIoU, and MPDIoU, so that when the yolov8 algorithm performs target detection, it adds the information lost in the conventional convolution or downsampling operation, improves the ability to capture the features of small target objects, and improves the detection accuracy of the entire algorithm through the designed loss function.

[0081] Example 2, reference Figure 2-Figure 3 , which is an embodiment of the present invention, provides a target detection method based on the improved yolov8 algorithm. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through experiments.

[0082] In order to verify the effectiveness and feasibility of the target detection method based on the improved yolov8 algorithm, the target detection method based on the improved yolov8 algorithm and the original yolov8 algorithm were compared and simulated on Python. All experiments were carried out on a 13th Gen Intel(R)Core(TM)i5-13490F2.50GHz computer with 32G memory.

[0083] The experimental environment is Anaconda3, python3.9, and GPU is used for training. The dataset used contains 4858 original images and the training set, validation set, and test set in the dataset are divided into a ratio of 7:1:2.

[0084] Compare the simulation of the traditional yolov8 algorithm and the improved yolov8 algorithm, such as Figure 3 As shown in Table 1, Figure 3 Table 1 is a comparison chart of the simulation of each module of the traditional yolov8 algorithm and the improved yolov8 algorithm. Table 2 is a comparison table of the yolov8 algorithm indicators before and after the improvement. It can be seen that adding a lightweight adaptive weight downsampling module to the backbone layer, adding a small target detection P2 detection head after the head layer, and replacing the newly designed Wise-Inner-MPDIoU loss function can improve the accuracy of the original yolov8 algorithm. At the same time, the three improvements are fused and processed, and it is found that the improved algorithm is far superior to the traditional yolov8 algorithm in effect, and can improve the target detection accuracy by about 4 points. According to the indicators of each loss function, it is found that the designed yolov8-LAWDS-p2-Wise-Inner-MPDIoU has achieved the best effect.

[0085] Table 1 is a comparison table of yolov8 algorithm indicators before and after improvement

[0086] P R mAP50 mAP50-95 yolov8n 0.849 0.803 0.829 0.513 yolov8-Wise-Inner-MPDIoU 0.877 0.799 0.841 0.516 yolov8-LAWDS(backbone) 0.866 0.796 0.836 0.506 yolov8-p2 0.867 0.799 0.848 0.538 yolov8-LAWDS-p2 0.871 0.81 0.848 0.531 yolov8-LAWDS-p2-Wise-Inner-MPDIoU 0.902 0.778 0.868 0.533

[0087] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

[0088] Example 3

[0089] The third embodiment of the present invention is different from the first two embodiments in that:

[0090] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0091] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0092] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0093] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0094] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0095] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A target detection method based on an improved yolov8 algorithm, characterized in that: include, Create and preprocess datasets; Construct a target detection model, which uses the YOLOv8n network as the basic network, replaces the conventional convolution in the backbone layer of the YOLOv8n network with a lightweight adaptive weight downsampling module; and adds a p2 detection head to the head layer; Wise-Inner-MPDIoU is used as the regression loss function for the difference between the model output prediction value and the true label; Configure the training environment to use the preprocessed dataset as input to train the small object detection model; Apply the trained small target detection model and use the validation set as input to output the detection results.

2. A target detection method based on an improved yolov8 algorithm as claimed in claim 1, characterized in that: The data set preparation and preprocessing includes integrating the Focus network slicing idea, performing 2*2 segmentation processing on the input image and completing a softmax operation on each 2*2 matrix part; Use the rearrange function to organize the array format of the output results of each 2*2 matrix part; Perform 1*1 convolution operation on the result after softmax operation and integrate the results of each part; Use the rearrange function to organize the array format of the output results of each 2*2 matrix part and output the final result.

3. A target detection method based on an improved yolov8 algorithm as claimed in claim 2, characterized in that: Adding the p2 detection head in the head layer includes adding an upsampling link and a convolution link after the p3 layer of the head layer of the YOLOv8n network as the p2 detection head.

4. A target detection method based on an improved yolov8 algorithm as claimed in claim 3, characterized in that: The regression loss function includes combining the three loss function ideas of WiseIoU, InnerIoU and MPDIoU. The loss function formula is: MPDIoU is defined as: Among them, B prd and B gt Represent the prediction box and target box respectively, d1, d2 represent the left horizontal coordinate, right horizontal coordinate, upper vertical coordinate, lower vertical coordinate of the target box, the left horizontal coordinate, right horizontal coordinate, upper vertical coordinate, lower vertical coordinate of the prediction box, the upper left distance and lower right distance of the target box and the prediction box respectively; w and h represent the width and height of the input image respectively; after defining MPDIoU, the corresponding loss function L MPDIoU Defined as: L MPDIoU =1-MPDIoU Get the matrix box information that can envelop the entire target box and prediction box: Among them, |C| represents the area of ​​the matrix box that envelops the entire target box and the prediction box.

5. A target detection method based on an improved yolov8 algorithm as claimed in claim 4, characterized in that: The regression loss function also includes: in, w gt ,h gt ,w prd ,h prd They respectively represent the central horizontal coordinate, central vertical coordinate of the target box, the central horizontal coordinate, central vertical coordinate of the predicted box, the width and height of the target box, and the width and height of the predicted box.

6. A target detection method based on an improved yolov8 algorithm as claimed in claim 5, characterized in that: The regression loss function includes, the Inner frame coordinates are obtained as follows: Among them, ratio is the scaling factor for InnerIoU. They respectively represent the left horizontal coordinate, right horizontal coordinate, upper vertical coordinate, and lower vertical coordinate of the target box after correction by the scale factor, and the left horizontal coordinate, right horizontal coordinate, upper vertical coordinate, and lower vertical coordinate of the prediction box after correction by the scale factor.

7. A target detection method based on improved yolov8 algorithm as claimed in claim 6, characterized in that: The regression loss function includes defining InnerIoU and its loss function solution as follows: union=(w gt *h gt )*(ratio) 2 +(w prd *h prd )*(ratio) 2 -inter Among them, inter represents the intersection area of ​​the target box and the prediction box after the inner operation, that is, the numerator of InnerIoU; union represents the union area of ​​the target box and the prediction box after the inner operation, that is, the denominator of InnerIoU; L Inner-IoU Represents the loss function of InnerIoU.

8. A target detection method based on an improved yolov8 algorithm as claimed in claim 7, characterized in that: The regression loss function also includes: L Inner-MPDIoU =L MPDIoU +IoU-InnerIoU Among them, L WInner-MPDIoU represents the loss function of Wise-Inner-MPDIoU, L Inner-MPDIoU represents the loss function of Inner-MPDIoU, R WInner-MPDIoU Represents the compensation coefficient of the loss function.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Cited By

  • Wood repairing method and device and medium

    CN120411054A