Target detection method and device based on result clustering, equipment and storage medium

By using a result-based clustering method, adjusting the learning rate through gradient parameter tuning, and performing model segmentation and fusion clustering, the problem of low accuracy in target detection models is solved, achieving higher detection accuracy.

CN116580219BActive Publication Date: 2026-04-14PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-31
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing object detection models have low detection accuracy during training and optimization, resulting in inaccurate detection results.

Method used

A result-based clustering method is adopted, and the learning rate is adjusted by gradient parameter tuning to train the target detection model in the model set. The prediction model group is segmented and fused clustered to generate fused detection results.

Benefits of technology

The accuracy of target detection has been improved by fusing the results of multiple models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116580219B_ABST
    Figure CN116580219B_ABST
Patent Text Reader

Abstract

The application relates to an artificial intelligence technology and discloses a target detection method based on result clustering, which comprises the following steps: selecting a target detection model as a target prediction model, adjusting learning rates of all target prediction models to obtain a standard learning rate set; training all target detection models to obtain a prediction model set; selecting a prediction model group as a target prediction model group one by one, collecting prediction results of the target prediction model group into a detection frame sequence; fusing and clustering all detection frames to obtain a fused detection frame sequence, and fusing and clustering all fused detection frame sequences to obtain a fused detection result. In addition, the application also relates to a blockchain technology, and the target detection model can be stored in a node of the blockchain. The application further provides a target detection device based on result clustering, an electronic device and a storage medium. The application can be applied to the fields of financial bill identification and medical imaging identification, and can improve the accuracy of target detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a target detection method, apparatus, electronic device, and computer-readable storage medium based on result clustering. Background Technology

[0002] Object detection is an image segmentation method based on the geometric and statistical features of objects. It combines object segmentation and recognition and has played an important role in fields such as financial bill recognition, automatic claims processing, medical case data extraction, and medical image reading. However, in order to improve the detection effect of object detection, it is necessary to optimize the object detection model.

[0003] Existing optimization methods for object detection models are mostly based on simple training optimization. For example, they involve data cleaning and augmentation of the model's data, and cross-validation and parameter tuning during the model training phase to optimize the model. However, in practical applications, detection results are diverse, containing various information such as label and location information. Simple training optimization has limited improvement on the model's output, potentially leading to low accuracy in object detection. Summary of the Invention

[0004] This invention provides a target detection method, apparatus, and computer-readable storage medium based on result clustering, the main purpose of which is to solve the problem of low accuracy in target detection.

[0005] To achieve the above objectives, the present invention provides a target detection method based on result clustering, comprising:

[0006] One by one, target detection models are selected from the preset training model set as target prediction models. The learning rate of the target prediction models is adjusted using the preset gradient parameter tuning method to obtain standard learning rate groups. All standard learning rate groups are then aggregated into a standard learning rate set.

[0007] The target detection models in the training model set are trained using the standard learning rate set to obtain a prediction model set composed of the trained target detection models;

[0008] The target detection model in the prediction model set is divided into multiple prediction model groups, and each prediction model group is selected as a target prediction model group. The prediction results of the target prediction model groups are then aggregated into a detection box sequence.

[0009] All detection boxes in the detection box sequence are fused and clustered to obtain fused detection boxes. The fused detection boxes are added to the detection box sequence to obtain a fused detection box sequence. All fused detection box sequences are then fused and clustered to obtain a fused detection result.

[0010] Optionally, adjusting the learning rate of the target prediction model using a preset gradient parameter tuning method to obtain a standard learning rate set includes:

[0011] Each variable parameter in the target prediction model is selected as a target variable parameter, and the cumulative sum of squared gradients of the target variable parameters is calculated.

[0012] The gradient coefficient is obtained by adding the cumulative squared gradient to the preset smoothing constant, and the square root value of the gradient coefficient is used as the parameter tuning coefficient.

[0013] The learning rate of the target prediction model is divided by the parameter tuning coefficient to obtain the variable parameter learning rate of the target variable parameter, and all the variable parameter learning rates are aggregated into a standard learning rate group.

[0014] Optionally, training each of the object detection models in the training model set using the standard learning rate set to obtain a prediction model set composed of the trained object detection models includes:

[0015] Each standard learning rate group in the standard learning rate set is selected as a target learning rate group, and the target detection model corresponding to the target learning rate group is used as a standard detection model.

