Drug counting system based on deep learning

By constructing local and global factors, designing feature extraction and fusion layers in the drug counting system, and optimizing loss function and tuning process, the problems of inefficient image quality and counting in traditional drug counting methods are solved, and more efficient and accurate drug counting is achieved.

CN119723194APending Publication Date: 2025-03-28SUQIAN FIRST PEOPLES HOSPITAL (JIANGSU PROVINCIAL PEOPLES HOSPITAL SUQIAN BRANCH)
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411840730.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

Traditional drug counting methods have problems such as poor image quality, inaccurate feature extraction, low counting efficiency, insufficient feature representation, single feature extraction network structure, poor feature fusion effect, and unreasonable loss function design.

Method used

By constructing local distortion adjustment factors, global synergistic factors, designing feature transformation functions, feature extraction networks, feature fusion layers and building loss functions, the model tuning process is optimized to improve image quality and counting efficiency.

Benefits of technology

Improve image quality, make features more prominent and easy to extract, improve counting efficiency and accuracy, and optimize the model tuning process, making it more efficient, flexible and refined.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723194A_ABST
    Figure CN119723194A_ABST
Patent Text Reader

Abstract

The invention discloses a medicine counting system based on deep learning. The medicine counting system comprises a data acquisition module, an image preprocessing module, a medicine counting model construction module, an adjusting and optimizing module and a medicine counting module. The invention relates to the technical field of medicine intelligent detection, in particular to a medicine counting system based on deep learning, which improves the image quality by constructing a local distortion adjustment factor and a global collaborative factor, so that the image features are more prominent and are easy to extract, and the counting efficiency is improved; by designing a feature transformation function, designing a feature extraction network, designing a feature fusion layer and constructing a loss function, the processing capability of the model on a complex image is improved, and the counting accuracy is improved; the model is optimized by designing an attenuation coefficient, an exploration factor, an evolutionary strategy and tuning search, so that the explorability and diversity of the search process are improved, the tuning process is more efficient, flexible and fine, and a global optimal solution can be found more quickly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent drug detection, and specifically to a drug counting system based on deep learning. Background Art

[0002] A drug counting system based on deep learning is an intelligent system designed using deep learning technology and data processing technology. By learning and training drug images, a drug counting model is constructed, which can achieve accurate counting of drugs.

[0003] At the same time, traditional drug counting methods have problems such as poor image quality, inaccurate feature extraction, and low counting efficiency; traditional drug counting methods have problems such as insufficient feature representation, single feature extraction network structure, poor feature fusion effect, and unreasonable loss function design; traditional drug counting model tuning methods have problems such as low search efficiency and imprecise parameter adjustment. Summary of the invention

[0004] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a drug counting system based on deep learning. In view of the problems of poor image quality, inaccurate feature extraction and low counting efficiency in traditional drug counting methods, this solution improves the local distortion and global consistency of the image by constructing local distortion adjustment factors, constructing global synergy factors, low-frequency transformation, high-frequency enhancement and image reconstruction, thereby improving the image quality, making the image features more prominent and easy to extract, and improving the counting efficiency; in view of the problems of insufficient feature representation, single feature extraction network structure, poor feature fusion effect and inappropriate loss function design in traditional drug counting methods, the present invention provides a drug counting system based on deep learning. To solve the problem of drug counting, this scheme constructs a drug counting model by designing feature transformation functions, feature extraction networks, feature fusion layers and loss functions, which improves the model's ability to process complex images, enhances the model's sensitivity to subtle differences in images, and improves the accuracy of counting. To address the problems of low search efficiency and imprecise parameter adjustment in traditional drug counting model tuning methods, this scheme optimizes the model by tuning initialization, designing attenuation coefficients, designing exploration factors, designing evolutionary strategies and tuning search, which increases the exploratory nature and diversity of the search process, making the tuning process more efficient, flexible and precise, and able to find the global optimal solution more quickly.

[0005] The technical solution adopted by the present invention is as follows: A drug counting system based on deep learning provided by the present invention includes a data acquisition module, an image preprocessing module, a drug counting model building module, a tuning module and a drug counting module;

[0006] The data acquisition module acquires drug images, drug location information, and drug quantity;

