Method and device for detecting particle size and morphology of puffed seedling material, computer equipment, readable storage medium and product
By employing image recognition and data processing methods, the problems of low efficiency and low accuracy in extruded seedling particle size detection have been solved, achieving efficient and accurate particle size and morphology detection, adapting to different particle shapes, and supporting digital production management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FAMSUN CO LTD
- Filing Date
- 2026-05-20
- Publication Date
- 2026-06-26
AI Technical Summary
Existing methods for detecting the particle size of extruded seedlings are inefficient, have low accuracy, and poor repeatability, making it difficult to meet the particle size requirements of different aquatic animals.
Image recognition technology is used to acquire images of expanded seedlings and perform data preprocessing. Particle edges are segmented using slice-assisted inference technology and the Attention U-Net model, and then filtered using the non-maximum suppression algorithm (NMS) to achieve high-precision particle size and morphology detection.
It enables efficient and accurate detection of extruded seedling particle size and morphology, improves measurement efficiency and repeatability, adapts to different particle shapes, and supports digital production management.
Smart Images

Figure CN122290102A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of seedling material testing technology, specifically relating to a method, device, computer equipment, readable storage medium, and product for detecting the particle size and morphology of expanded seedling material. Background Technology
[0002] The processing technology of extruded seedling feed requires a high level of precision, involving multiple stages such as raw material crushing, mixing, and conditioning. Particle size control is one of the key factors in ensuring feed quality. The production process of extruded feed is much more refined than that of ordinary extruded feed; therefore, accurate particle size measurement is particularly important. Different aquatic animal species have different requirements for feed particle size during the seedling stage. Particle size measurement of extruded seedling feed helps produce feed that meets the specific needs of aquatic animals, thereby improving their growth performance and health.
[0003] For a long time, the particle size of expanded seedling feed has been mainly detected manually by means of vernier calipers, sieving, and microscopic observation. This method has many drawbacks, including high subjectivity, low efficiency, difficulty in ensuring measurement accuracy, high time cost, poor repeatability of particle size measurement results, and significant limitations in data processing and analysis capabilities. Summary of the Invention
[0004] The first objective of this invention is to provide a method for detecting the particle size and morphology of expanded seedling feed, in order to solve the technical problems of low efficiency and low accuracy in particle size detection of existing expanded seedling feed.
[0005] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: a method for detecting the particle size and morphology of expanded seedling feed, comprising: a method for detecting the particle size and morphology of expanded seedling feed, comprising: Acquire images of the extruded seedlings to be detected and perform data preprocessing to obtain the target image; Using the slice-assisted reasoning technique SAHI, the target image is cut into several sub-target images by sliding a window; A particle size and morphology detection model for expanded seedling feed is loaded. This model is trained using a neural network with training images, which are obtained by segmenting historical target images. After preprocessing the historical target images, Attention U-Net is used to segment the particle edges and background of each historical target image, resulting in several historical target detection boxes. The coordinates and corresponding confidence scores of each historical target detection box are marked, and a corresponding mask is generated. Based on the mask, particle size parameters are calculated and particle morphology results are inferred. Each sub-target image is input into the seedling particle size and morphology detection model to perform extruded seedling particle size and morphology detection, and obtain the extruded seedling particle size and morphology inference results for each sub-target image. The inference results of the extruded seedling particle size and morphology of each target image are fused together and filtered using NMS to obtain the detection results of the extruded seedling particle size and morphology of the target image.
[0006] This invention utilizes an image recognition and particle size analysis algorithm to cover a large number of particles in a short time, enabling the generation of a complete and representative statistical result, thus supporting the production of extruded seedling feed. This invention is used for seedling feed particle size detection and statistical analysis in the feed industry, facilitating digital production and management.
[0007] This invention provides a method for high-precision measurement of the particle size and surface morphology of expanded seedling feed based on image recognition and data processing. It overcomes the shortcomings of existing technologies, improves measurement accuracy, increases measurement efficiency, enhances repeatability, and adapts to different particle shapes.
[0008] To further improve the technical solution of this invention, the training of the extruded seedling particle size and morphology detection model includes the following steps: Obtain the historical image dataset corresponding to the extruded seedling and the morphological category and particle size parameters of the extruded seedling corresponding to the historical image dataset; Based on the historical image dataset corresponding to the extruded seedling and the morphological category and particle size parameters of the extruded seedling corresponding to the historical image dataset, data preprocessing is performed to obtain the historical target image dataset and the extruded seedling morphological label and extruded seedling particle size parameter label corresponding to each historical target image data in the historical target image dataset; The historical target image data is divided into a training dataset and a test dataset. Based on the data importance of the training data, feature selection is performed from the training dataset to obtain the target training data. The target training data is input into the initial extruded seedling particle size and morphology detection model for classification training to obtain training results. Based on the training results and the extruded seedling morphology label and extruded seedling particle size parameter label, the loss is calculated to obtain training loss information. The initial extruded seedling particle size and morphology detection model is updated based on the training loss information to obtain the updated extruded seedling particle size and morphology detection model. The updated extruded seedling particle size and morphology detection model is used as the initial extruded seedling particle size and morphology detection model. The process of inputting the target training data into the initial extruded seedling particle size and morphology detection model for classification training and obtaining training results is repeated until the training completion condition is met, and the extruded seedling particle size and morphology detection model to be tested is obtained. The particle size and morphology detection model of the extruded seedling material to be tested is tested based on the test dataset to obtain test results; when the test results meet the preset test conditions, the particle size and morphology detection model of the extruded seedling material is obtained.
[0009] To further improve the technical solution of the present invention, the step of acquiring the image of the extruded seedling to be detected and performing data preprocessing to obtain the target image includes: The image of the extruded seedling to be detected is subjected to contrast enhancement and candidate region suggestion to obtain the target image.
[0010] To solve the above-mentioned technical problems, the present invention adopts the following technical solution, wherein the filtering using NMS includes: Using NMS, the boxes with high confidence are selected as the baseline in descending order of confidence, and then adjacent boxes are compared to remove duplicates. The detection boxes located at the edges of the sub-target image but in different sub-target images are selected and fused to remove duplicate calculations and incomplete detection boxes.
[0011] To further improve the technical solution of the present invention, the Attention U-net includes: Encoder: Responsible for "downsampling" the input image and gradually extracting the high-level semantic features of the image; Decoder: Responsible for "upsampling" the feature map of the encoder, gradually restoring the resolution of the image, and finally outputting a segmentation result with the same size as the input. Skip connections: These directly connect the feature map of a certain layer of the encoder to the corresponding layer of the decoder. The purpose is to pass the detailed information retained by the encoder to the decoder, helping the decoder to locate the target more accurately. The skip connections incorporate an attention gating mechanism, so that when the decoder is upsampling, it generates an attention weight map based on the feature map of the current layer, and uses this attention weight map to apply to the corresponding feature map from the encoder. Features in regions with a higher than the set attention weight value are amplified and propagated. Features in regions with a weight less than the set attention weight are suppressed or weakened.
[0012] Further improvements to the technical solution of the present invention are made, wherein the results of the extruded seedling particle size and morphology include the results of the extruded seedling morphology and the results of the extruded seedling particle size; The resulting morphology of the expanded seedling material includes cylindrical and spherical shapes; The particle size results of the expanded seedlings include the equivalent circle diameter, width, length, roundness, elongation, rectangularity, quantity, particle size distribution (D10, D50, D90), and average particle size of the expanded seedlings.
[0013] The second objective of this invention is to provide a device for detecting the particle size and morphology of expanded seedling feed. The device is characterized in that it comprises: The image acquisition module is used to acquire image data of the extruded seedling material to be detected. The preprocessing module is used to perform contrast enhancement and candidate region suggestion on the image of the extruded seedling to be detected, so as to obtain target image data; The segmentation and fusion module is used to use the slice-assisted reasoning technology SAHI to segment the target image into several sub-target images through a sliding window, and to fuse the inference results of the extruded seedling particle size and morphology of each target image, and to filter them using NMS. The seedling particle size and morphology detection model is obtained by training a neural network using training images, which are segmented from various historical target images. After preprocessing the historical target images, AttentionU-Net is used to segment the particle edges and background of each historical target image, resulting in several historical target detection boxes. The coordinates and corresponding confidence scores of each historical target detection box are labeled, and a corresponding mask is generated. Based on the mask, particle size parameters are calculated, and particle morphology results are inferred. The loading module is used to load the extruded seedling particle size and morphology detection model. The output module is used to input the target image data into the seedling particle size and morphology detection model to detect the particle size and morphology of the expanded seedling, and obtain the particle size and morphology results of the expanded seedling to be detected.
[0014] A third object of the present invention is to provide a computer device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the method described in any of the preceding claims.
[0015] A fourth object of the present invention is to provide a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of the method described in any of the preceding claims.
[0016] A fifth object of the present invention is to provide a computer program product comprising a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps of the method described in any of the preceding claims. Attached Figure Description
[0017] Figure 1 This is a flowchart of the method for detecting the particle size and morphology of expanded seedling feed according to the present invention; Figure 2 This is a software page diagram of the method for detecting the particle size and morphology of expanded seedling feed according to the present invention; Figure 3 These are the material images and corresponding mask images used in the method for detecting the particle size and morphology of expanded seedling feed in this invention; Figure 4 This is a stereoscopic representation of the image acquisition module of the present invention. Figure 1 ; Figure 5This is a stereoscopic representation of the image acquisition module of the present invention. Figure 2 ; Figure 6 This is a side view of the image acquisition module of the present invention; Figure 7 This is a schematic diagram of the image acquisition module of the present invention; Figure 8 This is a comparison image of the expanded seedling feed before and after identification (spherical particles) according to the present invention. Figure 9 These are schematic diagrams of the expanded seedling feed of the present invention in different shapes (spherical particles, cylindrical particles); Figure 10 This is the batch particle size box plot (spherical particles) of the present invention. Figure 11 This is a histogram showing the distribution of expanded seedling feed of different particle sizes (spherical particles) according to the present invention. Figure 12 This is a comparison of the original image and the labeled image of the present invention, as well as a statistical result diagram (cylindrical particles). Figure 13 This is a batch length box plot (cylindrical particles) of the present invention. Figure 14 This is a batch particle size box plot (cylindrical particles) of the present invention. Figure 15 This is the length distribution histogram (cylindrical particles) of the present invention. Figure 16 This is the particle size distribution histogram (cylindrical particles) of the present invention. Figure 17 This is a schematic diagram of the structure of the expanded seedling particle size and morphology detection device of the present invention. Detailed Implementation
[0018] The invention will now be further described with reference to the accompanying drawings.
[0019] Glossary NMS (non-maximum suppression); SAHI (Slicing Aided Hyper Inference) is a slice-aided hyper inference technology. Example
[0020] like Figure 1 , Figure 2 , Figure 3 , Figure 8 As shown, the methods for detecting the particle size and morphology of expanded seedling feed include: Acquire images of the extruded seedlings to be detected and perform data preprocessing to obtain the target image; Using the slice-assisted reasoning technique SAHI, the target image is cut into several sub-target images by sliding a window; A particle size and morphology detection model for expanded seedling feed is loaded. This model is trained using a neural network with training images, which are obtained by segmenting historical target images. After preprocessing the historical target images, Attention U-Net is used to segment the particle edges and background of each historical target image, resulting in several historical target detection boxes. The coordinates and corresponding confidence scores of each historical target detection box are labeled, and a corresponding mask is generated. Based on the mask, particle size parameters are calculated and particle morphology results are inferred. Each sub-target image is input into the seedling particle size and morphology detection model to perform extruded seedling particle size and morphology detection and obtain the extruded seedling particle size and morphology inference results for each sub-target image. The inference results of the extruded seedling particle size and morphology of each target image are fused together and filtered using NMS to obtain the detection results of the extruded seedling particle size and morphology of the target image.
[0021] This invention utilizes a high-definition camera for image acquisition: using SAHI slicing, the image is divided into several sub-target images; each sub-target image is fed into the above-trained seedling particle size and morphology detection model for identification, marking the coordinates of the particle detection box, its corresponding confidence level, and the mask; SAHI performs fusion, selecting particle detection boxes located at the edge of the sub-target image but in different sub-target images for fusion, removing duplicate calculations and incomplete particles; NMS deduplication (removing duplicate boxes): selecting boxes with high confidence levels as the benchmark according to descending order of confidence, and then comparing adjacent boxes to remove duplicates; various parameters such as particle size are calculated based on the mask.
[0022] In one embodiment, training the extruded seedling particle size and morphology detection model includes the following steps: Obtain the historical image dataset corresponding to the extruded seedlings and the morphological category and particle size parameters of the extruded seedlings corresponding to the historical image dataset; Data preprocessing is performed based on the historical image dataset corresponding to the extruded seedlings and the morphological category and particle size parameters of the extruded seedlings corresponding to the historical image dataset to obtain the morphological label and particle size parameter label of the extruded seedlings corresponding to each historical target image data in the historical target image dataset. The historical target image data is divided into training dataset and test dataset. Based on the data importance of the training dataset, feature selection is performed from the training dataset to obtain the target training data. The target training data is input into the initial extruded seedling particle size and morphology detection model for classification training to obtain the training results. Based on the training results and the extruded seedling morphology label and extruded seedling particle size parameter label, the loss is calculated to obtain the training loss information. The initial extruded seedling particle size and morphology detection model is updated based on the training loss information to obtain the updated extruded seedling particle size and morphology detection model. The updated extruded seedling particle size and morphology detection model is used as the initial extruded seedling particle size and morphology detection model. The target training data is then input into the initial extruded seedling particle size and morphology detection model for classification training. The training results are obtained by repeating this process until the training completion conditions are met, and then the extruded seedling particle size and morphology detection model to be tested is obtained. The particle size and morphology detection model of the extruded seedling material to be tested was tested based on the test dataset, and the test results were obtained. When the test results meet the preset test conditions, the particle size and morphology detection model of the extruded seedling material is obtained.
[0023] The training process of the model in this invention is as follows: Original particle images are captured using a high-definition camera; image preprocessing includes contrast enhancement and candidate region proposal, such as local extrema and gradient detection; Attention U-Net is used to segment particle boundaries; confidence assessment and manual calibration are performed to obtain a high-quality training set; repeated training is conducted, resulting in increasingly accurate model recognition. Through these steps, the model acquires the ability to accurately label particle boxes and accurately label confidence levels.
[0024] To train a deep learning model capable of recognizing common particles, images of these particles must first be acquired to create mask data for supervised learning. Particles are typically found in complex backgrounds; background texture, color, reflections, and other interfering factors significantly increase the difficulty of subsequent recognition. Particles are tiny (micrometer-scale) and vary greatly in shape (spherical, fibrous, irregular aggregates, etc.). High-magnification microscopy is required for acquisition, but the field of view is limited at high magnification, resulting in a small number of particles in a single image, making it difficult to fully cover their diversity.
[0025] Images acquired at different times, using different devices, or under different lighting conditions may exhibit significant differences in brightness, contrast, and color balance. Inconsistency can mislead models, causing them to learn irrelevant imaging features rather than the characteristics of the particles themselves. Certain types or states of particulate matter (such as rare pollution particles) are difficult to obtain in large quantities, resulting in a scarcity of image samples for that category. This leads to class imbalance in the dataset, affecting the model's ability to identify minority classes.
[0026] To address this, the present invention designs a standardized image acquisition process, including the use of a fixed illumination box, a calibrated microscope system, and standardized focal length and exposure parameters to reduce the influence of variables. Multiple regions and focal lengths of the same sample are scanned and stitched together to generate a large-field-of-view, high-resolution panoramic image.
[0027] To improve the robustness of the model, this invention introduces a "difficult sample mining" strategy: during the acquisition process, "difficult" scenes with complex backgrounds, overlapping particles, blurred edges, and low contrast are deliberately included, forcing the model to learn more discriminative features rather than simple patterns, ensuring the consistency of image quality and providing a stable and reliable learning foundation for the model.
[0028] In one embodiment, acquiring an image of the extruded seedling to be detected and performing data preprocessing to obtain the target image includes: Contrast enhancement and candidate region suggestion are performed on the image of the extruded seedling to be detected to obtain the target image.
[0029] In one embodiment, filtering using NMS includes: Using NMS, the boxes with high confidence are selected as the baseline in descending order of confidence, and then adjacent boxes are compared to remove duplicates. The detection boxes located at the edges of the sub-target image but in different sub-target images are selected and fused to remove duplicate calculations and incomplete detection boxes.
[0030] In one embodiment, the Attention U-net includes: Encoder: Responsible for "downsampling" the input image and gradually extracting the high-level semantic features of the image; Decoder: Responsible for "upsampling" the feature map of the encoder, gradually restoring the resolution of the image, and finally outputting a segmentation result with the same size as the input. Skip connections directly connect the feature map of a certain layer of the encoder to the corresponding layer of the decoder. The purpose is to pass the detailed information retained by the encoder to the decoder, helping the decoder to locate the target more accurately. Skip connections incorporate an attention gating mechanism, so that when the decoder is upsampling, it generates an attention weight map based on the feature map of the current layer, and uses the attention weight map to apply to the corresponding feature map from the encoder. Features in regions with a higher than the set attention weight value are amplified and propagated. Features in regions with a weight less than the set attention weight are suppressed or weakened.
[0031] In one embodiment, the results of the extruded seedling particle size and morphology include the extruded seedling morphology results and the extruded seedling particle size results; The morphological results of expanded seedling feed include cylindrical particles and spherical particles; The particle size results of the expanded seedlings include the equivalent circle diameter, width, length, roundness, elongation, rectangularity, quantity, particle size distribution (D10, D50, D90), and average particle size of the expanded seedlings.
[0032] This invention can extract 12 features of particles, including equivalent diameter, roundness, aspect ratio, and surface roughness. It can also extract equivalent circle diameter, width, length, roundness, elongation, rectangularity, quantity, particle size distribution (D10, D50, D90), average particle size, and breakage analysis. The core of this invention lies in accurately identifying particles and collecting data such as the area and length of particle images to establish a database of expanded seedling morphology, supporting analysis linked to production process parameters.
[0033] In one embodiment, the particle size and morphology detection model for expanded seedlings can be a model such as YOLO or Mask R-CNN, or any model with suitable performance can be selected. Specifically, Anchor-based Mask R-CNN and NMSyolo11n can be chosen. If a high-performance GPU is used, NMS-free models such as YOLOv10 can also be used. By training the seedling particle size and morphology detection model, it can outline small particles and generate the confidence score for each box.
[0034] This invention employs preprocessing guidance: Key regions are focused on in advance. Before data is input into the model, image enhancement (such as contrast boosting and noise removal) and Region of Interest (ROI) extraction (i.e., candidate region proposal) are performed to weaken the interference of complex backgrounds and highlight small-particle feature information. The effect is to reduce the computational load of the model, avoid "wasting computing power" on massive background information, and make subsequent model training more targeted.
[0035] Traditional U-Net is a classic model for small object segmentation tasks such as medical images and remote sensing images. It adopts an "encoder-decoder + skip connection" structure, which can effectively preserve the detailed information of the image. Traditional skip connections are feature maps of the encoder that are "indiscriminately passed" through the encoder. They contain both effective information of small particles and a large amount of background interference information. Therefore, traditional U-Net is not sensitive enough to small objects.
[0036] To address the aforementioned technical problems, this invention employs an Attention U-Net optimized for small targets, which incorporates an attention gating mechanism at skip connections. Its specific structure is as follows: (1) Encoder: responsible for “downsampling” the input image and gradually extracting the high-level semantic features of the image, for example: this is a particle, but some detailed location information will be lost; (2) Decoder: responsible for "upsampling" the feature map of the encoder, gradually restoring the resolution of the image, and finally outputting a segmentation result with the same size as the input; (3) Skip connection: The feature map of a certain layer of the encoder is directly connected to the corresponding layer of the decoder. The purpose is to pass the detailed information retained by the encoder (such as the edge and position of the particles) to the decoder to help the decoder locate the target more accurately. This invention employs an attention gating mechanism to add a "smart filter" to skip connections. The role of the attention gating mechanism is to allow the decoder to "actively select" useful features: during upsampling, the decoder generates an attention weight map (which can be understood as a "scoring map," where the score of each pixel represents its probability of belonging to the target particle) based on the feature map of the current layer. The weight map is applied to the corresponding feature map from the encoder: features in high-scoring regions (suspected particles) are enhanced and propagated, while features in low-scoring regions (suspected background) are suppressed and weakened.
[0037] The final model no longer "uniformly focuses" on the entire image, but automatically focuses on the local area where the small particles are located, filtering out background interference responses, thereby greatly improving the recognition accuracy and recall rate of small particles (reducing false negatives and false positives).
[0038] An attention gating mechanism is introduced at the skip connections (jump changes at particle edges). During upsampling, the decoder generates an attention weight map based on the feature map of the current layer and applies it to the corresponding feature map from the encoder. This allows the model to automatically focus on the local region where the particle shape is located and suppress irrelevant background responses.
[0039] The mask data is binarized data directly output by the Attention U-Net, clearly defining the outline of the particles. This mask data will serve as crucial training material for the model, helping it learn the features of the particles and thus improving its recognition accuracy. (See...) Figure 4 .
[0040] To address the challenges of detecting the high dispersion and tendency for overlap of extruded seedling particles, a highly efficient non-maximum suppression (NMS) algorithm based on a CPU platform was innovatively selected and optimized, while balancing equipment compactness and cost-effectiveness. The core of this algorithm lies in its intelligent analysis of overlapping regions among all bounding boxes in the image, accurately eliminating redundant boxes with low confidence and retaining only the most representative high-confidence target boxes. This effectively solves the common problems of false detection and missed detection in particulate matter detection, achieving a significant leap in recognition accuracy and processing speed on a general-purpose computing platform.
[0041] This invention employs confidence-based active learning to enable continuous model evolution and reduce annotation costs. Active learning is an efficient training strategy whose core logic is to only manually annotate the data that the model is least certain about: during inference, the model outputs the confidence level for each prediction result; samples with low confidence levels (i.e., small particles that the model judges with ambiguity) are selected and sent for manual annotation; the annotated data is then used to iteratively train the model, avoiding the high cost of annotating all data, while making the model's optimization direction more precise, achieving continuous evolution that becomes more accurate with use.
[0042] Unlike traditional NMS, this algorithm sorts boxes in descending order of confidence, prioritizes high-confidence boxes, calculates only the IoU between adjacent boxes, and uses vectorized IoU calculation to reduce unnecessary computation. The optimized NMS employs vectorized computation, constructing the detection box coordinates and confidence scores into vectors or matrices for batch processing, reducing iterations and improving the algorithm's execution efficiency on CPUs. Vectorized computation means calculating adjacent boxes without comparing each box to a baseline box; specifically: Identify detection bounding boxes; each bounding box corresponds to a suspected particle; each bounding box includes confidence information. See [link / reference]. Figure 12 ; Sort the boxes in descending order of confidence level and select the boxes with the highest confidence level as the reference boxes; Adjacent boxes are selected based on the principle of adjacent coordinates; Calculate the IoU value between adjacent boxes, set the IoU threshold, and determine whether the detection box is a particle.
[0043] Vectorized computation refers to dividing the acquired image into multiple regions, with each region processed in parallel. Using vectorized computation improves CPU computing efficiency.
[0044] Preprocessing is used to reduce invalid information; Attention U-Net is used to accurately detect small targets; confidence-based active learning enables low-cost iterative optimization; the three work together to achieve efficient, accurate, and continuously evolving small-particle recognition.
[0045] This invention can analyze the number of samples within an image, providing a number for easy individual lookup, then analyze the average particle size and standard deviation, and present the results in a convenient manner. Since most particles are cylindrical or spherical, the particle size calculation formula is automatically adjusted based on their roundness and aspect ratio. See [link / reference]. Figure 9 .
[0046] like Figure 10 , Figure 13 , 14 As shown, this invention can quickly provide box plots for several images, effectively reflecting the characteristics of the original data distribution and allowing for comparison of the distribution characteristics of multiple sets of data. If abnormal data is found, detailed queries can be performed using the data's identifier.
[0047] like Figure 11 , Figure 15 , Figure 16 As shown, this invention can statistically analyze data from all images and present it as a histogram. It reports key information such as particle count and particle size, and can customize different types of reports according to customer needs.
[0048] according to Figure 11 The following statistical results were obtained: 433 spherical particles, minimum particle size 197.1 μm, maximum particle size 444.8 μm, average particle size 331.2 μm, and standard deviation of particle size 37.0 μm.
[0049] according to Figure 15 The following statistical results were obtained: minimum particle size of cylindrical particles: 295.9 μm; maximum particle size: 501.0 μm; average particle size: 404.9 μm; standard deviation of particle size: 27.2 μm; minimum length: 322.8 μm; maximum length: 806.6 μm; average length: 517.2 μm; standard deviation of length: 74.8 μm; roundness: 0.87; aspect ratio: 1.27; d 10 371.3μm; d 50 (Median) 405.6 μm; d 90 438.6μm.
[0050] This invention uses object detection algorithms, such as Anchor-based Mask R-CNN and NMS YOLOv11n, or any model with suitable performance. If a high-performance GPU is used, NMS-free models such as YOLOv10 can also be used.
[0051] Given that the objects to be photographed and identified are highly dispersed particulate matter, this invention, while ensuring the size and cost-effectiveness of the device, selects a CPU-based high-efficiency non-maximum suppression (NMS) algorithm. By accurately eliminating recognition boxes with high overlap, only the results with the highest confidence are retained, thereby significantly improving the accuracy and efficiency of recognition.
[0052] To further ensure a balance between measurement accuracy and computational speed, this invention introduces a high-precision industrial camera and Slice-Assisted Hyper-Inference (SAHI) technology. The core of SAHI technology lies in intelligently segmenting the original image into several easily processed and analyzed slices, and then seamlessly stitching together the detection results of each slice after the object detection task is completed to form a complete recognition result. This process not only optimizes the allocation and use of computing resources but also gives the system greater flexibility and scalability.
[0053] This invention patent application, by subdividing large images into smaller parts, demonstrates that SAHI technology effectively reduces memory usage, making it possible to run high-quality detection tasks on resource-constrained hardware platforms. Furthermore, SAHI's intelligent stitching algorithm accurately preserves key information during the merging of overlapping detection boxes, ensuring detection accuracy while further improving overall detection efficiency.
[0054] This invention integrates the NMS algorithm with SAHI technology, which not only achieves efficient and accurate particulate matter detection with limited hardware resources, but also provides a solid technical foundation and broad expansion space for future applications in more complex scenarios.
[0055] This invention addresses the shortcomings of traditional measurement methods in terms of poor data accuracy, improving detection accuracy to ±0.7 micrometers.
[0056] This invention enables rapid batch detection of large quantities of particles, with a detection speed far exceeding 200 times that of manual inspection, thus reducing the time cost associated with manual inspection.
[0057] The algorithm of this invention will only produce the same result when scanning the same image, which solves the problem of poor repeatability in traditional solutions.
[0058] The data in this invention is stored in a unified and easy-to-understand manner, facilitating research and utilization. Example
[0059] like Figure 17 As shown, the extruded seedling particle size and morphology detection device includes an image acquisition module 100, a preprocessing module 200, a segmentation and fusion module 300, a loading module 400, a seedling particle size and morphology detection model 500, and an output module 600.
[0060] The image acquisition module 100 is used to acquire image data of the extruded seedlings to be detected.
[0061] like Figures 4-7 As shown, the image acquisition module 100 adopts a three-axis linkage servo motor system (X-axis / Y-axis, Z-axis), including a frame 110, an X-axis / Y-axis servo moving platform 120, a Z-axis servo moving platform 130, a high-definition industrial camera module 140, and a ring LED polarized light source 150.
[0062] The X-axis and Y-axis servo moving platform 120 drives a precision translation stage, achieving a sample slot positioning accuracy of ±0.01mm. The Z-axis servo moving platform 120 is equipped with a high-definition industrial camera module 140, which controls the lens lifting and lowering via a closed-loop stepper motor 130, achieving a focusing resolution of ±5μm. The high-definition industrial camera module 140 for image acquisition uses a 2-megapixel CMOS industrial camera 141 and a lens 142, with a frame rate of 30fps; it is paired with a ring-shaped LED polarized light source 150 to eliminate reflection interference, achieving an optical resolution of 3.45μm / pixel and a working distance of 150mm.
[0063] The image acquisition module employs an X-axis and Y-axis servo moving platform, capable of precise movement along the x and y axes. Equipped with a high-resolution camera, the module captures multiple images and, combined with a visual positioning algorithm, achieves precise positioning and detection of target objects. The platform supports nine-point translational calibration, accurately converting image coordinates into mechanical axis coordinates to ensure movement precision.
[0064] The image acquisition module of this invention is a PLC mechanical motion structure. It innovatively designs and implements a fully automatic precision motion control structure driven by a programmable logic controller (PLC). It has precise positioning and coordinated motion capabilities, and can automatically complete key processes such as sampling, adaptive focus adjustment, and unloading after detection. It eliminates the errors and efficiency bottlenecks caused by manual intervention, and provides a stable and repeatable physical operation platform for subsequent high-precision image capture and analysis. It is the key hardware guarantee for the automation and high precision of the entire detection device.
[0065] The visual positioning algorithm described above can be implemented using the following algorithm: (1) The template matching-based localization algorithm uses a standard calibration board / marker point as a template to search for matching positions in the image to achieve coordinate localization; (2) The localization algorithm based on edge detection and contour extraction extracts edges, fits contours and centroids, and obtains the coordinates of the target center by using operators such as Canny and Sobel; (3) Feature-based localization algorithms (such as corner detection) use Harris corner, Shi-Tomasi corner, ORB, SIFT, SURF and other methods to extract feature points to achieve accurate localization; (4) The positioning algorithm based on centroid / centroid calculation calculates the pixel centroid and geometric center of the target area and outputs the center coordinates; (5) The positioning algorithm based on Hough transform is used for positioning circular and rectangular calibration objects, and high-precision positioning is achieved by fitting the center and vertex of the circle; (6) The target localization algorithm based on deep learning, namely the Mask R-CNN / YOLO series you used earlier, outputs the coordinates of the detection box to achieve target localization.
[0066] This invention's image acquisition module integrates a PLC-controlled automated mechanical motion unit and a high-performance image recognition system. Combined with the detection method, it constructs a complete closed-loop detection system for high-precision intelligent detection of extruded seedling feed particle size and morphology. This invention can achieve sub-millimeter or even higher precision particle size measurement and morphological feature analysis for extruded seedling feed with complex shapes and tiny sizes, providing accurate, objective, and reliable quantitative basis for optimizing production process parameters, thereby significantly improving the uniformity and quality stability of feed pellet products.
[0067] This invention presents a slice-based image recognition method based on a high-resolution industrial camera. It employs image preprocessing and intelligent segmentation techniques to efficiently divide a complex overall image into easily parallelizable local slices. After completing independent object detection and feature extraction for each slice, the system uses an advanced image fusion algorithm to seamlessly stitch the local results back together to restore globally accurate recognition information. This architecture not only significantly improves the system's flexibility and scalability in handling complex scenes but also substantially optimizes the efficiency and throughput of the overall detection process.
[0068] This invention uses a high-definition industrial camera module to scan particles below, obtaining a large number of images. Batch processing of these images yields a comprehensive statistical result, outputting key data such as average particle size, standard deviation, defect rate, and expansion ratio. Specifically, for cylindrical particles, the aspect ratio can be determined, and for spherical particles, their roundness error can be output. The output can be presented as images and charts for easy observation, or stored in a database for subsequent data analysis.
[0069] The preprocessing module 200 is used to perform contrast enhancement and candidate region suggestion on the image of the extruded seedling to be detected, so as to obtain the target image data.
[0070] Specifically, this invention employs preprocessing guidance: Key regions are focused on in advance, and before data is input into the model, image enhancement (such as contrast improvement and noise removal) and Region of Interest (ROI) extraction (i.e., candidate region proposal) are performed to weaken the interference of complex backgrounds and highlight small-particle feature information. The effect is to reduce the computational load of the model, avoid "wasting computing power" on massive background information, and make subsequent model training more targeted.
[0071] The segmentation and fusion module 300 is used to segment the target image into several sub-target images using the slice-assisted inference technology SAHI; to segment the particle edges and background of each sub-target image using Attention U-net; to segment the sub-target image into several target detection regions using a sliding window; and to fuse the inference results of the extruded seedling particle size and morphology of each target detection region using the slice-assisted inference technology SAHI.
[0072] The seedling particle size and morphology detection model 500 was trained using a neural network with training data. The training data was obtained by dividing historical target images. Each historical target image was preprocessed using SHAI slicing and then segmented into several historical sub-target images. Attention U-net was used to segment particle edges and background in each historical sub-target image, and a sliding window was used to divide the historical sub-target image into several historical target detection regions. The particle size and morphology of the expanded seedling were detected in each historical target detection region. Loading module 400 is used to load seedling particle size and morphology detection model 500.
[0073] The output module 600 is used to input the target image data into the seedling particle size and morphology detection model to detect the particle size and morphology of the expanded seedling material, and obtain the particle size and morphology results of the expanded seedling material to be detected.
[0074] This invention is used for the identification of tiny particles. The seedling particle size and morphology detection model is used to generate particle detection frames and confidence levels.
[0075] Attention U-Net is used for particle segmentation / contour extraction, segmenting particle edges from the background and generating particle masks to assist seedling particle size and shape detection models in generating more accurate particle masks. Attention U-Net with attention gating is added for puffed seedling particles. SAHI slicing assists super inference by cutting large images into smaller ones for separate recognition and analysis, and then merging them to solve the technical problem of insensitivity to small targets. NMS is optimized to remove duplicates and retain the best bounding boxes. Example
[0076] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of any of the methods in Embodiment 1. Example
[0077] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods in Embodiment 1. Example
[0078] A computer program product, including a computer program, wherein the steps of the method of any one of Embodiment 1 are implemented when the computer program is executed by a processor.
[0079] The above embodiments are only for illustrating the technical features and concepts of the present invention. Their purpose is to enable those skilled in the art to understand the content of the present invention and implement it. They should not be used to limit the scope of protection of the present invention. All equivalent changes or modifications made according to the spirit and embodiments of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A method for detecting the particle size and morphology of expanded seedling feed, characterized in that, include: Acquire images of the extruded seedlings to be detected and perform data preprocessing to obtain the target image; Using the slice-assisted reasoning technique SAHI, the target image is cut into several sub-target images by sliding a window; A particle size and morphology detection model for expanded seedling feed is loaded. This model is trained using a neural network with training images, which are obtained by segmenting historical target images. After preprocessing the historical target images, Attention U-Net is used to segment the particle edges and background of each historical target image, resulting in several historical target detection boxes. The coordinates and corresponding confidence scores of each historical target detection box are marked, and a corresponding mask is generated. Based on the mask, particle size parameters are calculated and particle morphology results are inferred. Each sub-target image is input into the seedling particle size and morphology detection model to perform extruded seedling particle size and morphology detection, and obtain the extruded seedling particle size and morphology inference results for each sub-target image. The inference results of the extruded seedling particle size and morphology of each target image are fused together and filtered using NMS to obtain the detection results of the extruded seedling particle size and morphology of the target image.
2. The method according to claim 1, characterized in that, The training of the extruded seedling particle size and morphology detection model includes the following steps: Obtain the historical image dataset corresponding to the extruded seedling and the morphological category and particle size parameters of the extruded seedling corresponding to the historical image dataset; Based on the historical image dataset corresponding to the extruded seedling and the morphological category and particle size parameters of the extruded seedling corresponding to the historical image dataset, data preprocessing is performed to obtain the historical target image dataset and the extruded seedling morphological label and extruded seedling particle size parameter label corresponding to each historical target image data in the historical target image dataset; The historical target image data is divided into a training dataset and a test dataset. Based on the data importance of the training data, feature selection is performed from the training dataset to obtain the target training data. The target training data is input into the initial extruded seedling particle size and morphology detection model for classification training to obtain training results. Based on the training results and the extruded seedling morphology label and extruded seedling particle size parameter label, the loss is calculated to obtain training loss information. The initial extruded seedling particle size and morphology detection model is updated based on the training loss information to obtain the updated extruded seedling particle size and morphology detection model. The updated extruded seedling particle size and morphology detection model is used as the initial extruded seedling particle size and morphology detection model. The process of inputting the target training data into the initial extruded seedling particle size and morphology detection model for classification training and obtaining training results is repeated until the training completion condition is met, and the extruded seedling particle size and morphology detection model to be tested is obtained. The particle size and morphology detection model of the extruded seedling material to be tested is tested based on the test dataset to obtain test results; when the test results meet the preset test conditions, the particle size and morphology detection model of the extruded seedling material is obtained.
3. The method according to claim 1, characterized in that, The process of acquiring an image of the extruded seedling to be detected and performing data preprocessing to obtain the target image includes: The image of the extruded seedling to be detected is subjected to contrast enhancement and candidate region suggestion to obtain the target image.
4. The method according to claim 1, characterized in that, The filtering using NMS includes: Using NMS, the boxes with high confidence are selected as the baseline in descending order of confidence, and then adjacent boxes are compared to remove duplicates. The detection boxes located at the edges of the sub-target image but in different sub-target images are selected and fused to remove duplicate calculations and incomplete detection boxes.
5. The method according to claim 1, characterized in that, The Attention U-Net includes: Encoder: Responsible for "downsampling" the input image and gradually extracting the high-level semantic features of the image; Decoder: Responsible for "upsampling" the feature map of the encoder, gradually restoring the resolution of the image, and finally outputting a segmentation result with the same size as the input. Skip connections: These directly connect the feature map of a certain layer of the encoder to the corresponding layer of the decoder. The purpose is to pass the detailed information retained by the encoder to the decoder, helping the decoder to locate the target more accurately. The skip connections incorporate an attention gating mechanism, so that when the decoder is upsampling, it generates an attention weight map based on the feature map of the current layer, and uses this attention weight map to apply to the corresponding feature map from the encoder. Features in regions with a higher than the set attention weight value are amplified and propagated. Features in regions with a weight less than the set attention weight are suppressed or weakened.
6. The method according to claim 1, characterized in that, The results of the extruded seedling particle size and morphology include the extruded seedling morphology results and the extruded seedling particle size results; The resulting morphology of the expanded seedling material includes cylindrical and spherical shapes; The particle size results of the expanded seedling include the equivalent circle diameter, width, length, roundness, elongation, rectangularity, quantity, particle size distribution D10, D50, D90, and average particle size of the expanded seedling.
7. A device for detecting the particle size and morphology of expanded seedling feed, characterized in that, The device includes: The image acquisition module is used to acquire image data of the extruded seedling material to be detected. The preprocessing module is used to perform contrast enhancement and candidate region suggestion on the image of the extruded seedling to be detected, so as to obtain target image data; The segmentation and fusion module is used to use the slice-assisted reasoning technology SAHI to segment the target image into several sub-target images through a sliding window, and to fuse the inference results of the extruded seedling particle size and morphology of each target image, and to filter them using NMS. The seedling particle size and morphology detection model is obtained by training a neural network using training images, which are segmented from various historical target images. After preprocessing the historical target images, Attention U-Net is used to segment the particle edges and background of each historical target image, resulting in several historical target detection boxes. The coordinates and corresponding confidence scores of each historical target detection box are labeled, and a corresponding mask is generated. Based on the mask, particle size parameters are calculated, and particle morphology results are inferred. The loading module is used to load the extruded seedling particle size and morphology detection model. The output module is used to input the target image data into the seedling particle size and morphology detection model to detect the particle size and morphology of the expanded seedling, and obtain the particle size and morphology results of the expanded seedling to be detected.
8. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.