[0016] The primary loss value of the standard detection model is calculated using a preset loss function. The parameters of the standard detection model are updated using the target learning rate group and the primary loss value. It is then determined whether the secondary loss value of the updated standard detection model is less than a preset loss threshold.

[0017] When the secondary loss value is greater than or equal to the loss threshold, the primary loss value is updated using the secondary loss value, and the step of updating each variable parameter in the standard detection model using the target learning rate group and the primary loss value is returned.

[0018] When the secondary loss value is less than the loss threshold, the updated standard detection model is used as the target prediction model, and all the target prediction models are aggregated into the prediction model set.

[0019] Optionally, dividing the target detection models in the prediction model set into multiple prediction model groups includes:

[0020] Each target prediction model in the prediction model set is selected as the first prediction model, and the target prediction model located after the first prediction model in the prediction model set is selected as the second prediction model. The first prediction model and the second prediction model are then combined into a prediction model group.

[0021] Determine whether the second prediction model is the last target prediction model in the prediction model set;

[0022] The model segmentation ends when the second prediction model is the last target prediction model in the prediction model set.

[0023] If the second prediction model is not the last target prediction model in the prediction model set, return to the step of selecting each target prediction model in the prediction model set as the first prediction model.

[0024] Optionally, the step of aggregating the prediction results of the target prediction model group into a detection box sequence includes:

[0025] The first prediction model in the target prediction model group is used to perform target detection, and the first detection box set is obtained;

[0026] The second prediction model in the target prediction model group is used to perform target detection, and the second detection box set is obtained.

[0027] The first set of detection boxes and the second set of detection boxes are combined to form an initial set of detection boxes. The detection boxes in the initial set of detection boxes are sorted in descending order of confidence to obtain a detection box sequence.

[0028] Optionally, the step of fusing and clustering all the detection boxes in the detection box sequence to obtain fused detection boxes includes:

[0029] The detection boxes in the detection box sequence are divided into multiple detection box groups according to the detection category. Each detection box group is selected as a target box group. The center point of a detection box in the target box group is randomly selected as the initial box center. All the initial box centers are gathered into an initial box center set.

[0030] Each detection box in the detection box sequence is selected as a target detection box, and the clustering distance from the target detection box to each initial box center in the initial box center set is calculated respectively.

[0031] The initial box center with the smallest clustering distance to the target detection box is selected as the nearest center point of the target detection box, and the target detection box is divided into the standard box group corresponding to the nearest center point. When the target detection box is the last detection box in the detection box sequence, all the clustered standard box groups are combined into a standard box group set.

[0032] Select one standard box group from the set of standard box groups as the target standard box group, calculate the secondary center point of the target standard box group, and calculate the center distance between the secondary center point and the initial box center corresponding to the target standard box group. The sum of all the center distances is taken as the standard center distance.

[0033] Determine whether the standard center distance is greater than a preset distance threshold;

[0034] When the standard center distance is greater than the distance threshold, the secondary center point is updated to the initial box center, and the step of selecting the detection boxes in the detection box sequence one by one as the target detection box is returned.

[0035] When the standard center distance is less than or equal to the distance threshold, a fusion detection box is generated using the secondary center point.

[0036] Optionally, the step of performing fusion clustering on all fused detection box sequences to obtain fused detection results includes:

[0037] All fusion detection box sequences are aggregated into a fusion sequence group. A fusion detection box is randomly selected from the fusion sequence group as the first fusion sequence. The first fusion sequence is then deleted from the fusion sequence group to obtain a standard fusion sequence group.

[0038] One fusion detection box is selected from each of the standard fusion sequence groups as the second fusion sequence. The first fusion sequence and the second fusion sequence are then fused and clustered to obtain the target fusion sequence.

[0039] Determine whether the second fusion sequence is the last fusion detection box sequence in the standard fusion sequence group;

[0040] When the second fusion sequence is the last fusion detection box sequence in the standard fusion sequence group, the target fusion sequence is used as the first fusion sequence, and the process returns to the step of selecting one fusion detection box in the standard fusion sequence group as the second fusion sequence.

[0041] When the second fusion sequence is not the last fusion detection box sequence in the standard fusion sequence group, the target fusion sequence is taken as the fusion detection result.

[0042] To address the above problems, the present invention also provides a target detection device based on result clustering, the device comprising:

[0043] The gradient parameter tuning module is used to select target detection models from the preset training model set one by one as target prediction models, adjust the learning rate of the target prediction models using the preset gradient parameter tuning method to obtain standard learning rate groups, and aggregate all standard learning rate groups into a standard learning rate set.