[0007] The image preprocessing module performs preprocessing by image decomposition, construction of local distortion adjustment factors, construction of global synergy factors, low-frequency transformation, high-frequency enhancement, image reorganization and image annotation;

[0008] The drug counting model module is constructed by designing a feature transformation function, a feature extraction network, a feature fusion layer and a loss function to construct a drug counting model;

[0009] The tuning module optimizes the model by tuning initialization, designing attenuation coefficient, designing exploration factor, designing evolution strategy and tuning search;

[0010] The drug counting module uses a drug counting model to count drugs.

[0011] Furthermore, the image preprocessing module specifically includes the following contents:

[0012] Image decomposition, performing wavelet transform on the image to obtain image components, including low-frequency components and high-frequency components;

[0013] Construct the local distortion adjustment factor, which is expressed as follows:

[0014] ;

[0015] Among them, x and y represent the horizontal and vertical coordinate index of the image pixel respectively. Indicates at location The local distortion adjustment factor of the image pixel at , m and n represent the width and height of the local window respectively, i and j represent the abscissa index and ordinate index of the local window respectively, represents the distortion weight, Indicates taking the maximum value, Indicates at location The image pixel at Indicates The mean value of the pixels in the local window centered at .

[0016] Construct the global synergy factor, which is expressed as follows:

[0017] ;

[0018] in, Indicates at location The global co-factor of the image pixel at , where X and Y represent the width and height of the image, respectively, and Respectively represent the horizontal and vertical index of the image, represents the collaborative weight, Indicates at location The image pixel at represents the mean value of all pixels in the image, Represents the variance of all pixels in the image;

[0019] The low frequency transform is expressed as follows:

[0020] ;

[0021] in, Represents the low-frequency component after low-frequency transformation. represents the low-frequency component before low-frequency transformation, represents the transformation coefficient;

[0022] High frequency enhancement, expressed as follows:

[0023] ;

[0024] in, Represents the high-frequency component after high-frequency enhancement. Represents the high-frequency component before high-frequency enhancement. and represents the enhancement factor, and They represent the mean of the global coordination factor and the mean of the local distortion adjustment factor of all pixels in the image respectively;

[0025] Image reconstruction: performing inverse wavelet transform on the transformed and enhanced components to obtain a reconstructed drug image;

[0026] Image annotation, annotating drug images with drug location information and drug quantity.

[0027] Furthermore, the drug counting model module is constructed, specifically including the following contents:

[0028] Design feature transformation function, expressed as follows:

[0029] ;

[0030] in, represents the input of the feature transformation function, represents the logarithm, e represents the natural constant, represents the feature transformation function;

[0031] Design the feature extraction network, which is expressed as follows:

[0032] ;

[0033] in, represents the output of the feature extraction network, p represents the index of the convolutional layer in the feature extraction network, Noc represents the total number of convolutional layers in the feature extraction network, represents the input image to the feature extraction network, and They represent the weight and bias of the pth convolutional layer in the feature extraction network, respectively. represents the convolution operation, represents element-by-element multiplication, represents the linear rectification function, q represents the index of the downsampling layer in the feature extraction network, Nos represents the total number of downsampling layers in the feature extraction network, and They represent the weight and bias of the qth downsampling layer in the feature extraction network, represents the downsampling operation;

[0034] Design the feature fusion layer, expressed as follows:

[0035] ;

[0036] in, represents the output of the feature fusion layer, and represents the feature fusion weight, represents the input of the feature fusion layer, represents the upsampling operation, Indicates taking the absolute value;

[0037] Construct the loss function, which is expressed as follows:

[0038] ;

[0039] in, represents the loss value of the drug counting model, Represents the intersection rate between the real drug target and the predicted drug target border, represents the loss weight, Indicates the actual quantity of drugs, Represents the predicted quantity of drugs.

[0040] Furthermore, the tuning module specifically includes the following contents:

[0041] Initialize tuning, determine the tuning parameter targets, including the weights and biases of the drug counting model, create a parameter search space, set the inverse of the model's loss value as the fitness of the parameter point, set the maximum number of parameter searches, and randomly generate initial parameter points in the parameter search space;

