A capsule production quality monitoring and management system
In the capsule production quality monitoring system, the capsule images to be detected and the capsule images of known defect types are mixed and clustered, combined with the DBSCAN algorithm, to identify known and unknown defects, solving the problem of high training costs of big data models and improving Improve detection efficiency and accuracy and reduce operating costs.
Patent Information
- Application Number
- CN202411170207.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-26
AI Technical Summary
The big data model training cost of the existing capsule production quality monitoring system is high, resulting in low resource utilization efficiency and strong dependence on professional and technical personnel, which increases operating costs.
The image acquisition module, defect image acquisition module, image mixing module, image classification module and defect analysis module are used to perform clustering processing by mixing the capsule image to be detected and the capsule image of known defect types to identify known and unknown defects, and combine The DBSCAN algorithm performs automatic classification, reducing reliance on high-performance computing facilities.
Without the need for a large amount of training data, the efficiency and accuracy of defect detection are improved, the coverage of defect detection is broadened, the burden of manual classification is reduced, fast and automatic image data processing is achieved, and the adaptability and adaptability of the system are enhanced. Scalability.
Smart Images

Figure CN118691612B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of defect detection, and in particular to a capsule production quality monitoring and management system. Background Art
[0002] With the rapid development of big data and artificial intelligence technology, capsule production quality monitoring and management system has made a major breakthrough in the field of image recognition. With the help of deep learning algorithms, especially the application of convolutional neural networks (CNN), the system can perform in-depth training based on a large and diverse defect database, improving the accuracy and breadth of capsule defect recognition.
[0003] However, although big data and machine learning have brought unprecedented accuracy and efficiency to capsule quality monitoring, the high training cost behind it has become a key factor restricting the popularization and optimization of the technology. Building and maintaining a high-quality image database that covers a wide range of defect types requires a lot of money and human resources. At the same time, the high-performance computing facilities required for deep learning model training, such as GPU clusters, not only have high initial investment costs, but also cost a lot in energy consumption and maintenance. In addition, continuous model optimization and iteration also increase the dependence on professional technicians, further pushing up the overall operating costs. Therefore, how to reduce training costs and optimize resource utilization efficiency while maintaining defect detection performance has become one of the core issues that need to be solved in this field. Summary of the invention
[0004] In order to solve at least one of the technical problems mentioned above, the present invention provides a capsule production quality monitoring and management system to solve the problem of high big data model training cost in the current capsule production quality monitoring system.
[0005] A capsule production quality monitoring and management system is provided, the system is used for capsule defect detection in the capsule production quality monitoring and management process, comprising:
[0006] An image acquisition module is used to acquire an overall capsule image including a plurality of capsules to be detected, wherein the overall capsule image includes images of capsules with defects and images of capsules without defects; based on capsule sizes, the overall capsule image is segmented into a plurality of first capsule images including a single capsule to obtain a first capsule image set;
[0007] A reference defect image acquisition module is used to acquire a second capsule image set from a defect type database, wherein the second capsule image set includes a plurality of second capsule images of M different defect types, where M is a positive integer;
[0008] An image mixing module, used for mixing the first capsule image set and the second capsule image set to obtain a third capsule image set for defect classification;
[0009] an image classification module, configured to perform a preset clustering process on the third capsule image set to obtain N classification data sets, where N is a positive integer greater than M;
[0010] The defect analysis module is used to obtain a normal type set, a plurality of first defect capsule images of unknown defects, and a plurality of second defect capsule images of known defects according to the distribution of the plurality of first capsule images and M types of the second capsule images in the N classification data sets.
[0011] Preferably, obtaining a normal type set, a plurality of first defect capsule images of unknown defects, and a plurality of second defect capsule images of known defects according to the distribution of the plurality of M types of the first capsule images and the second capsule images in the N classification data sets includes:
[0012] Detect and mark the classified data set with the largest number as the normal type set, and detect whether the difference between N and M is greater than 1. If so, mark the classified data set that does not contain the second capsule image as an unknown defect type set, and determine that the image in the unknown defect type set is the first defect capsule image. If not, based on the distribution of different defect type images of the second capsule image set in multiple classified data sets, the first capsule image in the classified data set containing the corresponding known defect type image is labeled with a defect type to obtain multiple second defect capsule images of different defect types.
[0013] Preferably, performing a preset clustering process on the third capsule image set to obtain N classification data sets includes:
[0014] Determining clustering parameters based on the defect data in the defect type database, wherein the clustering parameters include a neighborhood radius and a number of neighborhood points required for a core point;
[0015] Based on the clustering parameters, the DBSCAN algorithm is used to classify the third capsule image set to obtain N classified data sets.
[0016] Preferably, the system further comprises:
[0017] The defect type database updating module is used to manually mark the first defect capsule image with a new defect type after acquiring the first defect capsule image, and update the defect type database.
[0018] Preferably, the step of segmenting the whole capsule image into a plurality of first capsule images including a single capsule based on the capsule size to obtain a first capsule image set comprises:
[0019] Performing denoising and binarization preprocessing on the overall capsule image to obtain a binary image;
[0020] The edge Canny algorithm is used to perform edge detection on the binary image, and image extraction is performed on the overall capsule image based on the edge detection result and the capsule size, and the first capsule image set is obtained by integrating the extracted multiple results.
[0021] Preferably, the system further comprises:
[0022] The defect type capsule sorting module is used to sort the first defect capsule image and the second defect capsule image by starting a sorting unit according to the defect type label output by the defect analysis module.
[0023] Preferably, the defect type is a combination of multiple single defect types.
[0024] Preferably, the single defect types include: bubble type, spot type and deformation type.
[0025] Preferably, when the defect type includes the bubble type, the system further comprises:
[0026] The oblique parallel light source module is used to provide a group of parallel light sources and irradiate the capsule carrying platform at a preset non-vertical angle.
[0027] Preferably, the defect analysis module further includes:
[0028] The abnormal alarm unit is used to stop the capsule production process and report to the administrator when the percentage of the number of the first capsule images in the normal type set to the total number of the first capsule images is less than a preset safety threshold.
[0029] The beneficial effects of the present invention are:
[0030] (1) By mixing the capsule images to be detected with capsule images of known defect types and then performing clustering processing, it is possible to directly screen out a variety of known defect images and unknown defect images from the production line by analyzing the clustering processing results without the need for a large amount of training data, significantly improving the efficiency and accuracy of defect detection;
[0031] (2) It can effectively identify known defects and proactively discover and mark unknown defects by analyzing the distribution of different defect type images in the second capsule image set in multiple classification data sets, greatly broadening the coverage of defect detection and reducing blind spots in quality control;
[0032] (3) The clustering parameters of the DBSCAN algorithm are adaptively set under the guidance of the defect database to achieve fast and automatic classification of capsule images, significantly improving the efficiency of processing large-scale image data sets and reducing the workload of manual classification. Furthermore, it is independent of the preset number of clusters and can flexibly adapt to the increase or decrease of capsule defect types. It can automatically cluster and identify new defect types, enhancing the adaptability and scalability of the system.
[0033] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.
[0035] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to illustrate the technical solutions disclosed in the present invention.
[0036] Figure 1 A schematic diagram of the structure of a capsule production quality monitoring and management system provided by an embodiment of the present invention;
[0037] Figure 2 A flow chart of a capsule production quality monitoring and management method provided by an embodiment of the present invention;
[0038] Figure 3 A schematic flow chart of a method for identifying a normal type set, a first defect capsule image, and a second defect capsule image provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0041] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0042] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0043] In addition, in order to better illustrate the present invention, numerous specific details are provided in the following specific embodiments. It should be understood by those skilled in the art that the present invention can be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present invention.
[0044] At present, the existing capsule production quality monitoring system has the problem of high cost of big data model training.
[0045] Example
[0046] Provides a capsule production quality monitoring and management system, reference Figure 1 The system is used for capsule defect detection in the capsule production quality monitoring and management process, including:
[0047] The image acquisition module 100 is used to acquire an overall capsule image including a plurality of capsules to be inspected, wherein the overall capsule image includes images of capsules with defects and images of capsules without defects; and to divide the overall capsule image into a plurality of first capsule images including a single capsule based on the capsule size to obtain a first capsule image set;
[0048] Referring to the defect image acquisition module 200, it is used to acquire a second capsule image set from a defect type database, wherein the second capsule image set includes a plurality of second capsule images of M different defect types, where M is a positive integer;
[0049] An image mixing module 300, configured to mix the first capsule image set and the second capsule image set to obtain a third capsule image set for defect classification;
[0050] An image classification module 400, configured to perform a preset clustering process on the third capsule image set to obtain N classification data sets, where N is a positive integer greater than M;
[0051] The defect analysis module 500 is used to obtain a normal type set, a plurality of first defect capsule images of unknown defects, and a plurality of second defect capsule images of known defects according to the distribution of the plurality of first capsule images and M types of the second capsule images in the N classification data sets.
[0052] In this embodiment, the image acquisition module uses a high-resolution camera to take real-time photos of the capsules on the production line to ensure that the complete appearance information of each capsule is captured. Through an accurate image segmentation algorithm, the overall capsule image can be automatically and accurately segmented into images of individual capsules based on the actual size of the capsule to form a first capsule image set. This process ensures the accuracy of subsequent analysis. Each image focuses only on a single capsule, reducing the influence of complex background and interference from adjacent capsules. The reference defect image acquisition module is connected to a detailed defect type database, which includes a high-quality second capsule image set of M known defect types. These defect types cover a variety of defect situations from slight damage to severe deformation, providing a benchmark for defect identification. The image mixing module innovatively performs intelligent mixing processing on the first capsule image set actually collected and the second capsule image set referenced to generate a third capsule image set. The image classification module uses advanced unsupervised learning algorithms, such as autoencoders combined with clustering algorithms (such as DBSCAN or K-means++), to process the mixed third capsule image set. Through iterative optimization, it automatically discovers N cluster centers in the capsule image. These clusters not only contain the known M types of defects, but may also reveal new and unknown defect patterns, that is, N>M, and have the ability to identify potential new defects. The defect analysis module further analyzes the image features in each cluster, and by comparing the proportion and feature similarity of the first capsule image and the second capsule image in each classification, it identifies the typical feature set of normal capsules (normal type set), and distinguishes capsule images of known defects and unknown defects (first defect capsule image and second defect capsule image). For known defects, it can accurately classify and quantify their severity; for unknown defects, they are marked as potential problems that require further analysis, providing a basis for subsequent manual review or model iteration.
[0053] In this embodiment, by mixing the capsule image to be detected with the capsule image of the known defect type and then performing clustering processing, it is possible to directly screen out a variety of known defect images and unknown defect images from the production line by analyzing the clustering processing results without the need for a large amount of training data, thereby significantly improving the efficiency and accuracy of defect detection.
[0054] Preferably, according to the distribution of the plurality of first capsule images and the M second capsule images in the N classification data sets, a normal type set, a plurality of first defect capsule images of unknown defects and a plurality of second defect capsule images of known defects are obtained, and reference is made to Figure 3 ,include:
[0055] S510, detecting and marking the classification data set with the largest number as a normal type set;
[0056] S520, and detect whether the difference between N and M is greater than 1. If so, mark the classification data set that does not contain the second capsule image as an unknown defect type set, and determine that the image in the unknown defect type set is the first defect capsule image. If not, based on the distribution of different defect type images of the second capsule image set in multiple classification data sets, the first capsule image in the classification data set containing the corresponding known defect type image is labeled with the defect type to obtain multiple second defect capsule images of different defect types.
[0057] In this embodiment, the defect analysis module identifies the classification data set with the largest number of images by counting the number of images in each classification data set, and marks it as a normal type set. This is based on the fact that normal capsule images tend to naturally form the largest category in the clustering process due to their large number and consistent features. Further, the difference between N (the total number of classification data sets) and M (the number of known defect types) is calculated. If the difference is greater than 1, it means that in addition to the known defects, there is at least one unknown defect type, and then all classification data sets are screened to exclude those classifications that obviously contain the second capsule image (known defect image). The remaining unlabeled classification data sets that do not contain any known defect images are marked as unknown defect type sets. The images contained in these unknown defect type sets are regarded as first defect capsule images, representing new defect forms that are not recorded in the current database. On the contrary, if the difference between N and M is not greater than 1, it indicates that each additional classification data set corresponds to a known defect. The feature matching degree of various known defect type images in the second capsule image set is compared with each classification data set. For example, through similarity analysis of visual features such as shape, bubbles, and color, the classification data set containing the first capsule image matching the known defect type image can be accurately labeled as the corresponding defect type, generating multiple second defect capsule image sets of different defect types.
[0058] This embodiment can not only effectively identify known defects, but also actively discover and mark unknown defects by analyzing the distribution of different defect type images of the second capsule image set in multiple classification data sets, which greatly broadens the coverage of defect detection and reduces the blind spots of quality control.
[0059] Preferably, a preset clustering process is performed on the third capsule image set to obtain N classification data sets, including:
[0060] Determine clustering parameters based on defect data in a defect type database, the clustering parameters including a neighborhood radius and the number of neighborhood points required for a core point;
[0061] Based on the clustering parameters, the DBSCAN algorithm is used to classify the third capsule image set to obtain N classification data sets.
[0062] In this embodiment, by analyzing the image features of various defect types recorded in the database, the clustering parameters most suitable for the current task are calculated. These parameters mainly include the neighborhood radius (ε) and the number of neighborhood points required for the core point (MinPts). The neighborhood radius reflects the maximum distance threshold for two points in the image feature space to be considered "adjacent", while the number of neighborhood points required for the core point defines the number of neighboring points required for a point to become a clustering core. The selection of these two parameters is directly related to the accuracy and stability of the clustering effect of the DBSCAN algorithm. The DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm is used to perform detailed clustering processing on the third capsule image set using the above-obtained parameters. DBSCAN is a density-based clustering algorithm that can effectively identify clusters of any shape and exclude noise points. It is very suitable for processing data sets that may have complex distributions such as capsule images. During the operation of the algorithm, high-density areas can be automatically identified as the core part of the cluster, while points in low-density areas are marked as noise points or boundary points. After being processed by the DBSCAN algorithm, the originally disorganized capsule image set was divided into N classification data sets with significant feature differences. The images within each data set shared similar features, representing specific capsule states or defect types, laying a solid foundation for subsequent fine classification and quality assessment.
[0063] In this embodiment, by combining the adaptive parameter setting under the guidance of the defect database and the DBSCAN algorithm, the capsule image is quickly and automatically classified, which significantly improves the efficiency of processing large-scale image data sets and reduces the workload of manual classification. Furthermore, this embodiment does not rely on the preset number of clusters, can flexibly adapt to the increase and decrease of capsule defect types, and can automatically cluster and identify new defect types, thereby enhancing the adaptability and scalability of the system.
[0064] Preferably, the system further comprises:
[0065] The defect type database updating module is used to manually mark the first defect capsule image with a new defect type after acquiring the first defect capsule image, and to update the defect type database.
[0066] In this embodiment, when the defect analysis module identifies the first defect capsule images, that is, those capsule images that cannot be classified into existing known defect types, these images are isolated and stored in a temporary "pending review" database. Subsequently, the quality control experts or professional inspectors are notified to manually review these "pending review" images. Based on their rich experience and professional knowledge, the experts carefully analyze the characteristics of these images to determine whether they represent a new defect type. Once confirmed as a new type, the experts will describe and classify these first defect capsule images in detail, and create corresponding marking information for this new defect type in the system. At the same time, the defect type database update module is responsible for receiving these new defect type marks from manual review and integrating relevant information into the defect type database. The update content includes not only the name, description, and typical image examples of the new defect type, but may also cover the cause of the defect, the scope of impact, and the recommended treatment measures. Through such a mechanism, the defect type database can be continuously enriched and improved, providing a more comprehensive and accurate basis for subsequent image recognition and classification.
[0067] In this embodiment, through manual review and confirmation, newly discovered defect types are accurately labeled, reducing misjudgments caused by automated recognition errors and further improving the overall detection accuracy.
[0068] Preferably, the whole capsule image is segmented into a plurality of first capsule images containing a single capsule based on the capsule size, to obtain a first capsule image set, including:
[0069] The whole capsule image is subjected to denoising and binarization preprocessing to obtain a binary image;
[0070] The edge Canny algorithm is used to perform edge detection on the binary image, and the overall capsule image is extracted based on the edge detection result and the capsule size. The multiple extracted results are integrated to obtain the first capsule image set.
[0071] In this implementation, the random noise in the image can be effectively removed by performing median filtering or bilateral filtering denoising on the collected overall capsule image, while retaining the edge details and structural information of the capsule image as much as possible, laying a good foundation for subsequent processing. The denoised image is binarized, and the image is converted into a black and white binary form by selecting a suitable threshold method (such as the Otsu adaptive threshold method), in which the capsule part is usually white and the background is black, which significantly highlights the capsule outline and simplifies the complexity of subsequent processing. The Canny edge detection algorithm is used to extract the edge of the binary image, and the continuous and accurate edges of the capsule are effectively identified through the double threshold strategy. This process is crucial for the accurate measurement of the capsule size and ensures the accuracy of subsequent segmentation. Based on the edge information obtained by the Canny algorithm, the image segmentation operation is further performed. By analyzing the geometric features of the capsule edge and combining the preset or automatically estimated capsule size parameters, the part of the single capsule can be intelligently identified and cut out, and accurate separation can be achieved even when the capsules overlap or are densely arranged. Each successfully segmented single capsule image is then integrated to form a high-quality first capsule image set.
[0072] Preferably, the system further comprises:
[0073] The defect type capsule sorting module is used to sort the first defect capsule image and the second defect capsule image by starting the sorting unit according to the defect type label output by the defect analysis module.
[0074] In this embodiment, once the defect analysis module completes the classification of capsule images, determines the specific types of the first defect capsule image (representing unknown defects) and the second defect capsule image (representing known defects), and assigns corresponding defect labels to them, this information will be immediately transmitted to the defect type capsule sorting module. The sorting unit is usually composed of a series of high-speed robotic arms, a visual positioning system, and a precision conveyor belt. The visual positioning unit quickly locks the exact position of the corresponding defect capsule on the production line based on the image position information provided by the defect analysis module. The robotic arm uses these positioning information and cooperates with high-precision suction cups or clamping devices to accurately grasp the identified defective capsules and place them in different preset collection containers or channels according to their defect types. The unknown defect capsules corresponding to the first defect capsule image may be sent to a special analysis or re-inspection area, while the known defect capsules indicated by the second defect capsule image are directly sent to the corresponding processing links, such as rejection, repair stations, or quality review areas. It should be noted that the automated sorting process significantly improves the speed of defective capsule processing and reduces manual intervention. At the same time, sorting is based on precise image analysis results, ensuring high-precision classification, reducing classification errors, and improving the efficiency of the entire production process.
[0075] Preferably, the defect type is a combination of multiple single defect types.
[0076] Preferably, the single defect types include: bubble type, spot type and deformation type.
[0077] In this embodiment, in view of the complexity of capsule defects, the system is allowed to identify and process the combination of multiple single defect types. Specifically, the system can not only individually identify typical capsule defects such as bubbles, spots and deformations, but also intelligently analyze and mark those composite defect capsules that simultaneously exhibit two or more defect characteristics. For example, a capsule may have bubbles and spots at the same time, or a combination of deformations and bubbles. That is, when the single defect types are bubbles, spots and deformations, the corresponding defect types are "bubble type", "spot type", "deformation type", "bubble spot type", "bubble deformation type", "spot deformation type" and "bubble spot deformation type" through combination. The ability to identify composite defect types enables the system to provide more in-depth defect analysis reports, help producers understand the complex mechanism of defect generation, and provide more specific data support for optimizing production processes.
[0078] Preferably, when the defect type includes bubbles, the system further comprises:
[0079] The oblique parallel light source module is used to provide a group of parallel light sources and irradiate the capsule carrying platform at a preset non-vertical angle.
[0080] In this embodiment, the oblique parallel light source module is equipped with a group of high-performance LED lamps or other suitable light sources, which can emit uniform, intensity-controllable parallel light beams. Different from the traditional vertical lighting method, these light sources are inclined to illuminate the capsule supporting platform at a preset non-vertical angle (such as 45 degrees or other optimal angles, depending on the capsule material and the expected observation effect). The capsule is placed under such lighting conditions. The non-vertical angle illumination condition is set mainly because the reflection on the capsule surface under vertical illumination will affect the identification of bubbles. Compared with direct vertical illumination, the oblique light source reduces the interference of uneven gloss, color or material on the capsule surface on bubble identification, avoids misjudgment due to surface reflection or occlusion, and ensures effective monitoring of bubble defects.
[0081] Preferably, the defect analysis module further includes:
[0082] The abnormal alarm unit is used to stop the capsule production process and report to the administrator when the percentage of the number of first capsule images in the normal type set to the total number of first capsule images is less than a preset safety threshold.
[0083] In this embodiment, the defect analysis module continuously monitors and counts the number of normal type capsule images in the first capsule image set obtained from the image acquisition module. By setting a preset safety threshold (for example, assuming that normal capsule images should account for more than 98% of the total images), the system can evaluate the stability of the production process in real time. When the defect analysis module calculates that the percentage of the number of first capsule images in the normal type set to the total number of first capsule images is lower than the preset safety threshold, it indicates that there may be batch problems on the production line, such as raw material problems, equipment failures, or abnormal process parameters. At this time, the abnormal alarm unit is immediately started to perform the following two key operations: the system automatically sends instructions to the production line control system to prompt the production line to shut down urgently to avoid continuing to produce capsules that may have defects, thereby preventing resource waste and market recall risks; the system immediately reports the abnormal situation to the production line manager or quality control department through email, SMS or directly popping up a warning notification on the central monitoring interface. The notification contains the time when the abnormality occurred, the estimated scope of impact, and the recommended preliminary response measures, so that the management personnel can quickly intervene in the investigation and take corresponding measures to restore the production order.
[0084] In this embodiment, the abnormal alarm mechanism can achieve immediate response to production abnormalities, avoid large-scale production of unqualified products due to quality problems, effectively control quality risks, and protect corporate reputation and consumer safety. At the same time, by promptly stopping problematic production, subsequent rework and scrap costs are reduced, the problem investigation and resolution cycle is shortened, and production efficiency and economic benefits are guaranteed.
[0085] In a possible embodiment, the present invention also provides a capsule production quality monitoring and management method, referring to Figure 2 ,include:
[0086] S100, collecting an overall capsule image including a plurality of capsules to be detected, and dividing the overall capsule image into a plurality of first capsule images including a single capsule based on capsule sizes, to obtain a first capsule image set.
[0087] S200 , obtaining a second capsule image set from a defect type database, where the second capsule image set includes a plurality of second capsule images of M different defect types, where M is a positive integer.
[0088] S300: Mix the first capsule image set and the second capsule image set to obtain a third capsule image set.
[0089] S400 , performing a preset clustering process on the third capsule image set to obtain N classification data sets, where N is a positive integer greater than M.
[0090] S500, obtaining a normal type set, a plurality of first defect capsule images of unknown defects, and a plurality of second defect capsule images of known defects according to the distribution of the plurality of first capsule images and M types of second capsule images in N classification data sets.
[0091] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A capsule production quality monitoring and management system, characterized in that: The system is used for capsule defect detection in the capsule production quality monitoring and management process, including: An image acquisition module is used to acquire an overall capsule image including a plurality of capsules to be detected, wherein the overall capsule image includes images of capsules with defects and images of capsules without defects; based on capsule sizes, the overall capsule image is segmented into a plurality of first capsule images including a single capsule to obtain a first capsule image set; A reference defect image acquisition module is used to acquire a second capsule image set from a defect type database, wherein the second capsule image set includes a plurality of second capsule images of M different defect types, where M is a positive integer; An image mixing module, used for mixing the first capsule image set and the second capsule image set to obtain a third capsule image set for defect classification; an image classification module, configured to perform a preset clustering process on the third capsule image set to obtain N classification data sets, where N is a positive integer greater than M; a defect analysis module, configured to obtain a normal type set, a plurality of first defect capsule images of unknown defects, and a plurality of second defect capsule images of known defects according to the distribution of the plurality of first capsule images and M types of second capsule images in the N classification data sets; The obtaining, according to the distribution of the plurality of the first capsule images and the M types of the second capsule images in the N classification data sets, a normal type set, a plurality of first defect capsule images of unknown defects, and a plurality of second defect capsule images of known defects comprises: Detect and mark the classification data set with the largest number as the normal type set, and detect whether the difference between N and M is greater than 1. If so, mark the classification data set that does not contain the second capsule image as an unknown defect type set, and determine that the image in the unknown defect type set is a first defect capsule image. If not, based on the distribution of different defect type images of the second capsule image set in multiple classification data sets, the first capsule image in the classification data set containing the corresponding known defect type image is labeled with a defect type to obtain multiple second defect capsule images of different defect types; The defect type is a combination of multiple single defect types; The single defect types include: bubble type, spot type and deformation type; When the defect type includes the bubble type, the system further includes: The oblique parallel light source module is used to provide a group of parallel light sources and irradiate the capsule carrying platform at a preset non-vertical angle.
2. A capsule production quality monitoring and management system according to claim 1, characterized in that: The performing of a preset clustering process on the third capsule image set to obtain N classification data sets includes: Determining clustering parameters based on the defect data in the defect type database, wherein the clustering parameters include a neighborhood radius and a number of neighborhood points required for a core point; Based on the clustering parameters, the DBSCAN algorithm is used to classify the third capsule image set to obtain N classified data sets.
3. The capsule production quality monitoring and management system according to claim 1, characterized in that: The system further comprises: The defect type database updating module is used to manually mark the first defect capsule image with a new defect type after acquiring the first defect capsule image, and update the defect type database.
4. The capsule production quality monitoring and management system according to claim 1, characterized in that: The step of segmenting the whole capsule image into a plurality of first capsule images including a single capsule based on the capsule size to obtain a first capsule image set includes: Performing denoising and binarization preprocessing on the overall capsule image to obtain a binary image; The edge Canny algorithm is used to perform edge detection on the binary image, and image extraction is performed on the overall capsule image based on the edge detection result and the capsule size, and the first capsule image set is obtained by integrating the extracted multiple results.
5. The capsule production quality monitoring and management system according to claim 1, characterized in that: The system further comprises: The defect type capsule sorting module is used to sort the first defect capsule image and the second defect capsule image by starting a sorting unit according to the defect type label output by the defect analysis module.
6. The capsule production quality monitoring and management system according to claim 1, characterized in that: The defect analysis module also includes: The abnormal alarm unit is used to stop the capsule production process and report to the administrator when the percentage of the number of the first capsule images in the normal type set to the total number of the first capsule images is less than a preset safety threshold.
Citation Information
Patent Citations
High-speed unordered capsule defect detecting system
CN102507598A
Capsule defect detection system deployment method, capsule defect detection system and capsule defect detection method
CN118210517A