[0044] The model prediction module is used to train each of the target detection models in the training model set using the standard learning rate set, so as to obtain a prediction model set composed of the trained target detection models;

[0045] The result segmentation module is used to segment the target detection model in the prediction model set into multiple prediction model groups, select each prediction model group as a target prediction model group, and aggregate the prediction results of the target prediction model group into a detection box sequence.

[0046] The fusion clustering module is used to perform fusion clustering on all the detection boxes in the detection box sequence to obtain fusion detection boxes, add the fusion detection boxes to the detection box sequence to obtain a fusion detection box sequence, and perform fusion clustering on all the fusion detection box sequences to obtain a fusion detection result.

[0047] To address the above problems, the present invention also provides an electronic device, the electronic device comprising:

[0048] At least one processor; and,

[0049] A memory communicatively connected to the at least one processor; wherein,

[0050] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the target detection method based on result clustering described above.

[0051] To address the aforementioned problems, the present invention also provides a computer-readable storage medium storing at least one computer program, which is executed by a processor in an electronic device to implement the target detection method based on result clustering described above.

[0052] This invention, through a pre-defined gradient parameter tuning method, adjusts the learning rate of the target prediction model to obtain a standard learning rate set. This allows the loss function value of each target prediction model in the training model set to decrease rapidly, thereby accelerating the convergence speed of the target prediction model. By training each target detection model in the training model set using the standard learning rate set, a prediction model set composed of the trained target detection models is obtained. This results in multiple target detection models pointing to different prediction results, laying the foundation for subsequent result fusion. By dividing the target detection models in the prediction model set into multiple prediction model groups and selecting each prediction model group sequentially... The model group, serving as a target prediction model group, aggregates the prediction results of the target prediction model group into a detection box sequence. It can fuse the detection results of all target detection models pairwise, thereby enhancing the accuracy of subsequent detection results. By fusing and clustering all detection boxes in the detection box sequence, a fused detection box is obtained. This fused detection box is added to the detection box sequence to obtain a fused detection box sequence. Furthermore, fusing and clustering all the fused detection box sequences yields a fused detection result. The clustering and fusion of all detection boxes in the detection result can be combined with the confidence score and the distance between detection boxes, thus integrating the output results of multiple models and improving the accuracy of target detection. Therefore, the target detection method, apparatus, electronic device, and computer-readable storage medium based on result clustering proposed in this invention can solve the problem of low accuracy in target detection. Attached Figure Description

[0053] Figure 1 This is a flowchart illustrating a target detection method based on result clustering according to an embodiment of the present invention.

[0054] Figure 2 This is a schematic diagram of the process for generating a prediction model set according to an embodiment of the present invention;

[0055] Figure 3 This is a schematic diagram of the process for generating a fusion detection box according to an embodiment of the present invention;

[0056] Figure 4 This is a functional block diagram of a target detection device based on result clustering provided in an embodiment of the present invention;

[0057] Figure 5 This is a schematic diagram of the structure of an electronic device that implements the target detection method based on result clustering, according to an embodiment of the present invention.

[0058] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0059] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0060] This application provides a target detection method based on result clustering. The execution entity of the result clustering-based target detection method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the result clustering-based target detection method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0061] Reference Figure 1 The diagram shown is a flowchart illustrating a target detection method based on result clustering according to an embodiment of the present invention. In this embodiment, the target detection method based on result clustering includes:

[0062] S1. Select target detection models from the preset training model set one by one as target prediction models, and adjust the learning rate of the target prediction models using the preset gradient parameter tuning method to obtain standard learning rate groups. Then, gather all the standard learning rate groups into a standard learning rate set.

[0063] In this embodiment of the invention, the training model set may be a collection of multiple different target detection models for the same target stored in storage devices such as blockchains and servers.

[0064] Specifically, the target detection model refers to an untrained model used for target detection operations such as financial bill recognition, automatic claims processing, medical case data extraction, and medical image reading, such as untrained YOLO networks, R-CNN (Region-Convolutional Neural Networks) networks, and other neural networks.

[0065] In detail, the learning rate refers to the step size for updating the weight matrix in the backpropagation network. In some common networks, the learning rate is decreased exponentially after a fixed number of iterations or when the model no longer converges. The larger the learning rate, the greater the impact of the calculation error on the weight matrix, and the more likely it is to oscillate around a local optimum. The smaller the learning rate, the more refined the update of the network weights, but it requires more time to iterate.