[0042] The design attenuation coefficient is expressed as follows:

[0043] ;

[0044] Where t represents the number of parameter searches. represents the attenuation coefficient during the t-th parameter search, and T represents the maximum number of parameter searches;

[0045] Design exploration factors, expressed as follows:

[0046] ;

[0047] in, represents the exploration factor during the t-th parameter search, represents a sine function, r1 represents a random number ranging from 0 to 1, represents pi;

[0048] Design an evolutionary strategy, expressed as follows:

[0049] ;

[0050] in, represents the parameter point obtained by the t+1th search, represents the parameter point obtained by the tth search, represents the fitness of the parameter point obtained by the tth search, It indicates the parameter point with the lowest fitness among all the searched parameter points before the tth parameter search. It represents the fitness of the parameter point with the lowest fitness among all the parameter points searched before the tth parameter search. It indicates the parameter point with the highest fitness among all the searched parameter points before the tth parameter search. It represents the fitness of the parameter point with the highest fitness among all the searched parameter points before the tth parameter search. r2 and r3 represent random numbers ranging from 0 to 1. Indicates the width of the parameter search space;

[0051] Tune the search, set the fitness limit value, use the evolution strategy to search for parameters, calculate the fitness of the searched parameter points at the end of each search, and when the fitness of a parameter point is greater than the fitness limit value, The parameters of are set as model parameters and the search ends; when , re-tune the search; otherwise, continue searching.

[0052] Furthermore, the drug counting module collects images of drugs to be counted, inputs the images into a drug counting model, and the model outputs the number of drugs in the image.

[0053] The beneficial effects achieved by the present invention using the above scheme are as follows:

[0054] (1) To address the problems of poor image quality, inaccurate feature extraction, and low counting efficiency in traditional drug counting methods, this scheme improves the local distortion and global consistency of the image by constructing local distortion adjustment factors, global synergy factors, low-frequency transformation, high-frequency enhancement, and image reconstruction, thereby improving image quality, making image features more prominent and easier to extract, and improving counting efficiency.

[0055] (2) To address the problems of insufficient feature representation, single feature extraction network structure, poor feature fusion effect and unreasonable loss function design in traditional drug counting methods, this scheme constructs a drug counting model by designing feature transformation functions, feature extraction networks, feature fusion layers and loss functions. This improves the model's ability to process complex images, enhances the model's sensitivity to subtle differences in images, and improves the accuracy of counting.

[0056] (3) To address the problems of low search efficiency and imprecise parameter adjustment in traditional drug counting model tuning methods, this scheme optimizes the model by tuning initialization, designing attenuation coefficients, designing exploration factors, designing evolutionary strategies and tuning search, thereby increasing the exploratory nature and diversity of the search process, making the tuning process more efficient, flexible and precise, and able to find the global optimal solution more quickly. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 A schematic diagram of a drug counting system based on deep learning provided by the present invention;

[0058] Figure 2 is a schematic diagram of a data processing module;

[0059] Figure 3 A schematic diagram of the module for constructing a cardiovascular disease risk assessment model;

[0060] Figure 4 Schematic diagram of the model optimization module.

[0061] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION

[0062] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0063] In the description of the present invention, it should be understood that terms such as “upper”, “lower”, “front”, “back”, “left”, “right”, “top”, “bottom”, “inside” and “outside” indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying 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 should not be understood as limiting the present invention.

[0064] Example 1, see Figure 1 , a drug counting system based on deep learning provided by the present invention includes a data acquisition module, an image preprocessing module, a drug counting model building module, a tuning module and a drug counting module;

[0065] The data acquisition module acquires drug images, drug location information and drug quantity, and sends the data to the image preprocessing module;

[0066] The image preprocessing module performs preprocessing by image decomposition, construction of local distortion adjustment factors, construction of global synergy factors, low-frequency transformation, high-frequency enhancement, image reorganization and image annotation, and sends the data to the drug counting model construction module;

[0067] The drug counting model building module builds the drug counting model by designing a feature transformation function, a feature extraction network, a feature fusion layer and a loss function, and sends the data to the tuning module;

[0068] The tuning module optimizes the model by tuning initialization, designing attenuation coefficient, designing exploration factor, designing evolution strategy and tuning search, and sends data to the drug counting module;

