Particle counting device and particle counting method
Patent Information
- Application Number
- CN202510225457.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2026-08-28
AI Technical Summary
[0003]针对上述的缺陷或不足,本发明提供了一种颗粒计数装置及颗粒计数方法,旨在解决人工计数准确性和效率较低的技术问题
[0033] In the technical solution of this invention, the counting chamber is used to stabilize and control the image acquisition environment, isolate external environmental interference factors, and ensure the quality of the acquired images, thereby maintaining high counting accuracy under various complex conditions. The light source is located on the lower side of the light-transmitting tray, and the image acquisition module is located on the upper side of the light-transmitting tray. The light emitted by the light source can pass through the light-transmitting tray and illuminate the particles on it, making the particles more visible and enabling the image acquisition module to acquire clear particle images.
Smart Images

Figure CN122651575A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of agricultural automation technology, specifically relating to a particle counting device and a particle counting method. Background Technology
[0002] Currently, with the development of agricultural modernization, the application of intelligent equipment in agricultural production is gradually increasing, especially in crop yield monitoring and evaluation. Agricultural crops such as rice and wheat are granular, and traditional methods of counting grains in agricultural crops mostly rely on manual visual inspection and counting, which is not only time-consuming and labor-intensive but also has low accuracy and efficiency, failing to meet the needs of modern agriculture for precision management and data analysis. Summary of the Invention
[0003] In view of the above-mentioned defects or deficiencies, the present invention provides a particle counting device and a particle counting method, aiming to solve the technical problems of low accuracy and efficiency of manual counting.
[0004] To achieve the above objectives, the present invention provides a particle counting device, comprising a counting chamber, a light-transmitting tray, a light source, an image acquisition module, and a controller. The light-transmitting tray is disposed on the counting chamber and can move between a loading station and a counting station, wherein the counting station is located within the counting chamber. The light source is disposed within the counting chamber and located below the light-transmitting tray. The image acquisition module is disposed within the counting chamber and located above the light-transmitting tray, and is used to capture images of the particles on the light-transmitting tray. The controller is communicatively connected to the image acquisition module and configured to acquire particle images captured by the image acquisition module and count the particles based on the particle images.
[0005] In this embodiment of the invention, acquiring particle images captured by the image acquisition module and counting particles based on the particle images includes:
[0006] Acquire particle images captured by the image acquisition module;
[0007] The particle images are input into a detection model built on deep learning to output the number of particles. The detection model built on deep learning uses the YOLO model.
[0008] In this embodiment of the invention, the training method for the detection model based on deep learning includes:
[0009] Collect particle images and divide the collected particle images into training set and validation set;
[0010] The particle images in the training set are input into a detection model based on deep learning for training to obtain solid particle groups, empty particle groups, broken particle groups and impurity groups.
[0011] The particle images in the validation set are input into the detection model built on deep learning for validation. If the validation fails, particle images are collected again and input into the training set for training. Then, the process returns to input the particle images in the validation set into the detection model built on deep learning for validation, until the validation passes.
[0012] In this embodiment of the invention, particle images from the training set are input into a detection model built based on deep learning for training, to obtain solid particle groups, empty particle groups, broken particle groups, and impurity groups, including:
[0013] The YOLO model was used to extract features from each particle in the particle image;
[0014] The YOLO model is used to compare the outline of each particle with the outline of a preset particle.
[0015] If the similarity between the outline of the particle and the outline of a preset particle is greater than or equal to the preset similarity, then the particle is determined to belong to the preset particle group, which includes solid particle group, empty particle group, and broken particle group; otherwise, the particle is determined to belong to the impurity group.
[0016] In this embodiment of the invention, if the similarity between the outline of the particle and the outline of a preset particle is greater than a preset similarity, then after determining that the particle belongs to a preset particle group, the process further includes:
[0017] The YOLO model is used to divide the pixels of each particle in the preset particle group into dark pixels and bright pixels, and the number of dark pixels and bright pixels of each particle in the preset particle group is calculated.
[0018] If the number of dark pixels in a particle accounts for a proportion greater than or equal to a preset proportion of all pixels in the particle, then the particle is determined to belong to a valid particle group, which includes solid particle groups and broken particle groups; otherwise, the particle is determined to belong to an empty particle group.
[0019] In this embodiment of the invention, if the proportion of dark pixels in a particle to all pixels in the particle is greater than or equal to a preset proportion, then after determining that the particle belongs to a valid particle group, the process further includes:
[0020] The aspect ratio of each particle in the effective particle swarm is compared with the preset aspect ratio range using the YOLO model.
[0021] If the aspect ratio of the particle is outside the preset aspect ratio range, the particle is determined to belong to the broken particle group; otherwise, the particle is determined to belong to the solid particle group.
[0022] In this embodiment of the invention, the particle counting device further includes a slide rail connected to the counting chamber; the light-transmitting tray includes a bottom plate and a side plate connected to the edge of the bottom plate, the bottom plate and the side plate forming a receiving groove for receiving particles; the side plate is slidably connected to the slide rail.
[0023] In this embodiment of the invention, the controller is mounted on a Raspberry Pi 4B board and is electrically connected to the image acquisition module via a USB interface.
[0024] In addition, the present invention also provides a particle counting method, the particle counting method comprising:
[0025] Control the light-transmitting tray to move to the loading station for granule loading;
[0026] Control the light-transmitting tray to move from the loading station to the counting station;
[0027] The image acquisition module is controlled to capture images of particles on the light-transmitting tray when the light source is turned on.
[0028] The particle images captured by the image acquisition module are obtained, and particle counts are performed based on the particle images.
[0029] In this embodiment of the invention, acquiring particle images captured by the image acquisition module and counting particles based on the particle images includes:
[0030] Acquire particle images captured by the image acquisition module;
[0031] The particle images are input into a detection model built on deep learning to output the number of particles. The detection model built on deep learning uses the YOLO model.
[0032] Through the above technical solutions, the particle counting device provided in the embodiments of the present invention has the following beneficial effects:
[0033] In the technical solution of this invention, the counting chamber is used to stabilize and control the image acquisition environment, isolate external environmental interference factors, and ensure the quality of the acquired images, thereby maintaining high counting accuracy under various complex conditions. The light source is located on the lower side of the light-transmitting tray, and the image acquisition module is located on the upper side of the light-transmitting tray. The light emitted by the light source can pass through the light-transmitting tray and illuminate the particles on it, making the particles more visible and enabling the image acquisition module to acquire clear particle images.
[0034] The controller communicates with the image acquisition module, allowing the particle images captured by the module to be transmitted to the controller. By configuring the controller and image acquisition module to work together, the particle counts based on the images captured by the module is improved, increasing the accuracy of the counting results and significantly accelerating the particle counting speed. Compared to traditional manual counting methods, this reduces human error and greatly improves work efficiency.
[0035] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0036] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. Those skilled in the art can obtain other drawings based on the structures shown in these drawings without any inventive effort. In the drawings:
[0037] Figure 1 This is a schematic diagram of the structure of a particle counting device according to an embodiment of the present invention;
[0038] Figure 2 This is a perspective structural schematic diagram of a particle counting device according to an embodiment of the present invention;
[0039] Figure 3 This is a schematic diagram of the structure of a light-transmitting tray located at the feeding station in a particle counting device according to an embodiment of the present invention;
[0040] Figure 4 This is a schematic diagram of the steps of a training method for a detection model based on deep learning in a particle counting device according to an embodiment of the present invention.
[0041] Figure 5 This is a detailed schematic diagram of step S2 in the training method of the detection model based on deep learning in a particle counting device according to an embodiment of the present invention.
[0042] Explanation of reference numerals in the attached figures
[0043] 100 Particle counting device; 30 Light source components
[0044] 10 Counting chamber 31 Second adjustment knob
[0045] 20 Light-transmitting trays; 40 Image acquisition modules
[0046] 21 Base plate 41 First adjustment knob
[0047] 22 Side panel 50 Slide rail
[0048] 23 Receiving slots 60 Display screen Detailed Implementation
[0049] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0050] The particle counting device and particle counting method of the present invention are described below with reference to the accompanying drawings.
[0051] like Figures 1 to 3 As shown, it is understandable that Figures 1 to 3 The dashed part represents the obscured component. The arrowed leader line indicates spatial structures such as holes, slots, and cavities, while the leader line without an arrow indicates the solid structure. Figure 1 This is a schematic diagram of the structure of a particle counting device 100 according to an embodiment of the present invention. Figure 2 This is a perspective structural schematic diagram of a particle counting device 100 according to an embodiment of the present invention. Figure 3 This is a schematic diagram of the structure of the light-transmitting tray 20 in the particle counting device 100 according to an embodiment of the present invention, located at the feeding station.
[0052] This invention provides a particle counting device 100, which includes a counting chamber 10, a light-transmitting tray 20, a light source 30, an image acquisition module 40, and a controller. The light-transmitting tray 20 is disposed on the counting chamber 10 and can move between a loading station and a counting station, which are distributed along the front-to-back direction. The counting station is located inside the counting chamber 10. In other words, the light-transmitting tray 20 can move along the front-to-back direction.
[0053] The light source 30 is located inside the counting chamber 10 and below the light-transmitting tray 20. The image acquisition module 40 is located inside the counting chamber 10 and above the light-transmitting tray 20. The image acquisition module 40 is used to capture images of the particles on the light-transmitting tray 20. The controller is communicatively connected to the image acquisition module 40 and configured to acquire particle images captured by the image acquisition module 40 and count the particles based on the particle images.
[0054] The counting chamber 10 is used to stabilize and control the image acquisition environment, isolate external environmental interference factors, and ensure the quality of the acquired images to maintain high counting accuracy under various complex conditions. The light source 30 is located on the lower side of the light-transmitting tray 20, and the image acquisition module 40 is located on the upper side of the light-transmitting tray 20. The light emitted by the light source 30 can pass through the light-transmitting tray 20 and illuminate the particles on the light-transmitting tray 20, making the particles on the light-transmitting tray 20 more obvious, so that the image acquisition module 40 can acquire clear particle images.
[0055] The controller is communicatively connected to the image acquisition module 40, and the particle images acquired by the image acquisition module 40 can be transmitted to the controller. The controller and the image acquisition module 40 can also communicate wirelessly, such as via Bluetooth or infrared.
[0056] The controller can detect, classify, and count particles in particle images, eliminating impurities such as stalks and leaves, improving the accuracy of counting results, and significantly increasing the speed of particle counting. Compared with traditional manual counting methods, it reduces human error and greatly improves work efficiency.
[0057] Specifically, the image acquisition module 40 may include a high-definition camera (e.g., a Raspberry Pi Camera Module) to capture images of the particles. The parameters of the image acquisition module 40, such as exposure time, aperture, and ISO, need to be adjusted according to the light source intensity and the characteristics of the crop particles to obtain optimal image quality.
[0058] The particle counting device 100 may also include a first adjustment knob 41, which can adjust the focal length of the image acquisition module 40 so that the image acquisition module 40 can capture clear particle images. By setting the first adjustment knob 41, the flexibility of the image acquisition module 40 is improved.
[0059] The light source 30 can be a ring light source, providing uniform illumination and avoiding image quality problems caused by variations in light. The spectral characteristics of the light source 30 need to take into account the transmittance and reflectance of the crop particles. The intensity and illumination angle of the light source need to be optimized to minimize shadows and obtain clear images. Uniform illumination by the light source 30 is crucial to avoid local overexposure or underexposure affecting image analysis results.
[0060] The particle counting device 100 may also include a second adjustment knob 31, which can adjust the brightness of the light source 30 so that the image acquisition module 40 can capture clear particle images. By setting the second adjustment knob 31, the use of the light source 30 becomes more flexible and convenient.
[0061] In this embodiment of the invention, acquiring particle images captured by the image acquisition module 40 and counting particles based on the particle images includes: acquiring particle images captured by the image acquisition module 40; inputting the particle images into a detection model based on deep learning to output the number of particles, wherein the detection model based on deep learning uses Backbone's YOLO model.
[0062] YOLO (You Only Look Once) is a real-time object detection algorithm that divides the entire image into a grid and performs object detection within each grid. In deep learning and computer vision, "backbone" refers to the fundamental part of a neural network model, primarily responsible for feature extraction; it is typically a convolutional neural network (CNN), such as Darknet, ResNet, or MobileNet.
[0063] Specifically, the detection model built on deep learning uses MobileNet-v2 as its backbone in the YOLOv7-Lite model. YOLOv7-Lite is a lightweight version of YOLOv7, using MobileNet-v2 as the base network (backbone) for feature extraction. YOLOv7 is one of the latest variants in the "YOLO" object detection family, improving the efficiency and accuracy of object detection through the introduction of new network architectures and optimization techniques. A major advantage of YOLO models is their speed, enabling real-time object detection. "Lite" refers to a lightweight version designed to reduce the model's computational complexity and number of parameters, thereby improving inference speed, reducing memory consumption, and making the model more suitable for running in resource-constrained environments, such as mobile devices or embedded systems. Lightweight versions typically adjust the number of layers, width, or other parameters of YOLO to suit the needs of real-time applications.
[0064] MobileNet-v2 is a high-efficiency convolutional neural network architecture specifically designed for mobile and embedded devices. As a lightweight convolutional neural network, MobileNet-v2 performs well in classification, object detection, and semantic segmentation, reducing computational cost while maintaining high accuracy. As the backbone of YOLOv7-Lite, MobileNet-v2 is responsible for extracting features from the input image for subsequent detection layers.
[0065] The YOLOv7-Lite model using MobileNet-V2 as its backbone refers to an object detection model that leverages MobileNet-V2 for feature extraction, thereby significantly reducing the model's computational resource requirements while maintaining high accuracy. This makes the model particularly suitable for real-time object detection on low-power devices.
[0066] In the embodiments of the present invention, please refer to Figure 4 , Figure 4 This is a schematic diagram illustrating the steps of a training method for a detection model based on deep learning in a particle counting device 100 according to an embodiment of the present invention. The training method for the detection model based on deep learning includes:
[0067] Step S1: Collect particle images and divide the collected particle images into training set and validation set;
[0068] The collected particle images are randomly sampled and divided into independent, non-repeating training and validation sets, with the ratio generally not less than 4:1. The training set is used to train the detection model. The validation set is used to test the model's performance to verify whether it meets the application requirements.
[0069] Specifically, before step S1, the controller can preprocess the acquired raw particle image, scale the raw particle image acquired by the image acquisition module 40 to the size required by the YOLO model (640px*640px), and normalize the pixel values of the raw particle image to the range [0, 1].
[0070] Step S2: Input the particle images in the training set into the detection model based on deep learning for training, so as to obtain the solid particle group, empty particle group, broken particle group and impurity group.
[0071] Step S3: Input the particle images in the validation set into the detection model built on deep learning for validation. If the validation fails, collect particle images again and input the collected particle images into the training set for training. Return to the previous step and input the particle images in the validation set into the detection model built on deep learning for validation until the validation passes.
[0072] Through the steps described above, the deep learning-based detection model can continuously optimize its performance, ensuring accurate identification and classification of particle images. By inputting particle images from the validation set into the deep learning-based detection model for validation, and collecting more particle images for retraining when validation fails, this iterative process provides an effective mechanism for the continuous improvement and refinement of the detection model. With each round of training, the detection model can continuously update its feature recognition capabilities using new data, effectively offsetting misjudgments caused by insufficient or biased samples, thereby significantly improving the accuracy of particle detection. The classification accuracy of the detection model gradually approaches actual requirements, helping to reduce manual intervention in subsequent processing. By introducing diverse particle images, the model can learn more features and variations. This diverse training ensures the model's invariance when facing unknown data, making its performance more robust under different environments and conditions.
[0073] In the embodiments of the present invention, please refer to Figure 5 , Figure 5This is a detailed schematic diagram of step S2 in the training method of the detection model based on deep learning in the particle counting device 100 according to an embodiment of the present invention. Step S2 includes:
[0074] Step S21: Use the YOLO model to extract features from each particle in the particle image;
[0075] The image segmentation algorithm is used to segment the particle image into individual particles.
[0076] Step S22: Use the YOLO model to compare the outline of each particle with the outline of the preset particles.
[0077] Step S23: If the similarity between the outline of the particle and the outline of the preset particle is greater than or equal to the preset similarity, then the particle is determined to belong to the preset particle group, wherein the preset particle group includes the solid particle group, the empty particle group, and the broken particle group; otherwise, the particle is determined to belong to the impurity group.
[0078] Impurities in the particle images mainly consist of structures such as stems and leaves. These impurities are mostly irregularly shaped, while crop particles have distinct shapes; for example, rice grains are mostly elliptical in outline. The outlines of impurities and crop particles are clearly distinguishable, making impurities the easiest to differentiate among solid, empty, and broken grains. If the similarity between the particle's outline and the outline of a preset particle is less than a preset similarity, the particle is determined to belong to the impurity group. If the similarity is greater than or equal to the preset similarity, the particle is determined to belong to the preset particle group. The preset similarity can be set to 80%, 90%, or other values, and can be flexibly adjusted according to the characteristics of the crop particles.
[0079] In this embodiment of the invention, step S23 is followed by:
[0080] Step S24: Use the YOLO model to divide the pixels of each particle in the preset particle group into dark pixels and bright pixels, and calculate the number of dark pixels and bright pixels of each particle in the preset particle group.
[0081] Step S25: If the number of dark pixels of the particle accounts for a proportion greater than or equal to a preset proportion of all pixels of the particle, then the particle is determined to belong to a valid particle group, wherein the valid particle group includes a solid particle group and a broken particle group; otherwise, the particle is determined to belong to an empty particle group.
[0082] Generally speaking, solid particles have a dense internal structure and low light transmittance, appearing as darker pixels in images; while hollow particles have larger internal gaps and higher light transmittance, appearing as brighter pixels in images.
[0083] A suitable grayscale threshold needs to be set based on the specific characteristics of the crop particles to distinguish between dark and bright pixels. This threshold can be set based on experience or learned automatically through machine learning.
[0084] The number of dark and bright pixels in each particle within a preset particle group is calculated. If the proportion of dark pixels to all pixels in a particle is greater than or equal to a preset proportion, the particle has a relatively dense internal structure and low light transmittance, thus classifying it as a valid particle group—that is, a solid or broken particle group. If the proportion of dark pixels to all pixels in a particle is less than the preset proportion, the particle has a larger internal structure and higher light transmittance, thus classifying it as a hollow particle group. The preset proportion can be 70%, 80%, 90%, or other values, and can be flexibly adjusted according to the characteristics of the crop particles.
[0085] In this embodiment of the invention, the method further includes the following after step S25:
[0086] Step S26: Use the YOLO model to compare the aspect ratio of each particle in the effective particle swarm with the preset aspect ratio range.
[0087] Step S27: If the aspect ratio of the particle is outside the preset aspect ratio range, the particle is determined to belong to the broken particle group; otherwise, the particle is determined to belong to the solid particle group.
[0088] The aspect ratio describes the ratio of the major axis to the minor axis of a particle. The aspect ratio of broken particles will deviate from the typical range of solid particles. The aspect ratio of each particle in the effective particle group is compared with the preset aspect ratio range. If the aspect ratio of a particle is outside the preset range, then the aspect ratio of the particle deviates from the typical range of solid particles, and the particle is determined to belong to the broken particle group; if the aspect ratio of the particle is within the preset range, then the particle is determined to belong to the solid particle group.
[0089] Calculate the statistical characteristics of the grain length-to-width ratio, such as the mean, standard deviation, variance, and distribution histogram. This helps in understanding the distribution pattern of the length-to-width ratio. Based on the statistical results, determine a reasonable preset range for the length-to-width ratio, such as the mean ± k times the standard deviation (k is usually 1-3, and the specific value needs to be determined based on the data distribution and the allowable error rate). Percentile methods can also be used, for example, a range that includes 95% of the grain length-to-width ratios. Crop variety, growing conditions, and other factors can affect the distribution of grain length-to-width ratios. Consider dynamically adjusting the preset range based on actual conditions, such as periodically recalculating the range or adjusting the range based on data from different batches of crops.
[0090] In the embodiments of the present invention, please refer to Figure 3The particle counting device 100 also includes a slide rail 50, which is connected to the counting chamber 10; the slide rail 50 extends in the front-to-back direction. The light-transmitting tray 20 includes a base plate 21 and a side plate 22 connected to the edge of the base plate 21. The base plate 21 extends in the horizontal direction, and the side plate 22 extends in the vertical direction. The base plate 21 and the side plate 22 enclose a receiving groove 23, which is used to receive particles. The receiving groove 23 prevents particles from falling off during the movement of the light-transmitting tray 20 between the feeding station and the counting station, making the counting results more accurate.
[0091] The side plate 22 is slidably connected to the slide rail 50, and the side plate 22 also moves relative to the slide rail 50 in the front and back direction. By setting the slide rail 50 to guide the movement of the light-transmitting tray 20, the movement process of the light-transmitting tray 20 is more stable and reliable.
[0092] In this embodiment of the invention, the controller is mounted on a Raspberry Pi 4B board and is electrically connected to the image acquisition module 40 via a USB interface.
[0093] The Raspberry Pi 4B is an inexpensive single-board computer. Compared to other more powerful embedded systems, the Raspberry Pi 4B offers high performance and low cost, significantly reducing the overall cost of the particle counting device 100. The Raspberry Pi 4B is compact, making it easy to carry and deploy. It connects electrically to the image acquisition module 40 via a USB interface. The Raspberry Pi 4B possesses image processing and computing capabilities, enabling real-time analysis and processing of particle images captured by the image acquisition module 40.
[0094] The particle counting device 100 may also include a display screen 60, which is electrically connected to the Raspberry Pi 4B board. After counting is completed, the Raspberry Pi 4B board can provide the counting result to the user through the display screen 60.
[0095] Furthermore, the counting results, original images, and processed images can be stored together on the Raspberry Pi 4B's SD card for later retrieval and analysis. If the particle counting device 100 is connected to the network, the counting results and images will be automatically uploaded to the cloud platform, allowing users to remotely access the data for big data analysis and further decision support. The particle counting device 100 can generate crop yield predictions, quality assessments, and other analytical reports based on long-term accumulated data, helping agricultural producers achieve refined management.
[0096] In addition, the present invention also provides a particle counting method, the particle counting method comprising:
[0097] Step S100: Control the light-transmitting tray 20 to move to the feeding station for granule feeding;
[0098] The particle counting device 100 may further include a drive component, the output end of which is connected to the light-transmitting tray 20. The drive component drives the light-transmitting tray 20 to move. The drive component can be a motor, a hydraulic cylinder, or other drive structure. The controller controls the drive component, which drives the light-transmitting tray 20 to the feeding station to facilitate particle feeding and achieve automatic feeding. During the feeding process, it is necessary to minimize particle overlap to reduce errors in the counting results caused by particle overlap.
[0099] Step S200: Control the light-transmitting tray 20 to move from the loading station to the counting station;
[0100] The counting station is located inside the counting chamber 10, isolating it from external environmental interference factors to ensure the quality of the acquired images.
[0101] Step S300: Control the image acquisition module 40 to capture images of the particles on the light-transmitting tray 20 when the light source 30 is turned on;
[0102] When the light source 30 is turned on, the light emitted by the light source 30 can pass through the light-transmitting tray 20 and illuminate the particles on the light-transmitting tray 20, making the particles on the light-transmitting tray 20 more obvious, so that the image acquisition module 40 can acquire a clear image of the particles.
[0103] Step S400: Obtain particle images captured by image acquisition module 40, and count particles based on particle images.
[0104] The controller can detect, classify, and count particles in particle images, eliminating impurities such as stems and dust, ensuring the accuracy of the counting results, and significantly improving the speed of particle counting. Compared with traditional manual counting methods, it reduces human error and greatly improves work efficiency.
[0105] In this embodiment of the invention, step S400 includes:
[0106] Acquire particle images captured by image acquisition module 40;
[0107] The particle images are input into a detection model built on deep learning to output the number of particles. The detection model built on deep learning uses the YOLO model.
[0108] The YOLO model boasts extremely fast inference speeds, making it suitable for real-time applications. It can instantly calculate the number of particles without waiting for lengthy processing times. The backbone network typically refers to the main part of the entire deep neural network, responsible for extracting features from the input data. The backbone network usually consists of multiple convolutional layers or other feature extraction layers, used to progressively extract high-level features from the input data. In image processing tasks, the backbone network is commonly used to extract global and local features of an image, such as edges, textures, and shapes.
[0109] In the description of this invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0110] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection, an electrical connection, or a connection that allows communication between them; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0111] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0112] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A particle counting device, characterized in that, The particle counting device (100) includes: Counting chamber (10); A light-transmitting tray (20) is provided on the counting chamber (10) and can move between the loading station and the counting station, wherein the counting station is located inside the counting chamber (10); The light source (30) is disposed inside the counting chamber (10) and located on the lower side of the light-transmitting tray (20); Image acquisition module (40), the image acquisition module (40) is located inside the counting chamber (10) and on the upper side of the light-transmitting tray (20), the image acquisition module (40) is used to capture images of particles on the light-transmitting tray (20); The controller is communicatively connected to the image acquisition module (40) and configured to: acquire particle images captured by the image acquisition module (40) and count particles based on the particle images.
2. The particle counting device according to claim 1, characterized in that, The step of acquiring particle images captured by the image acquisition module (40) and counting particles based on the particle images includes: Acquire particle images captured by the image acquisition module (40); The particle image is input into a detection model based on deep learning to output the number of particles. The detection model based on deep learning uses the YOLO model.
3. The particle counting device according to claim 2, characterized in that, The training method for the detection model based on deep learning includes: Collect particle images and divide the collected particle images into a training set and a validation set; The particle images in the training set are input into a detection model based on deep learning for training to obtain solid particle groups, empty particle groups, broken particle groups and impurity groups. The particle images in the validation set are input into the detection model built on deep learning for validation. If the validation fails, particle images are collected again and input into the training set for training. Then, the process of inputting the particle images in the validation set into the detection model built on deep learning for validation is repeated until the validation passes.
4. The particle counting device according to claim 3, characterized in that, The step of inputting the particle images from the training set into a detection model based on deep learning for training to obtain solid particle groups, empty particle groups, broken particle groups, and impurity groups includes: The YOLO model was used to extract features from each particle in the particle image; The YOLO model is used to compare the outline of each particle with the outline of a preset particle. If the similarity between the outline of the particle and the outline of a preset particle is greater than or equal to the preset similarity, then the particle is determined to belong to the preset particle group, wherein the preset particle group includes the solid particle group, the empty particle group, and the broken particle group; otherwise, the particle is determined to belong to the impurity group.
5. The particle counting device according to claim 4, characterized in that, The step of determining that the particle belongs to the preset particle group if the similarity between the particle's outline and the outline of a preset particle is greater than a preset similarity is further included: The YOLO model is used to divide the pixels of each particle in the preset particle group into dark pixels and bright pixels, and the number of dark pixels and bright pixels of each particle in the preset particle group is calculated. If the number of dark pixels in a particle accounts for a proportion greater than or equal to a preset proportion of all pixels in the particle, then the particle is determined to belong to a valid particle group, wherein the valid particle group includes a solid particle group and a broken particle group; otherwise, the particle is determined to belong to an empty particle group.
6. The particle counting device according to claim 5, characterized in that, The step of determining that a particle belongs to a valid particle group if the proportion of dark pixels in the particle to the total number of pixels in the particle is greater than or equal to a preset proportion also includes: The aspect ratio of each particle in the effective particle group is compared with the preset aspect ratio range using the YOLO model. If the aspect ratio of the particle is outside the preset aspect ratio range, the particle is determined to belong to the broken particle group; otherwise, the particle is determined to belong to the solid particle group.
7. The particle counting device according to any one of claims 1 to 6, characterized in that, The particle counting device (100) further includes a slide rail (50) connected to the counting chamber (10); the light-transmitting tray (20) includes a base plate (21) and a side plate (22) connected to the edge of the base plate (21), the base plate (21) and the side plate (22) forming a receiving groove (23) for receiving particles; the side plate (22) is slidably connected to the slide rail (50).
8. The particle counting device according to any one of claims 1 to 6, characterized in that, The controller is mounted on a Raspberry Pi 4B board and is electrically connected to the image acquisition module (40) via a USB interface.
9. A particle counting method, characterized in that, The particle counting method includes: Control the light-transmitting tray (20) to move to the loading station for granule loading; Control the light-transmitting tray (20) to move from the loading station to the counting station; The image acquisition module (40) is controlled to capture images of the particles on the light-transmitting tray (20) when the light source (30) is turned on; The particle images captured by the image acquisition module (40) are obtained, and particle counting is performed based on the particle images.
10. The particle counting method according to claim 9, characterized in that, The step of acquiring particle images captured by the image acquisition module (40) and counting particles based on the particle images includes: Acquire particle images captured by the image acquisition module (40); The particle image is input into a detection model based on deep learning to output the number of particles. The detection model based on deep learning uses the YOLO model.