[0066] In this embodiment of the invention, adjusting the learning rate of the target prediction model using a preset gradient parameter tuning method to obtain a standard learning rate set includes: selecting each variable parameter in the target prediction model as a target variable parameter, calculating the cumulative squared gradient of the target variable parameter; adding a preset smoothing constant to the cumulative squared gradient to obtain a gradient coefficient, and using the square root of the gradient coefficient as a parameter tuning coefficient; dividing the learning rate of the target prediction model by the parameter tuning coefficient to obtain the variable parameter learning rate of the target variable parameter, and aggregating all the variable parameter learning rates into a standard learning rate set.

[0067] In detail, the cumulative sum of squared gradients refers to the cumulative sum of squared gradients of all the target parameter variables since the start of learning rate adjustment, wherein the gradients can be calculated using the chain rule.

[0068] Specifically, the smoothing constant is a preset constant set to avoid the case where the denominator is zero.

[0069] In this embodiment of the invention, by adjusting the learning rate of the target prediction model using a preset gradient parameter tuning method to obtain a standard learning rate group, the loss function value of each target prediction model in the training model set can be reduced rapidly, thereby accelerating the convergence speed of the target prediction model.

[0070] S2. Train each of the target detection models in the training model set using the standard learning rate set to obtain a prediction model set composed of the trained target detection models.

[0071] In this embodiment of the invention, reference is made to Figure 2 As shown, the step of training each of the target detection models in the training model set using the standard learning rate set to obtain a prediction model set composed of the trained target detection models includes:

[0072] S21. Select the standard learning rate groups in the standard learning rate set one by one as the target learning rate group, and use the target detection model corresponding to the target learning rate group as the standard detection model.

[0073] S22. Calculate the primary loss value of the standard detection model using a preset loss function, and update each variable parameter in the standard detection model using the target learning rate group and the primary loss value.

[0074] S23. Determine whether the secondary loss value of the updated standard detection model is less than a preset loss threshold;

[0075] S24. When the secondary loss value is greater than or equal to the loss threshold, update the primary loss value using the secondary loss value, and return to the step of updating each variable parameter in the standard detection model using the target learning rate group and the primary loss value;

[0076] S25. When the secondary loss value is less than the loss threshold, the updated standard detection model is used as the target prediction model, and all the target prediction models are aggregated into the prediction model set.

[0077] Specifically, the loss function can be the cross-entropy loss function or the mean squared error loss function.

[0078] Specifically, the most recent gradient descent algorithm or stochastic gradient descent algorithm can be used to update the various parameters in the standard detection model using the target learning rate set and the primary loss value.

[0079] In this embodiment of the invention, by training each of the target detection models in the training model set using the standard learning rate set, a prediction model set composed of the trained target detection models is obtained, which can yield multiple target detection models pointing to different prediction results, thus laying the foundation for subsequent result fusion.

[0080] S3. Divide the target detection model in the prediction model set into multiple prediction model groups, select each prediction model group as a target prediction model group, and aggregate the prediction results of the target prediction model group into a detection box sequence.

[0081] In this embodiment of the invention, the prediction model group includes two consecutive target detection models.

[0082] In this embodiment of the invention, the step of dividing the target detection models in the prediction model set into multiple prediction model groups includes: selecting target prediction models in the prediction model set one by one as first prediction models, selecting target prediction models in the prediction model set that are located after the first prediction models as second prediction models, and combining the first prediction models and the second prediction models into a prediction model group; determining whether the second prediction model is the last target prediction model in the prediction model set; when the second prediction model is the last target prediction model in the prediction model set, ending the model segmentation; when the second prediction model is not the last target prediction model in the prediction model set, returning to the step of selecting target prediction models in the prediction model set one by one as first prediction models.

[0083] Specifically, the total number of the prediction model group is one less than the total number of the target detection models.

[0084] Specifically, the step of aggregating the prediction results of the target prediction model group into a detection box sequence includes: performing target detection using the first prediction model in the target prediction model group to obtain a first detection box set; performing target detection using the second prediction model in the target prediction model group to obtain a second detection box set; aggregating the first detection box set and the second detection box set into an initial detection box set; and sorting the detection boxes in the initial detection box set in descending order of confidence to obtain a detection box sequence.

[0085] In this embodiment of the invention, by dividing the target detection model in the prediction model set into multiple prediction model groups, selecting each prediction model group as a target prediction model group, and aggregating the prediction results of the target prediction model groups into a detection box sequence, the detection results of all target detection models can be fused pairwise, thereby enhancing the accuracy of subsequent detection results.

