Mannitol injection crystallization detection method and device, electronic equipment and medium
By constructing the SRW-YOLOv8n model and combining the improved module and loss function, the accuracy and efficiency of the existing mannitol injection crystal detection method are solved, and high accuracy and high efficiency crystal detection are achieved, which promotes drug quality control.
Patent Information
- Application Number
- CN202411851597.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-08
AI Technical Summary
The existing crystallization detection methods for mannitol injections have problems such as insufficient accuracy, cumbersome operation and high cost, making it difficult to effectively detect tiny or small amounts of crystallization in mannitol injections.
The SRW-YOLOv8n model was used to combine the improved SPPF-LSKA module, RGCSPELAN lightweight module and Wise-MPDIoU^inner loss function to detect the crystallization of mannitol injection. This method realizes automated detection through the combination of image acquisition and preprocessing, model construction and detection modules.
It significantly improves the accuracy and efficiency of mannitol injection crystal detection, reduces the false detection rate, enhances the stability of the detection, and promotes drug quality control.
Smart Images

Figure CN119784703A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of crystallization detection, and in particular to a method, device, electronic equipment and medium for detecting crystallization of mannitol injection. Background Art
[0002] In the medical field, mannitol injection, as an osmotic diuretic and hypertonic dehydrating agent, has many important functions such as reducing intracranial pressure, intraocular pressure, and treating kidney disease and dehydration. Therefore, it is widely used in various clinical treatment scenarios. However, in actual applications, mannitol injection sometimes crystallizes during production, storage, and use. These crystals may affect the stability and efficacy of the drug and may even have adverse effects on patients.
[0003] Domestic and foreign scholars have conducted a lot of research on the crystallization problem of mannitol injection. For example, a study used high-performance liquid chromatography to examine the relevant substances in mannitol and mannitol injection, and found that mannitol and mannitol injection showed good chemical stability, and no degradation products were produced during the storage process after sterilization. In addition, there are studies that use different detection methods, such as direct observation, heating dissolution test, microscopic observation, and physical and chemical property detection, to check whether there is crystallization in mannitol injection. These methods have their own advantages and disadvantages, but they all provide strong support for the quality control of mannitol injection to a certain extent.
[0004] Although there are many detection methods available for crystallization inspection of mannitol injection, the existing detection methods still have some shortcomings. For example, although the direct observation method is simple and easy, it may be difficult to accurately judge the situation of tiny crystals or small amounts of crystals; although the heating dissolution test can dissolve the crystals and restore the transparency of the liquid, it cannot further analyze the composition and properties of the crystals; although microscopic observation can observe tiny crystals, the operation is relatively cumbersome and requires professional judgment; although the physical and chemical property test can provide more accurate results, the detection process is complicated and the cost is high.
[0005] Therefore, a new method for detecting crystallization of mannitol injection is urgently needed to solve the above problems. Summary of the invention
[0006] The purpose of the present invention is to provide a method, device, electronic equipment and medium for detecting crystallization of mannitol injection, which can effectively improve the detection accuracy of injection crystallization and significantly reduce the false detection rate in the target detection process.
[0007] To achieve the above object, the present invention provides a method for detecting crystallization of mannitol injection, comprising the following steps:
[0008] Step S1, collecting and preprocessing the mannitol injection crystallization image, and constructing the preprocessed mannitol injection crystallization data set;
[0009] Step S2, constructing the SRW-YOLOv8n model;
[0010] Step S21, constructing an improved SPPF-LSKA module;
[0011] Step S22, constructing a RGCSPELAN lightweight module;
[0012] Step S23, constructing Wise-MPDIoU^inner loss function;
[0013] Step S3, inputting the pre-processed mannitol injection crystallization data set into the constructed SRW-YOLOv8n model to perform crystallization detection;
[0014] Step S4: output the crystallization detection result.
[0015] Preferably, in step S21, an improved SPPF-LSKA module is constructed, and the specific operation is: using the LSKA attention mechanism to replace the SPPF module in the YOLOv8n model.
[0016] Preferably, the SPPF-LSKA module includes a first convolutional layer, a first pooling layer MaxPool2d, a second pooling layer MaxPool2d, a third pooling layer MaxPool2d, a first splicing module, a LSKA module and a second convolutional layer connected in sequence.
[0017] Preferably, in step S22, the RGCSPELAN lightweight module includes a third convolutional layer, a splitting module, a re-parameterization module RepConv, several fourth convolutional layers, a fifth convolutional layer, a second splicing module and a sixth convolutional layer connected in sequence.
[0018] Preferably, in step S23, a Wise-MPDIoU^inner loss function is constructed, and the specific operation is:
[0019] Use the IoU^inner loss function to replace the IoU in MPDIoU and construct the MPDIoU^inner loss function;
[0020] Use the MPDIoU^inner loss function to replace the IoU in Wise-IoU v3 and construct the Wise-MPDIoU^inner loss function.
[0021] Preferably, the IoU^inner loss function is as follows:
[0022]
[0023] in, represents the center point of the ground-truth bounding box; is the horizontal coordinate of the center point of the real bounding box, is the ordinate of the center point of the real bounding box, (x c ,y c ) represents the center point of the anchor box, x c is the horizontal coordinate of the center point of the anchor box, y c is the vertical coordinate of the center point of the anchor box; w gt 、h gt are the width and height of the real bounding box respectively; w and h are the width and height of the anchor box respectively; ratio∈[0.5,1.5] is the scaling factor ratio; The horizontal coordinate of the left boundary of the auxiliary bounding box; The horizontal coordinate of the right boundary of the auxiliary bounding box; The ordinate of the lower boundary of the auxiliary bounding box; b is the ordinate of the upper boundary of the auxiliary bounding box; l b is the horizontal coordinate of the left boundary of the auxiliary anchor box; r b is the horizontal coordinate of the left boundary of the auxiliary anchor box; t is the ordinate of the lower boundary of the auxiliary anchor box; b b The ordinate of the upper boundary of the auxiliary anchor box.
[0024] Preferably, the value of ratio is 1.4.
[0025] The present invention also provides a mannitol injection crystallization detection device, comprising:
[0026] An image acquisition and preprocessing module is used to acquire crystallization images of mannitol injection, preprocess the crystallization images, and construct a preprocessed mannitol injection crystallization data set;
[0027] Model building module, used to build the SRW-YOLOv8n model, the SRW-YOLOv8n model includes:
[0028] Improved SPPF-LSKA module building unit, used to replace the SPPF module in the YOLOv8n model with the LSKA attention mechanism to form an improved SPPF-LSKA module;
[0029] An RGCSPELAN lightweight module building unit, used to build an RGCSPELAN lightweight module including a convolutional layer, a splitting module, a re-parameterization module RepConv, multiple fourth convolutional layers, a second splicing module and a fifth convolutional layer;
[0030] A Wise-MPDIoU^inner loss function construction unit, used to construct a Wise-MPDIoU^inner loss function by replacing the IoU in MPDIoU with the IoU^inner loss function and further replacing the IoU in Wise-IoU v3;
[0031] The detection module is used to input the preprocessed mannitol injection crystallization data set into the constructed SRW-YOLOv8n model for crystallization detection;
[0032] The result output module is used to output the crystallization detection results.
[0033] A computer device comprises: a memory and a processor; the memory stores a computer program, and the processor implements the steps of the above-mentioned mannitol injection crystallization detection method when executing the computer program.
[0034] A computer-readable storage medium stores a computer program, which implements the steps of the above-mentioned mannitol injection crystallization detection method when executed by a processor.
[0035] Therefore, the present invention adopts the above-mentioned mannitol injection crystallization detection method, device, electronic equipment and medium, and the beneficial technical effects are as follows:
[0036] (1) Improve detection accuracy.
[0037] By building the SRW-YOLOv8n model and introducing the improved SPPF-LSKA module, RGCSPELAN lightweight module and Wise-MPDIoU^inner loss function, the accuracy of crystallization detection is significantly improved;
[0038] In addition, the crystallization images of mannitol injection were preprocessed to construct a high-quality dataset, providing strong support for model training.
[0039] (2) Improve detection efficiency.
[0040] The RGCSPELAN lightweight module realizes the lightweight model based on the enhanced feature extraction and gradient flow capabilities, making the detection process more efficient and reducing the consumption of computing resources;
[0041] The entire detection method is automated, from image acquisition to result output, without the need for human intervention, thus improving detection speed.
[0042] (3) Enhance detection stability.
[0043] By improving the SPPF module to the SPPF-LSKA module, the multi-scale feature aggregation capability of the model is enhanced, thereby enhancing the model's ability to process complex images and improving the stability of detection;
[0044] The construction of the Wise-MPDIoU^inner loss function further optimizes the training effect and detection performance, reducing false detections and missed detections.
[0045] (4) Promote drug quality control:
[0046] The method proposed in the present invention can monitor the crystallization situation in mannitol injection in real time, and helps to improve the safety and effectiveness of mannitol injection by timely discovering and handling crystallization problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A flow chart of a method for detecting crystallization of mannitol injection according to the present invention;
[0048] Figure 2 It is a schematic diagram of the structure of the SPPF module and the SPPF-LSKA module; Figure 2 (a) is the SPPF module; Figure 2 (b) is the SPPF-LSKA module;
[0049] Figure 3 It is a schematic diagram of the structure of the RGCSPELAN lightweight module;
[0050] Figure 4 The loss curve is obtained by comparing the bounding box loss values under different scale factor ratios. DETAILED DESCRIPTION
[0051] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.
[0052] Unless otherwise defined, technical or scientific terms used in the present invention shall have the common meanings understood by one having ordinary skills in the field to which the present invention belongs.
[0053] Embodiment 1
[0054] like Figure 1 As shown, a method for detecting crystallization of mannitol injection according to the present invention specifically comprises the following steps:
[0055] Step S1, collecting and preprocessing the mannitol injection crystallization image, and constructing a preprocessed mannitol injection crystallization data set; the preprocessing operation is well known to those skilled in the art and will not be described in detail here.
[0056] Step S2, constructing the SRW-YOLOv8n model;
[0057] Step S21, constructing an improved SPPF-LSKA module;
[0058] Build an improved SPPF-LSKA module. The specific operation is to use the LSKA attention mechanism to replace the SPPF module in the YOLOv8n model.
[0059] The LSKA attention mechanism can guide the model to focus more accurately on the key features of crystallization in mannitol injection. The improved SPPF-LSKA module further enhances the feature fusion effect and effectively improves the overall performance of the model.
[0060] The schematic diagram of the improved SPPF-LSKA module structure is as follows: Figure 2 The SPPF-LSKA module includes a first convolutional layer, a first pooling layer MaxPool2d, a second pooling layer MaxPool2d, a third pooling layer MaxPool2d, a first splicing module, a LSKA module, and a second convolutional layer connected in sequence.
[0061] like Figure 2 As shown in the figure, first, the input information is processed by the first convolutional layer (Conv), and then downsampled by the first pooling layer MaxPool2d, the second pooling layer MaxPool2d, and the third pooling layer MaxPool2d, and finally input into the first concatenation module (Concat). Then, the feature map processed by the first convolutional layer and each pooling layer is also passed to the first concatenation module. In the first concatenation module, feature maps from different paths are fused together to form a richer feature representation, which is then input into the LSKA module. The LSKA module extracts features through a larger receptive field to help the model better understand the data. Finally, after further processing by the second convolutional layer (Conv), the final output is obtained.
[0062] The improved SPPF-LSKA module greatly improves the model's ability to aggregate features at multiple scales.
[0063] Step S22, constructing a RGCSPELAN lightweight module;
[0064] The present invention designs a RGC SPELAN lightweight module by combining the design concepts of the GhostNet network and the ELAN structure as well as the heavy parameterization concept.
[0065] The GhostNet network is a lightweight neural network architecture. The network uses cheap operations to significantly reduce the network computing cost, while reducing a large number of parameters and improving the generalization ability of the model. The ELAN structure is similar to the C3 module and the C2f module in design concept. All three use feature fusion to enrich feature representation, and they all use a multi-branch structure to capture feature information. The re-parameterization idea can achieve higher computing efficiency and faster reasoning speed. In the model training phase, this idea uses multiple branches to train to improve the accuracy of the model. In the reasoning phase, through structural re-parameterization, the multi-branch structure during training is equivalently converted to a single-branch structure to speed up the inference speed and reduce model complexity and computational cost.
[0066] The RGCSPELAN lightweight module draws on the design ideas of the structure in the GhostNet network and the ELAN structure. In addition, the BottleNeck commonly used in YOLOv8n is abandoned. In order to make up for the performance loss caused by abandoning the residual block, the reparameterization module RepConv is used on the gradient flow branch to enhance the ability of feature extraction and gradient flow, and reparameterization is performed during reasoning to speed up reasoning and reduce model complexity.
[0067] Schematic diagram of RGCSPELAN lightweight module structure Figure 3 As shown, it includes a third convolutional layer, a splitting module, a re-parameterization module RepConv, several fourth convolutional layers, a fifth convolutional layer, a second splicing module and a sixth convolutional layer connected in sequence.
[0068] like Figure 3 As shown in the figure, the initial feature map is divided into two branches after being processed by the third convolutional layer and the split module (Split module). The first branch continues to extract multi-level features, and after being processed by the re-parameterization module RepConv, several 3×3 convolutional layers (the fourth convolutional layer) and a 1×1 convolutional layer (the fifth convolutional layer), it is finally input to the second concatenation module (Concat). In addition, the feature maps processed by the re-parameterization module RepConv and multiple 3×3 convolutional layers are also input to the second concatenation module respectively; the second branch is directly passed to the back to be concatenated with the features after multi-level processing, and then output after being operated by the 1×1 convolutional layer (the sixth convolutional layer).
[0069] Step S23, constructing Wise-MPDIoU^inner loss function;
[0070] The IoU^inner loss function calculates the loss by introducing the scale factor ratio to control the generation of auxiliary borders of different scales, and can adjust itself well according to different detection tasks. The specific calculation formula is as follows:
[0071]
[0072] in, represents the center point of the ground-truth bounding box; is the horizontal coordinate of the center point of the real bounding box, is the ordinate of the center point of the real bounding box, (x c ,y c ) represents the center point of the anchor box, x c is the horizontal coordinate of the center point of the anchor box, y c is the vertical coordinate of the center point of the anchor box; w gt 、h gt are the width and height of the real bounding box respectively; w and h are the width and height of the anchor box respectively; ratio∈[0.5,1.5] is the scaling factor ratio; The horizontal coordinate of the left boundary of the auxiliary bounding box; The horizontal coordinate of the right boundary of the auxiliary bounding box; The ordinate of the lower boundary of the auxiliary bounding box; b is the ordinate of the upper boundary of the auxiliary bounding box; l b is the horizontal coordinate of the left boundary of the auxiliary anchor box; r b is the horizontal coordinate of the left boundary of the auxiliary anchor box; t is the ordinate of the lower boundary of the auxiliary anchor box; b b is the ordinate of the upper boundary of the auxiliary anchor box. inter is the intersection area between the auxiliary anchor box and the auxiliary bounding box.
[0073] From formula (1) and formula (2), we can know the corner vertices of the true bounding box and the anchor box, and calculate the overlapping area between the anchor box and the true bounding box.
[0074] ratio∈[0.5,1.5], when ratio<1, the area of the auxiliary bounding box is smaller than the actual bounding box area, and its effective range of regression is smaller than the effective range of IoU loss, but its absolute value of gradient is larger than the gradient of IoU loss, so it can accelerate the convergence of high IoU samples. On the contrary, when ratio>1, the auxiliary bounding box helps the regression of low IoU.
[0075] MPDIoU is a new IoU measurement method for bounding box similarity based on the minimum point distance, and it can also take into account factors such as overlap, non-overlapping areas, and center point distance. Replacing IoU in MPDIoU with IoU^inner can transform it into MPDIoU^inner loss function.
[0076] Wise-IoU v3 is a loss function with a dynamic focusing mechanism. Based on Wise-IoU v1, it uses "outlier" to describe the quality of the anchor box. The definition of outlier is as follows, where is the normalization factor:
[0077]
[0078] in, is the monotonic focusing coefficient.
[0079] The non-monotonic focusing coefficient k is constructed using the outlier degree β, and then the bounding box loss Wise-IoU v3 is obtained. Finally, the Wise-MPDIoU^inner loss function can be constructed by replacing the IoU in Wise-IoU v3 with MPDIoU^inner to improve the training effect and detection performance of the model.
[0080] Step S3, inputting the pre-processed mannitol injection crystallization data set into the constructed SRW-YOLOv8n model to perform crystallization detection;
[0081] Step S4: output the crystallization detection result.
[0082] The present invention will be further described below through specific experiments.
[0083] Comparative experiment of different scaling factors.
[0084] In order to select a suitable auxiliary bounding box to improve the generalization ability of the model, the scale factor ratio is selected with a step size of 0.2 for experimental comparison.
[0085] Table 1 Proportional factor ratio comparison experiment
[0086] Scale Factor Ratio Accuracy / % mAP@0.5 / % FPS 0.6 95.1 95.9 70.9 0.8 96.0 96.1 86.2 1.0 95.8 96.3 84.2 1.2 95.1 96.4 80.6 1.4 96.0 96.5 91.7 1.6 95.5 96..3 84.6
[0087] The comparison of experimental results of different scale factor ratios is shown in Table 1. When the scale factor ratio is 0.6, the accuracy, mAP@0.5 and inference speed FPS are the lowest; when the scale factor ratio is 1.4, the model has the best improvement effect, with an accuracy of 96.0%, mAP@0.5 of 96.5%, and inference speed FPS of 91.7 frames per second, which is 29.3% higher than the lowest 70.9 frames per second. In addition, the loss curve is obtained by comparing the bounding box loss values under different scale factor ratios, as shown in Figure 1. Figure 4 As shown in the figure, the loss function with a ratio factor ratio of 1.4 performs best, which can take into account both the detection rate and accuracy of the model.
[0088] Comparative experiment.
[0089] To verify the effectiveness of the algorithm, it is compared with other mainstream target detection algorithms. The experimental results are shown in Table 2.
[0090] Table 2 Comparative experiment
[0091] Model mAP@0.5 / % Parameter quantity / M Calculation amount / G FPS Tood 95.0 32.02 123.0 25.9 Faster-RCNN 95.6 41.36 134.0 32.5 Cascade-RCNN 95.8 69.20 162.0 25.6 YOLOv5s 96.3 7.10 16.5 78.1 YOLOv7-tiny 96.8 6.00 13.2 87.2 YOLOv8s 96.9 11.10 28.4 64.9 YOLOv9-S 96.8 9.60 38.7 68.5 YOLOv8n 96.5 3.00 8.1 80.0 SRW-YOLOv8n 96.7 2.67 6.8 106.4
[0092] As shown in Table 2, the mAP@0.5 of the YOLOv8n model is not much different from other mainstream target detection algorithms, but the number of parameters and the amount of calculation are less than other algorithms. In terms of inference speed, it is only inferior to YOLOv7-tiny, so YOLOv8n is selected as the baseline model. Compared with the baseline model YOLOv8n, the mAP@0.5 of the SRW-YOLOv8n model increased by 0.2%, the number of parameters decreased by 11.0%, the amount of calculation decreased by 16.0%, and the inference speed increased by 33.0%. Compared with the two-stage models Faster-RCNN and Cascade-RCNN, the mAP@0.5 value of the SRW-YOLOv8n model increased by 1.1% and 0.9%, and the inference speed increased by 2.3 times and 3.2 times. At the same time, the number of parameters and the amount of calculation are much smaller than the two-stage algorithm. Compared with the one-stage algorithm Tood, the mAP@0.5 value of the SRW-YOLOv8n model increased by 1.7%, and the inference speed increased by 3.1 times. That is, the lightweight model SRW-YOLOv8n proposed in the present invention can better complete the task of detecting crystallization.
[0093] Embodiment 2
[0094] The present invention also provides a mannitol injection crystallization detection device, comprising:
[0095] An image acquisition and preprocessing module is used to acquire crystallization images of mannitol injection, preprocess the crystallization images, and construct a preprocessed mannitol injection crystallization data set;
[0096] Model building module, used to build the SRW-YOLOv8n model, the SRW-YOLOv8n model includes:
[0097] Improved SPPF-LSKA module building unit, used to replace the SPPF module in the YOLOv8n model with the LSKA attention mechanism to form an improved SPPF-LSKA module;
[0098] An RGCSPELAN lightweight module building unit, used to build an RGCSPELAN lightweight module including a convolutional layer, a splitting module, a re-parameterization module RepConv, multiple fourth convolutional layers, a second splicing module and a fifth convolutional layer;
[0099] A Wise-MPDIoU^inner loss function construction unit, used to construct a Wise-MPDIoU^inner loss function by replacing the IoU in MPDIoU with the IoU^inner loss function and further replacing the IoU in Wise-IoU v3;
[0100] The detection module is used to input the preprocessed mannitol injection crystallization data set into the constructed SRW-YOLOv8n model for crystallization detection;
[0101] The result output module is used to output the crystallization detection results.
[0102] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0103] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0104] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0105] It is worth noting that the contents not elaborated in detail in the present invention are all prior art and are well known to those skilled in the art.
[0106] Therefore, the present invention adopts the above-mentioned mannitol injection crystallization detection method, device, electronic equipment and medium, which can effectively improve the detection accuracy of injection crystallization and significantly reduce the false detection rate in the target detection process.
[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A method for detecting crystallization of mannitol injection, characterized in that: The following steps are involved: Step S1, collecting and preprocessing the mannitol injection crystallization image, and constructing the preprocessed mannitol injection crystallization data set; Step S2, constructing the SRW-YOLOv8n model; Step S21, constructing an improved SPPF-LSKA module; Step S22, constructing a RGCSPELAN lightweight module; Step S23, constructing Wise-MPDIoU^inner loss function; Step S3, inputting the pre-processed mannitol injection crystallization data set into the constructed SRW-YOLOv8n model to perform crystallization detection; Step S4: output the crystallization detection result.
2. A method for detecting crystallization of mannitol injection according to claim 1, characterized in that: In step S21, an improved SPPF-LSKA module is constructed. The specific operation is: using the LSKA attention mechanism to replace the SPPF module in the YOLOv8n model.
3. A method for detecting crystallization of mannitol injection according to claim 2, characterized in that: The SPPF-LSKA module includes a first convolutional layer, a first pooling layer MaxPool2d, a second pooling layer MaxPool2d, a third pooling layer MaxPool2d, a first splicing module, a LSKA module and a second convolutional layer, which are connected in sequence.
4. A method for detecting crystallization of mannitol injection according to claim 3, characterized in that: In step S22, the RGCSPELAN lightweight module includes a third convolutional layer, a splitting module, a re-parameterization module RepConv, several fourth convolutional layers, a fifth convolutional layer, a second splicing module and a sixth convolutional layer connected in sequence.
5. A method for detecting crystallization of mannitol injection according to claim 4, characterized in that: In step S23, the Wise-MPDIoU^inner loss function is constructed, and the specific operation is: Use the IoU^inner loss function to replace the IoU in MPDIoU and construct the MPDIoU^inner loss function; Use the MPDIoU^inner loss function to replace the IoU in Wise-IoU v3 and construct the Wise-MPDIoU^inner loss function.
6. A method for detecting crystallization of mannitol injection according to claim 5, characterized in that: The IoU^inner loss function is as follows: in, represents the center point of the ground-truth bounding box; is the horizontal coordinate of the center point of the real bounding box, is the ordinate of the center point of the real bounding box, (x c ,y c ) represents the center point of the anchor box, x c is the horizontal coordinate of the center point of the anchor box, y c is the vertical coordinate of the center point of the anchor box; w gt 、h gt are the width and height of the real bounding box respectively; w and h are the width and height of the anchor box respectively; ratio∈[0.5,1.5] is the scaling factor ratio; The horizontal coordinate of the left boundary of the auxiliary bounding box; The horizontal coordinate of the right boundary of the auxiliary bounding box; The ordinate of the lower boundary of the auxiliary bounding box; b is the ordinate of the upper boundary of the auxiliary bounding box; l b is the horizontal coordinate of the left boundary of the auxiliary anchor box; r b is the horizontal coordinate of the left boundary of the auxiliary anchor box; t is the ordinate of the lower boundary of the auxiliary anchor box; b b The ordinate of the upper boundary of the auxiliary anchor box.
7. A method for detecting crystallization of mannitol injection according to claim 6, characterized in that: The value of ratio is 1.
4.
8. A mannitol injection crystallization detection device, characterized in that: include: An image acquisition and preprocessing module is used to acquire crystallization images of mannitol injection, preprocess the crystallization images, and construct a preprocessed mannitol injection crystallization data set; Model building module, used to build the SRW-YOLOv8n model, the SRW-YOLOv8n model includes: Improved SPPF-LSKA module building unit, used to replace the SPPF module in the YOLOv8n model with the LSKA attention mechanism to form an improved SPPF-LSKA module; The RGCSPELAN lightweight module building unit is used to build the RGCSPELAN lightweight module including a convolution layer, a splitting module, a re-parameterization module RepConv, several fourth convolution layers, a second splicing module and a fifth convolution layer; A Wise-MPDIoU^inner loss function construction unit, used to construct a Wise-MPDIoU^inner loss function by replacing the IoU in MPDIoU with the IoU^inner loss function and further replacing the IoU in Wise-IoU v3; The detection module is used to input the preprocessed mannitol injection crystallization data set into the constructed SRW-YOLOv8n model for crystallization detection; The result output module is used to output the crystallization detection results.
9. A computer device comprising: Memory and processor; The memory stores a computer program, characterized in that when the processor executes the computer program, the steps of the mannitol injection crystallization detection method described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the mannitol injection crystallization detection method described in any one of claims 1 to 7 are implemented.