[0069] The drug counting module uses a drug counting model to count drugs.

[0070] Example 2, see Figure 1 and Figure 2 This embodiment is based on the above embodiment, and the image preprocessing module specifically includes the following contents:

[0071] Image decomposition, performing wavelet transform on the image to obtain image components, including low-frequency components and high-frequency components;

[0072] Construct the local distortion adjustment factor, which is expressed as follows:

[0073] ;

[0074] Among them, x and y represent the horizontal and vertical coordinate index of the image pixel respectively. Indicates at location The local distortion adjustment factor of the image pixel at , m and n represent the width and height of the local window respectively, i and j represent the abscissa index and ordinate index of the local window respectively, represents the distortion weight, Indicates taking the maximum value, Indicates at location The image pixel at Indicates The mean value of the pixels in the local window centered at .

[0075] Construct the global synergy factor, which is expressed as follows:

[0076] ;

[0077] in, Indicates at location The global co-factor of the image pixel at , where X and Y represent the width and height of the image, respectively, and Respectively represent the horizontal and vertical index of the image, represents the collaborative weight, Indicates at location The image pixel at represents the mean value of all pixels in the image, Represents the variance of all pixels in the image;

[0078] The low frequency transform is expressed as follows:

[0079] ;

[0080] in, Represents the low-frequency component after low-frequency transformation. represents the low-frequency component before low-frequency transformation, represents the transformation coefficient;

[0081] High frequency enhancement, expressed as follows:

[0082] ;

[0083] in, Represents the high-frequency component after high-frequency enhancement. Represents the high-frequency component before high-frequency enhancement. and represents the enhancement factor, and They represent the mean of the global coordination factor and the mean of the local distortion adjustment factor of all pixels in the image respectively;

[0084] Image reconstruction: performing inverse wavelet transform on the transformed and enhanced components to obtain a reconstructed drug image;

[0085] Image annotation, annotating drug images with drug location information and drug quantity.

[0086] By performing the above operations, in order to address the problems of poor image quality, inaccurate feature extraction and low counting efficiency in traditional drug counting methods, this scheme improves the local distortion and global consistency of the image by constructing local distortion adjustment factors, global synergy factors, low-frequency transformation, high-frequency enhancement and image reconstruction, thereby improving image quality, making image features more prominent and easier to extract, and improving counting efficiency.

[0087] Example 3, see Figure 1 and Figure 3 This embodiment is based on the above embodiment, and the drug counting model module is constructed, specifically including the following contents:

[0088] Design feature transformation function, expressed as follows:

[0089] ;

[0090] in, represents the input of the feature transformation function, represents the logarithm, e represents the natural constant, represents the feature transformation function;

[0091] Design the feature extraction network, which is expressed as follows:

[0092] ;

[0093] in, represents the output of the feature extraction network, p represents the index of the convolutional layer in the feature extraction network, Noc represents the total number of convolutional layers in the feature extraction network, represents the input image to the feature extraction network, and They represent the weight and bias of the pth convolutional layer in the feature extraction network, respectively. represents the convolution operation, represents element-by-element multiplication, represents the linear rectification function, q represents the index of the downsampling layer in the feature extraction network, Nos represents the total number of downsampling layers in the feature extraction network, and They represent the weight and bias of the qth downsampling layer in the feature extraction network, represents the downsampling operation;

[0094] Design the feature fusion layer, expressed as follows:

[0095] ;

[0096] in, represents the output of the feature fusion layer, and represents the feature fusion weight, represents the input of the feature fusion layer, represents the upsampling operation, Indicates taking the absolute value;

[0097] Construct the loss function, which is expressed as follows:

[0098] ;

[0099] in, represents the loss value of the drug counting model, Represents the intersection rate between the real drug target and the predicted drug target border, represents the loss weight, Indicates the actual quantity of drugs, Represents the predicted quantity of drugs.

[0100] By performing the above operations, this solution constructs a drug counting model by designing feature transformation functions, feature extraction networks, feature fusion layers and loss functions to address the problems of insufficient feature representation, single feature extraction network structure, poor feature fusion effect and unreasonable loss function design in traditional drug counting methods. It improves the model's ability to process complex images, enhances the model's sensitivity to subtle differences in images, and improves the accuracy of counting.