[0086] S4. Perform fusion clustering on all the detection boxes in the detection box sequence to obtain fused detection boxes, add the fused detection boxes to the detection box sequence to obtain a fused detection box sequence, and perform fusion clustering on all the fused detection box sequences to obtain a fused detection result.

[0087] In this embodiment of the invention, reference is made to Figure 3 As shown, the step of fusing and clustering all the detection boxes in the detection box sequence to obtain fused detection boxes includes:

[0088] S31. Divide the detection boxes in the detection box sequence into multiple detection box groups according to the detection category, select each detection box group as a target box group, randomly select the center point of a detection box in the target box group as the initial box center, and gather all the initial box centers into an initial box center set.

[0089] S32. Select the detection boxes in the detection box sequence one by one as target detection boxes, and calculate the clustering distance from the target detection box to each initial box center in the initial box center set respectively;

[0090] S33. Select the initial box center with the smallest clustering distance to the target detection box as the nearest center point of the target detection box, and divide the target detection box into the standard box group corresponding to the nearest center point, until the target detection box is the last detection box in the detection box sequence, and then gather all the clustered standard box groups into a standard box group set.

[0091] S34. Select the standard frame groups in the standard frame group set one by one as the target standard frame group, calculate the secondary center point of the target standard frame group, and calculate the center distance between the secondary center point and the initial frame center corresponding to the target standard frame group. The sum of all the center distances is taken as the standard center distance.

[0092] S35. Determine whether the standard center distance is greater than a preset distance threshold;

[0093] S36. When the standard center distance is greater than the distance threshold, update the secondary center point to the initial box center, and return to the step of selecting the detection boxes in the detection box sequence one by one as the target detection box;

[0094] S37. When the standard center distance is less than or equal to the distance threshold, a fusion detection box is generated using the secondary center point.

[0095] In detail, the clustering distance is a value obtained by multiplying the category similarity by the confidence score and dividing by the pixel distance. The category similarity can be calculated using a cosine similarity algorithm, the confidence score is extracted from the detection results, and the pixel distance can be calculated using a distance formula.

[0096] Specifically, the secondary center point refers to the center point corresponding to the position that has the same clustering distance as the center points of all detection boxes in the target standard box group.

[0097] Specifically, the center distance refers to the clustering distance between the secondary center point and the initial frame center.

[0098] Specifically, generating a fusion detection box using the secondary center point means generating a detection box as the fusion detection box with the secondary center point as the center point.

[0099] In detail, the step of performing fusion clustering on all fusion detection box sequences to obtain fusion detection results includes: aggregating all fusion detection box sequences into a fusion sequence group; randomly selecting a fusion detection box from the fusion sequence group as a first fusion sequence; deleting the first fusion sequence from the fusion sequence group to obtain a standard fusion sequence group; selecting one fusion detection box from the standard fusion sequence group one by one as a second fusion sequence; performing fusion clustering on the first fusion sequence and the second fusion sequence to obtain a target fusion sequence; determining whether the second fusion sequence is the last fusion detection box sequence in the standard fusion sequence group; when the second fusion sequence is the last fusion detection box sequence in the standard fusion sequence group, using the target fusion sequence as the first fusion sequence, and returning to the step of selecting one fusion detection box from the standard fusion sequence group one by one as the second fusion sequence; when the second fusion sequence is not the last fusion detection box sequence in the standard fusion sequence group, using the target fusion sequence as the fusion detection result.

[0100] In detail, the step of performing fusion clustering on the first fusion sequence and the second fusion sequence to obtain the target fusion sequence is the same as the step in step S4 above, which involves performing fusion clustering on all the detection boxes in the detection box sequence to obtain fused detection boxes, and adding the fused detection boxes to the detection box sequence to obtain the fused detection box sequence. Therefore, it will not be repeated here.

[0101] In this embodiment of the invention, all detection boxes in the detection box sequence are fused and clustered to obtain fused detection boxes. The fused detection boxes are added to the detection box sequence to obtain a fused detection box sequence. All the fused detection box sequences are then fused and clustered to obtain a fused detection result. The clustering and fusion of all detection boxes in the detection result can be combined with the confidence score and the distance between the detection boxes, thereby integrating the output results of multiple models and improving the accuracy of target detection.

[0102] This invention, through a pre-defined gradient parameter tuning method, adjusts the learning rate of the target prediction model to obtain a standard learning rate set. This allows the loss function value of each target prediction model in the training model set to decrease rapidly, thereby accelerating the convergence speed of the target prediction model. By training each target detection model in the training model set using the standard learning rate set, a prediction model set composed of the trained target detection models is obtained. This results in multiple target detection models pointing to different prediction results, laying the foundation for subsequent result fusion. By dividing the target detection models in the prediction model set into multiple prediction model groups and selecting each prediction model group sequentially... The model group, serving as a target prediction model group, aggregates the prediction results of the target prediction model group into a detection box sequence. It can fuse the detection results of all target detection models pairwise, thereby enhancing the accuracy of subsequent detection results. By fusing and clustering all detection boxes in the detection box sequence, a fused detection box is obtained. This fused detection box is added to the detection box sequence to obtain a fused detection box sequence. Furthermore, fusing and clustering all the fused detection box sequences yields a fused detection result. The clustering and fusion of all detection boxes in the detection result can be combined with the confidence score and the distance between detection boxes, thus integrating the output results of multiple models and improving the accuracy of target detection. Therefore, the target detection method based on result clustering proposed in this invention can solve the problem of low accuracy in target detection.

[0103] like Figure 4 The diagram shown is a functional block diagram of a target detection device based on result clustering provided in an embodiment of the present invention.

[0104] The target detection device 100 based on result clustering described in this invention can be installed in an electronic device. Depending on the functions implemented, the target detection device 100 based on result clustering may include a gradient parameter tuning module 101, a model prediction module 102, a result segmentation module 103, and a fusion clustering module 104. The module described in this invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and which are stored in the memory of the electronic device.

[0105] In this embodiment, the functions of each module / unit are as follows:

[0106] The gradient parameter tuning module 101 is used to select target detection models from the preset training model set one by one as target prediction models, adjust the learning rate of the target prediction models using the preset gradient parameter tuning method to obtain standard learning rate groups, and aggregate all standard learning rate groups into a standard learning rate set.

[0107] The model prediction module 102 is used to train each of the target detection models in the training model set using the standard learning rate set, so as to obtain a prediction model set composed of the trained target detection models.

[0108] The result segmentation module 103 is used to segment the target detection model in the prediction model set into multiple prediction model groups, select each prediction model group as a target prediction model group, and aggregate the prediction results of the target prediction model group into a detection box sequence.

[0109] The fusion clustering module 104 is used to perform fusion clustering on all the detection boxes in the detection box sequence to obtain fusion detection boxes, add the fusion detection boxes to the detection box sequence to obtain a fusion detection box sequence, and perform fusion clustering on all the fusion detection box sequences to obtain a fusion detection result.

[0110] In detail, the modules in the target detection device 100 based on result clustering described in this embodiment of the invention employ the same methods as described above. Figures 1 to 3 The target detection method based on result clustering described in the article uses the same technical means and can produce the same technical effect, so it will not be repeated here.

[0111] like Figure 5 The diagram shown is a structural schematic of an electronic device that implements a result-based target detection method according to an embodiment of the present invention.

[0112] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and capable of running on the processor 10, such as a target detection program based on result clustering.

[0113] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., executing a target detection program based on result clustering) and calls data stored in the memory 11 to perform various functions of the electronic device and process data.

[0114] The memory 11 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory 11 can include both internal and external storage units of the electronic device. The memory 11 can be used not only to store application software and various types of data installed on the electronic device, such as code for a target detection program based on result clustering, but also to temporarily store data that has been output or will be output.

[0115] The communication bus 12 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.

[0116] The communication interface 13 is used for communication between the aforementioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, Bluetooth interface, etc.), typically used to establish communication connections between the electronic device and other electronic devices. The user interface may be a display, an input unit (such as a keyboard), or, optionally, a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device and to display a visual user interface.

[0117] The figure only shows an electronic device with components. Those skilled in the art will understand that the structure shown in the figure does not constitute a limitation on the electronic device and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0118] For example, although not shown, the electronic device may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0119] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.

[0120] The target detection program based on result clustering stored in the memory 11 of the electronic device 1 is a combination of multiple instructions, which, when run in the processor 10, can achieve the following:

[0121] One by one, target detection models are selected from the preset training model set as target prediction models. The learning rate of the target prediction models is adjusted using the preset gradient parameter tuning method to obtain standard learning rate groups. All standard learning rate groups are then aggregated into a standard learning rate set.