[0101] Example 4, see Figure 1 and Figure 4 This embodiment is based on the above embodiment, and the tuning module specifically includes the following contents:

[0102] Initialize tuning, determine the tuning parameter targets, including the weights and biases of the drug counting model, create a parameter search space, set the inverse of the model's loss value as the fitness of the parameter point, set the maximum number of parameter searches, and randomly generate initial parameter points in the parameter search space;

[0103] The design attenuation coefficient is expressed as follows:

[0104] ;

[0105] Where t represents the number of parameter searches. represents the attenuation coefficient during the t-th parameter search, and T represents the maximum number of parameter searches;

[0106] Design exploration factors, expressed as follows:

[0107] ;

[0108] in, represents the exploration factor during the t-th parameter search, represents a sine function, r1 represents a random number ranging from 0 to 1, represents pi;

[0109] Design an evolutionary strategy, expressed as follows:

[0110] ;

[0111] in, represents the parameter point obtained by the t+1th search, represents the parameter point obtained by the tth search, represents the fitness of the parameter point obtained by the tth search, It indicates the parameter point with the lowest fitness among all the searched parameter points before the tth parameter search. It represents the fitness of the parameter point with the lowest fitness among all the parameter points searched before the tth parameter search. It indicates the parameter point with the highest fitness among all the searched parameter points before the tth parameter search. It represents the fitness of the parameter point with the highest fitness among all the searched parameter points before the tth parameter search. r2 and r3 represent random numbers ranging from 0 to 1. Indicates the width of the parameter search space;

[0112] Tune the search, set the fitness limit value, use the evolution strategy to search for parameters, calculate the fitness of the searched parameter points at the end of each search, and when the fitness of a parameter point is greater than the fitness limit value, The parameters of are set as model parameters and the search ends; when , re-tune the search; otherwise, continue searching.

[0113] By performing the above operations, in order to solve the problems of low search efficiency and imprecise parameter adjustment in the traditional drug counting model tuning method, this solution optimizes the model by tuning initialization, designing attenuation coefficient, designing exploration factor, designing evolutionary strategy and tuning search, which increases the exploratory nature and diversity of the search process, making the tuning process more efficient, flexible and precise, and able to find the global optimal solution more quickly.

[0114] Example 5, see Figure 1This embodiment is based on the above embodiment. The drug counting module collects the image of the drug to be counted, inputs the image into the drug counting model, and the model outputs the number of drugs in the image.

[0115] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0116] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and variations can be made to the embodiments without departing from the principles and spirit of the invention.

[0117] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.

Claims

1. A drug counting system based on deep learning, characterized by: It includes data acquisition module, image preprocessing module, drug counting model building module, tuning module and drug counting module; The data acquisition module acquires drug images, drug location information, and drug quantity; The image preprocessing module performs preprocessing by image decomposition, construction of local distortion adjustment factors, construction of global synergy factors, low-frequency transformation, high-frequency enhancement, image reorganization and image annotation; The drug counting model module is constructed by designing a feature transformation function, a feature extraction network, a feature fusion layer and a loss function to construct a drug counting model; The tuning module optimizes the model by tuning initialization, designing attenuation coefficient, designing exploration factor, designing evolution strategy and tuning search; The drug counting module uses a drug counting model to count drugs.