[0122] The target detection models in the training model set are trained using the standard learning rate set to obtain a prediction model set composed of the trained target detection models;

[0123] The target detection model in the prediction model set is divided into multiple prediction model groups, and each prediction model group is selected as a target prediction model group. The prediction results of the target prediction model groups are then aggregated into a detection box sequence.

[0124] All detection boxes in the detection box sequence are fused and clustered to obtain fused detection boxes. The fused detection boxes are added to the detection box sequence to obtain a fused detection box sequence. All fused detection box sequences are then fused and clustered to obtain a fused detection result.

[0125] Specifically, the specific implementation method of the processor 10 for the above instructions can be referred to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, and will not be repeated here.

[0126] Furthermore, if the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0127] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following:

[0128] One by one, target detection models are selected from the preset training model set as target prediction models. The learning rate of the target prediction models is adjusted using the preset gradient parameter tuning method to obtain standard learning rate groups. All standard learning rate groups are then aggregated into a standard learning rate set.

[0129] The target detection models in the training model set are trained using the standard learning rate set to obtain a prediction model set composed of the trained target detection models;

[0130] The target detection model in the prediction model set is divided into multiple prediction model groups, and each prediction model group is selected as a target prediction model group. The prediction results of the target prediction model groups are then aggregated into a detection box sequence.

[0131] All detection boxes in the detection box sequence are fused and clustered to obtain fused detection boxes. The fused detection boxes are added to the detection box sequence to obtain a fused detection box sequence. All fused detection box sequences are then fused and clustered to obtain a fused detection result.

[0132] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0133] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0134] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0135] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0136] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.

[0137] The blockchain referred to in this invention is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.

[0138] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0139] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.

[0140] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A target detection method based on result clustering, characterized in that, The method includes: One by one, target detection models are selected from the preset training model set as target prediction models. The learning rate of the target prediction models is adjusted using the preset gradient parameter tuning method to obtain standard learning rate groups. All standard learning rate groups are then aggregated into a standard learning rate set. The target detection models in the training model set are trained using the standard learning rate set to obtain a prediction model set composed of the trained target detection models; The target detection model in the prediction model set is divided into multiple prediction model groups, and each prediction model group is selected as a target prediction model group. The prediction results of the target prediction model groups are then aggregated into a detection box sequence. All detection boxes in the detection box sequence are fused and clustered to obtain fused detection boxes. The fused detection boxes are added to the detection box sequence to obtain a fused detection box sequence. All fused detection box sequences are then fused and clustered to obtain a fused detection result. The step of performing fusion clustering on all the fused detection box sequences to obtain fusion detection results includes: All fusion detection box sequences are aggregated into a fusion sequence group. A fusion detection box is randomly selected from the fusion sequence group as the first fusion sequence. The first fusion sequence is then deleted from the fusion sequence group to obtain a standard fusion sequence group. One fusion detection box is selected from each of the standard fusion sequence groups as the second fusion sequence. The first fusion sequence and the second fusion sequence are then fused and clustered to obtain the target fusion sequence. Determine whether the second fusion sequence is the last fusion detection box sequence in the standard fusion sequence group; When the second fusion sequence is the last fusion detection box sequence in the standard fusion sequence group, the target fusion sequence is used as the first fusion sequence, and the process returns to the step of selecting one fusion detection box in the standard fusion sequence group as the second fusion sequence. When the second fusion sequence is not the last fusion detection box sequence in the standard fusion sequence group, the target fusion sequence is taken as the fusion detection result.

2. The target detection method based on result clustering as described in claim 1, characterized in that, The step of adjusting the learning rate of the target prediction model using a preset gradient parameter tuning method to obtain a standard learning rate set includes: Each variable parameter in the target prediction model is selected as a target variable parameter, and the cumulative sum of squared gradients of the target variable parameters is calculated. The gradient coefficient is obtained by adding the cumulative squared gradient to the preset smoothing constant, and the square root value of the gradient coefficient is used as the parameter tuning coefficient. The learning rate of the target prediction model is divided by the parameter tuning coefficient to obtain the variable parameter learning rate of the target variable parameter, and all the variable parameter learning rates are aggregated into a standard learning rate group.

3. The target detection method based on result clustering as described in claim 2, characterized in that, The step of training each of the object detection models in the training model set using the standard learning rate set to obtain a prediction model set composed of the trained object detection models includes: Each standard learning rate group in the standard learning rate set is selected as a target learning rate group, and the target detection model corresponding to the target learning rate group is used as a standard detection model. The primary loss value of the standard detection model is calculated using a preset loss function. The parameters of the standard detection model are updated using the target learning rate group and the primary loss value. It is then determined whether the secondary loss value of the updated standard detection model is less than a preset loss threshold. When the secondary loss value is greater than or equal to the loss threshold, the primary loss value is updated using the secondary loss value, and the step of updating each variable parameter in the standard detection model using the target learning rate group and the primary loss value is returned. When the secondary loss value is less than the loss threshold, the updated standard detection model is used as the target prediction model, and all the target prediction models are aggregated into the prediction model set.

4. The target detection method based on result clustering as described in claim 1, characterized in that, The step of dividing the target detection models in the prediction model set into multiple prediction model groups includes: Each target prediction model in the prediction model set is selected as the first prediction model, and the target prediction model located after the first prediction model in the prediction model set is selected as the second prediction model. The first prediction model and the second prediction model are then combined into a prediction model group. Determine whether the second prediction model is the last target prediction model in the prediction model set; The model segmentation ends when the second prediction model is the last target prediction model in the prediction model set. If the second prediction model is not the last target prediction model in the prediction model set, return to the step of selecting each target prediction model in the prediction model set as the first prediction model.

5. The target detection method based on result clustering as described in claim 1, characterized in that, The step of aggregating the prediction results of the target prediction model group into a detection box sequence includes: The first prediction model in the target prediction model group is used to perform target detection, and the first detection box set is obtained; The second prediction model in the target prediction model group is used to perform target detection, and the second detection box set is obtained. The first set of detection boxes and the second set of detection boxes are combined to form an initial set of detection boxes. The detection boxes in the initial set of detection boxes are sorted in descending order of confidence to obtain a detection box sequence.

6. The target detection method based on result clustering as described in claim 1, characterized in that, The step of fusing and clustering all detection boxes in the detection box sequence to obtain fused detection boxes includes: The detection boxes in the detection box sequence are divided into multiple detection box groups according to the detection category. Each detection box group is selected as a target box group. The center point of a detection box in the target box group is randomly selected as the initial box center. All the initial box centers are gathered into an initial box center set. Each detection box in the detection box sequence is selected as a target detection box, and the clustering distance from the target detection box to each initial box center in the initial box center set is calculated respectively. The initial box center with the smallest clustering distance to the target detection box is selected as the nearest center point of the target detection box, and the target detection box is divided into the standard box group corresponding to the nearest center point. When the target detection box is the last detection box in the detection box sequence, all the clustered standard box groups are combined into a standard box group set. Select one standard box group from the set of standard box groups as the target standard box group, calculate the secondary center point of the target standard box group, and calculate the center distance between the secondary center point and the initial box center corresponding to the target standard box group. The sum of all the center distances is taken as the standard center distance. Determine whether the standard center distance is greater than a preset distance threshold; When the standard center distance is greater than the distance threshold, the secondary center point is updated to the initial box center, and the step of selecting the detection boxes in the detection box sequence one by one as the target detection box is returned. When the standard center distance is less than or equal to the distance threshold, a fusion detection box is generated using the secondary center point.

7. A target detection device based on result clustering, used to implement the target detection method based on result clustering as described in any one of claims 1 to 6, characterized in that, The device includes: The gradient parameter tuning module is used to select target detection models from the preset training model set one by one as target prediction models, adjust the learning rate of the target prediction models using the preset gradient parameter tuning method to obtain standard learning rate groups, and aggregate all standard learning rate groups into a standard learning rate set. The model prediction module is used to train each of the target detection models in the training model set using the standard learning rate set, so as to obtain a prediction model set composed of the trained target detection models; The result segmentation module is used to segment the target detection model in the prediction model set into multiple prediction model groups, select each prediction model group as a target prediction model group, and aggregate the prediction results of the target prediction model group into a detection box sequence. The fusion clustering module is used to perform fusion clustering on all the detection boxes in the detection box sequence to obtain fusion detection boxes, add the fusion detection boxes to the detection box sequence to obtain a fusion detection box sequence, and perform fusion clustering on all the fusion detection box sequences to obtain a fusion detection result.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the target detection method based on result clustering as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the target detection method based on result clustering as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Target detection method and device, electronic equipment and storage medium

    CN111339880A

  • Target detection method, device and apparatus and computer readable storage medium

    CN112598081A