2. A drug counting system based on deep learning according to claim 1, characterized in that: The image preprocessing module specifically includes the following contents: Image decomposition, performing wavelet transform on the image to obtain image components, including low-frequency components and high-frequency components; Construct the local distortion adjustment factor, which is expressed as follows: ; Among them, x and y represent the horizontal and vertical coordinate index of the image pixel respectively. Indicates at location The local distortion adjustment factor of the image pixel at , m and n represent the width and height of the local window respectively, i and j represent the abscissa index and ordinate index of the local window respectively, represents the distortion weight, Indicates taking the maximum value, Indicates at location The image pixel at Indicates The mean value of the pixels in the local window centered at . Construct the global synergy factor, which is expressed as follows: ; in, Indicates at location The global co-factor of the image pixel at , where X and Y represent the width and height of the image, respectively, and Respectively represent the horizontal and vertical index of the image, represents the collaborative weight, Indicates at location The image pixel at represents the mean value of all pixels in the image, Represents the variance of all pixels in the image; The low frequency transform is expressed as follows: ; in, Represents the low-frequency component after low-frequency transformation, represents the low-frequency component before low-frequency transformation, represents the transformation coefficient; High frequency enhancement, expressed as follows: ; in, Represents the high-frequency component after high-frequency enhancement. Represents the high-frequency component before high-frequency enhancement. and represents the enhancement factor, and They represent the mean of the global coordination factor and the mean of the local distortion adjustment factor of all pixels in the image respectively; Image reconstruction: performing inverse wavelet transform on the transformed and enhanced components to obtain a reconstructed drug image; Image annotation, annotating drug images with drug location information and drug quantity.

3. The drug counting system based on deep learning according to claim 1, characterized in that: The drug counting model module is constructed, specifically including the following contents: Design feature transformation function, expressed as follows: ; in, represents the input of the feature transformation function, represents the logarithm, e represents the natural constant, represents the feature transformation function; Design the feature extraction network, which is expressed as follows: ; in, represents the output of the feature extraction network, p represents the index of the convolutional layer in the feature extraction network, Noc represents the total number of convolutional layers in the feature extraction network, represents the input image to the feature extraction network, and They represent the weight and bias of the pth convolutional layer in the feature extraction network, respectively. represents the convolution operation, represents element-by-element multiplication, represents the linear rectification function, q represents the index of the downsampling layer in the feature extraction network, Nos represents the total number of downsampling layers in the feature extraction network, and They represent the weight and bias of the qth downsampling layer in the feature extraction network, represents the downsampling operation; Design the feature fusion layer, which is expressed as follows: ; in, represents the output of the feature fusion layer, and represents the feature fusion weight, represents the input of the feature fusion layer, represents the upsampling operation, Indicates taking the absolute value; Construct the loss function, which is expressed as follows: ; in, represents the loss value of the drug counting model, Represents the intersection rate between the real drug target and the predicted drug target border, represents the loss weight, Indicates the actual quantity of drugs, Represents the predicted quantity of drugs.

4. The drug counting system based on deep learning according to claim 1, characterized in that: The tuning module specifically includes the following contents: Initialize tuning, determine the tuning parameter targets, including the weights and biases of the drug counting model, create a parameter search space, set the inverse of the model's loss value as the fitness of the parameter point, set the maximum number of parameter searches, and randomly generate initial parameter points in the parameter search space; The design attenuation coefficient is expressed as follows: ; Where t represents the number of parameter searches. represents the attenuation coefficient during the t-th parameter search, and T represents the maximum number of parameter searches; Design exploration factors, expressed as follows: ; in, represents the exploration factor during the t-th parameter search, represents a sine function, r1 represents a random number ranging from 0 to 1, represents pi; Design an evolutionary strategy, expressed as follows: ; in, represents the parameter point obtained by the t+1th search, represents the parameter point obtained by the tth search, represents the fitness of the parameter point obtained by the tth search, It indicates the parameter point with the lowest fitness among all the searched parameter points before the tth parameter search. It represents the fitness of the parameter point with the lowest fitness among all the parameter points searched before the tth parameter search. It indicates the parameter point with the highest fitness among all the searched parameter points before the tth parameter search. It represents the fitness of the parameter point with the highest fitness among all the searched parameter points before the tth parameter search. r2 and r3 represent random numbers ranging from 0 to 1. Indicates the width of the parameter search space; Tune the search, set the fitness limit value, use the evolution strategy to search for parameters, calculate the fitness of the searched parameter points at the end of each search, and when the fitness of a parameter point is greater than the fitness limit value, The parameters of are set as model parameters and the search ends; when , re-tune the search; otherwise, continue searching.

5. The drug counting system based on deep learning according to claim 1, characterized in that: The drug counting module collects images of drugs to be counted, inputs the images into a drug counting model, and the model outputs the number of drugs in the image.

Citation Information

Cited By

  • Infusion bottle counting method and system based on deep learning

    CN121482021A