CN114603912A - Tablet press sticking adjusting method and system based on artificial intelligence - Google Patents

Tablet press sticking adjusting method and system based on artificial intelligence Download PDF

Info

Publication number
CN114603912A
CN114603912A CN202210253151.2A CN202210253151A CN114603912A CN 114603912 A CN114603912 A CN 114603912A CN 202210253151 A CN202210253151 A CN 202210253151A CN 114603912 A CN114603912 A CN 114603912A
Authority
CN
China
Prior art keywords
dimensional gaussian
image
model
pressure parameter
powder
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210253151.2A
Other languages
Chinese (zh)
Other versions
CN114603912B (en
Inventor
王由发
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Minghan Intelligent Technology Co ltd
Original Assignee
Jiangsu Minghan Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Minghan Intelligent Technology Co ltd filed Critical Jiangsu Minghan Intelligent Technology Co ltd
Priority to CN202210253151.2A priority Critical patent/CN114603912B/en
Publication of CN114603912A publication Critical patent/CN114603912A/en
Application granted granted Critical
Publication of CN114603912B publication Critical patent/CN114603912B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B30PRESSES
    • B30BPRESSES IN GENERAL
    • B30B15/00Details of, or accessories for, presses; Auxiliary measures in connection with pressing
    • B30B15/26Programme control arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0014Image feed-back for automatic industrial control, e.g. robot with camera
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mechanical Engineering (AREA)
  • Robotics (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of artificial intelligence, in particular to a tablet press sticking adjusting method and system based on artificial intelligence. The adjusting method comprises the following steps: collecting a surface image of a punch of a tablet press, and acquiring a current pressure parameter corresponding to the surface image; preprocessing the surface image to obtain a gray image; inputting the pressure parameters into a condition variation self-coding network to obtain a simulation image; obtaining a height ratio before and after sticking according to the gray level image, and obtaining the pixel sum of the analog image by taking the height ratio as the weight of the corresponding pixel point in the analog image; and the pressure parameter corresponding to the simulated image with the minimum pixel sum is an optimal pressure parameter, and the pressure parameter of the pressure punch is adjusted according to the difference between the optimal pressure parameter and the current pressure parameter. The technical problems that the requirement on subjective ability of staff is high and correction efficiency is low due to manual adjustment of pressure parameters and repeated test and calibration at present are solved.

Description

Tablet press sticking adjusting method and system based on artificial intelligence
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a tablet press sticking adjusting method and system based on artificial intelligence.
Background
In the pharmaceutical industry, tablets produced by a tablet press are one of main products in the pharmaceutical industry, and during the tablet production process of the tablet press, the most common and most difficult-to-avoid product quality problem is the sticking defect of the tablets. The defect of sticking of the tablet refers to the phenomenon that part of powder sticks to the upper punch and the lower punch in the process of pressing the pharmaceutical raw material powder into the tablet in the die cavity. The sticking defect is caused by many reasons, and the main reason is that the pressure parameter of the tablet press is set improperly, powder is stuck on the surface of a punch, so that the material cannot be completely pressed into tablets, and the medicine defect is caused.
The traditional mode for detecting the sticking defect is to judge whether the sticking defect occurs or not by detecting whether a pit or a non-smooth phenomenon occurs on the surface of a medicine. The surface of the medicine does not require smooth medicine, and fine dents on the surface cannot be accurately detected. The treatment after the defect occurs usually depends on an experienced operator to synthesize the amount of powder stuck on the punch and the current pressure parameter, try to adjust the pressure parameter, and repeatedly test by using the adjusted pressure parameter until the working state without sticking is achieved.
In practice, the inventors found that the above prior art has the following disadvantages:
after sticking occurs, the method of manually adjusting the pressure parameters and repeatedly testing has higher requirements on the subjective ability of staff and lower correction efficiency.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a tablet press sticking adjusting method and system based on artificial intelligence, and the adopted technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for adjusting a sticking punch of a tablet press based on artificial intelligence, the method comprising:
collecting a surface image of a punch of a tablet press, and acquiring a current pressure parameter corresponding to the surface image; preprocessing the surface image to obtain a gray image;
inputting the pressure parameters into a condition variation self-coding network to obtain a simulation image;
obtaining the height ratio of the powder before and after sticking according to the gray image, and obtaining the pixel sum of the simulated image by taking the height ratio as the weight of the corresponding pixel point in the simulated image;
and the pressure parameter corresponding to the simulated image with the minimum pixel sum is an optimal pressure parameter, and the pressure parameter of the pressure punch is adjusted according to the difference between the optimal pressure parameter and the current pressure parameter.
Further, the conditional variation self-coding network is a network which takes different pressure parameters as labels and takes the sum of difference loss between the generated distribution and the normal distribution and mean square error loss between the sample image and the generated image as a loss function.
Further, a loss of mean square error between the sample image and the generated simulated image, further comprising: and acquiring the distribution parameters of powder in the sample image of each pressure parameter, distributing different first weights according to different distribution parameters corresponding to different pressure parameters, and performing weighted summation of the mean square error between the sample image and each pixel point in the generated image and the corresponding first weight to obtain the mean square error loss.
Further, the step of obtaining a distribution parameter of the powder in the sample image for each of the pressure parameters includes: the sample image corresponding to each pressure parameter is a target sample image, a first Gaussian mixture model of powder distribution in each target sample image is obtained, and the first Gaussian mixture model is formed by mixing a plurality of two-dimensional Gaussian models; fitting the two-dimensional Gaussian models corresponding to all the first Gaussian mixture models under the pressure parameters to obtain a target Gaussian mixture model; and obtaining the model parameters of each first Gaussian mixture model in the target Gaussian mixture model through an EM (effective magnetic field) algorithm, wherein the model parameters of each first Gaussian mixture model are the distribution parameters of the powder.
Further, the step of fitting all the two-dimensional gaussian models under the pressure parameter to obtain a target mixture gaussian model includes: dividing the two-dimensional Gaussian model under the pressure parameter into a two-dimensional Gaussian model corresponding to the distribution characteristic of powder and a two-dimensional Gaussian model corresponding to the distribution characteristic of noise according to the similarity of the model parameters of the two-dimensional Gaussian model; and redistributing the second weight corresponding to the two-dimensional Gaussian model corresponding to the distribution characteristic of the noise to the two-dimensional Gaussian model corresponding to the distribution characteristic of the powder to obtain the target mixed Gaussian model.
Further, according to the similarity of the model parameters of the two-dimensional gaussian model, the step of dividing the two-dimensional gaussian model under the pressure parameters into a two-dimensional gaussian model corresponding to the distribution characteristics of the powder and a two-dimensional gaussian model corresponding to the distribution characteristics of the noise includes: obtaining Euclidean distance of the mean value of each two-dimensional Gaussian model in the first mixed Gaussian models relative to the center of the punch to obtain Euclidean distance sequences, and obtaining similarity among the Euclidean distance sequences corresponding to the first mixed Gaussian models under the same pressure parameter, wherein the two-dimensional Gaussian model corresponding to the similar distance sequences is the two-dimensional Gaussian model corresponding to the distribution characteristics of the powder, otherwise, the two-dimensional Gaussian model corresponding to the distribution characteristics of the noise.
Further, according to the similarity of the model parameters of the two-dimensional gaussian model, the step of dividing the two-dimensional gaussian model under the pressure parameters into a two-dimensional gaussian model corresponding to the distribution characteristics of the powder and a two-dimensional gaussian model corresponding to the distribution characteristics of the noise includes: and calculating the similarity of the angles of the mean value sequences corresponding to the first mixed Gaussian models relative to the position of the circle center of the punch under the same pressure parameter, wherein the two-dimensional Gaussian models corresponding to the similar angle sequences are the two-dimensional Gaussian models corresponding to the distribution characteristics of the powder, and otherwise, the two-dimensional Gaussian models corresponding to the distribution characteristics of the noise.
Further, according to the similarity of the model parameters of the two-dimensional gaussian model, the step of dividing the two-dimensional gaussian model under the pressure parameters into a two-dimensional gaussian model corresponding to the distribution characteristics of the powder and a two-dimensional gaussian model corresponding to the distribution characteristics of the noise includes: and calculating the similarity of covariance sequences corresponding to the first mixed Gaussian models under the same pressure parameter, wherein the two-dimensional Gaussian model corresponding to the similar covariance sequence is the two-dimensional Gaussian model corresponding to the distribution characteristic of the powder, and otherwise, the two-dimensional Gaussian model corresponding to the distribution characteristic of the noise.
In a second aspect, embodiments of the present invention further provide an artificial intelligence based tablet press sticking adjustment system, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of any one of the above methods when executing the computer program.
The invention has the following beneficial effects:
the embodiment of the invention acquires the surface image of the punch of the tablet press and acquires the current pressure parameter corresponding to the surface image; preprocessing the surface image to obtain a gray image; inputting the pressure parameters into a condition variation self-coding network to obtain a simulation image; obtaining a height ratio before and after sticking according to the gray level image, and obtaining the pixel sum of the analog image by taking the height ratio as the weight of the corresponding pixel point in the analog image; and the pressure parameter corresponding to the simulated image with the minimum pixel sum is an optimal pressure parameter, and the pressure parameter of the pressure punch is adjusted according to the difference between the optimal pressure parameter and the current pressure parameter. The technical problems that the requirement on subjective ability of staff is high and correction efficiency is low due to manual adjustment of pressure parameters and repeated test and calibration at present are solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for adjusting a sticking punch of a tablet press based on artificial intelligence according to an embodiment of the present invention;
FIG. 2 is a schematic illustration of a grayscale image of a punch face provided by one embodiment of the present invention;
FIG. 3 is a flowchart of the steps for obtaining the distribution parameters of the powder in the sample image for each pressure parameter;
FIG. 4 is a flowchart of the steps of fitting a target mixture Gaussian model;
FIG. 5 is a flowchart of the steps for obtaining a two-dimensional Gaussian model corresponding to the distribution characteristics of powder and noise;
FIG. 6 is a diagram illustrating a vector of the center of the punch pointing to the mean.
Detailed Description
In order to further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description will be given to a method and a system for adjusting the sticking of a tablet press based on artificial intelligence according to the present invention, with reference to the accompanying drawings and preferred embodiments, and the detailed description thereof will be provided below. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
According to the embodiment of the invention, the camera is arranged on the tablet press, the surface image of the upper punch is collected through the camera, and the corresponding pressure adjusting parameter is fed back through the analysis and the processing of the surface image, so that the punch reaches the optimal working state, the phenomenon that powder is adhered to the punch is avoided, and the problem that the pressure parameter is adjusted by experience in the prior art is solved. In the examples of the present invention, white powder is exemplified.
The invention provides a method and a system for adjusting the sticking of a tablet press based on artificial intelligence.
Referring to fig. 1, a flow chart of a method for adjusting a sticking of a tablet press based on artificial intelligence according to an embodiment of the present invention is shown, wherein the method comprises the following steps:
s001, collecting a surface image of a punch of the tablet press, and acquiring a current pressure parameter corresponding to the surface image; and preprocessing the surface image to obtain a gray image.
The camera gathers the surface image of drift, and the mounted position of camera is with taking the drift surface image as the standard. The optimal installation position of the camera is to be capable of acquiring an orthographic image of the surface of the punch, namely when the outer edge of the punch is circular, the imaging edge in the image of the surface of the punch is also circular. And arranging a camera about the punch closest to the outer side in the discharge port of the tablet press.
The acquired surface image of the punch is an RGB image, and the step of preprocessing the surface image comprises graying the surface image to obtain a grayscale image and performing threshold segmentation on the grayscale image for multiple times to obtain a powder image.
Specifically, a gray histogram of a gray image is obtained, and since the pixel point of the powder is a brighter pixel point, and the pixel of the punch region and the pixel of the powder are greatly different from the pixel of the background region, threshold segmentation is performed based on the lowest point of the gray histogram: setting the background pixel to zero and keeping the gray values of other pixels. And carrying out edge detection on the punch to obtain the outer contour edge of the surface of the punch, and intercepting pixels inside the outer contour edge to obtain a gray level image of the surface of the punch. The gray scale image of the surface of the punch is subjected to projection transformation, the image is corrected to obtain the transformed gray scale image, and the purpose of correction is to convert the visual angle of the punch into the image of the lower punch with the upward visual angle, wherein the edge of the punch is in a circular shape. Acquiring a gray level histogram of the transformed gray level image, and performing threshold segmentation on the transformed gray level image based on the gray level histogram: setting the grey value of the pixels in the punch area to zero, and keeping the pixel value of the powder pixels and the outer edge profile of the punch, as shown in fig. 2, a large number of powder pixels are included in the outer edge profile, and the surface of the punch is distributed with residual powder during the use process of the punch, but the distributed powder distribution on the surface of the punch is denser for the sticking punch.
And acquiring the current pressure parameters of the punch of the tablet press while acquiring the surface image of the punch.
And step S002, inputting the pressure parameters into a condition variation self-coding network to obtain a simulation image.
The purpose of the embodiment of the invention is to find the optimal image with the minimum sticking degree, and the pressure parameter corresponding to the optimal image is recorded as the optimal pressure parameter. However, since the pressure parameters are continuously changed, the acquired pressure parameters and gray level images cannot cover all continuous pressure parameters, and therefore, a conditional variation self-coding network is adopted, and the conditional variation self-coding network can generate more simulation images in a simulation mode under the condition that the pressure parameters and the gray level images thereof are fewer, so that the continuous change interval of the pressure parameters is covered as much as possible.
The purpose of the conditional variational self-coding network is to generate images of a specified class, and the conditional variational self-coding network is a network which takes different pressure parameters as labels and takes the sum of difference loss between a generated distribution and a normal distribution and mean square error loss between a sample image and a generated image as a loss function. Labels for supervision were added during training.
The training process of the conditional variation self-coding network comprises the following steps: firstly, acquiring a training set: acquiring a plurality of pressure parameters of the punches of the tablet press, and acquiring surface images of the plurality of punches corresponding to each pressure parameter by the camera through the step S001 to obtain a corresponding gray scale map; the corresponding pressure parameter is used as a label of the conditional variation self-coding network; and taking the gray level images under different pressure parameters as a training set, and taking the labels of the gray level images as corresponding pressure parameters. The loss function used for training is the sum of the difference between the generated distribution and the normal distribution and the mean square error loss between the sample image and the generated image.
Preferably, since the distribution characteristics of the powder contained in the punch images corresponding to different pressure parameters are different and these characteristics are easily lost in the process of generating a new data set by the network, the loss function is further reconstructed, wherein the mean square error loss between the sample image and the generated simulation image further comprises: the distribution parameters of the powder in the sample image under each pressure parameter are obtained, different first weights are distributed according to different distribution parameters corresponding to different pressure parameters, and the weighted sum of the mean square error between the sample image and each pixel point in the generated image and the corresponding first weights is the mean square error loss.
Specifically, the normal distribution is represented as N (0,1), and any one of the pressure parameters is represented as FxMaximum value of the pressure parameter is FnPressure parameter FxThe corresponding m-th latent variable is recorded as
Figure BDA0003547665560000051
The total dimension of the latent variable is M, and the pressure parameter FxThe gray value of the pixel point (i, j) in the next generated image is recorded as
Figure BDA0003547665560000052
Pressure parameter FxThe gray value of the pixel point (i, j) in the lower sample image is recorded as
Figure BDA0003547665560000053
For pressure parameter FxThe assigned first weight is recorded as
Figure BDA0003547665560000054
Then there are:
Figure BDA0003547665560000055
wherein the content of the first and second substances,
Figure BDA0003547665560000056
indicating a KL divergence. The KL divergence represents the relative entropy, which can measure the distance between two random distributions, and when the two random distributions are the same, the relative entropy is zero; when the difference between two random distributions increases, the relative entropy also increases, i.e., the KL divergence can measure the difference between the two random distributions.
The first term in the loss function is the KL divergence between the generated distribution and the normal distribution, which is used to approximate the distribution of the generated image to the corresponding sample image. The second term of the loss function is a mean square error loss function for making the loss of the corresponding pixel between the generated image and the input sample image approach zero. The effect of this loss function is to produce a simulated image in which the distribution of powder is as close as possible to the sample image with minimal pixel loss.
Referring to fig. 3, the method for obtaining the distribution parameter of the powder in the sample image of each pressure parameter includes:
step S210, taking a plurality of sample images corresponding to each pressure parameter as target sample images, and obtaining a first Gaussian mixture model of powder distribution in each target sample image, wherein the first Gaussian mixture model is formed by mixing a plurality of two-dimensional Gaussian models;
the powder distribution in each punch surface image is a first mixed Gaussian model which can be formed by mixing a plurality of two-dimensional Gaussian models and reflects the corresponding distribution characteristics. Each pressure parameter corresponds to a plurality of target sample images of the surface of the punch, and the distribution of powder in each target sample image corresponds to one first Gaussian mixture model, namely each pressure parameter corresponds to a plurality of first Gaussian mixture models.
Step S220, fitting the two-dimensional Gaussian models corresponding to all the first Gaussian mixture models under the pressure parameters to obtain a target Gaussian mixture model;
the powder distribution corresponding to each pressure parameter can be obtained by fitting the first Gaussian mixture models of the corresponding target sample images to obtain target Gaussian mixture models, different second weights are distributed according to different mixed component sizes corresponding to the corresponding two-dimensional Gaussian models in each first Gaussian mixture model, and each first Gaussian mixture model can reflect the powder distribution corresponding to the corresponding pressure parameter.
Specifically, it is assumed that for any one pressure parameter, there are K two-dimensional gaussian models corresponding to the pressure parameter, and the second weight of the kth two-dimensional gaussian model is denoted as wkThe multidimensional variable is recorded as x, and the mean value of each dimensional variable is recorded as mukAnd the covariance matrix of the variables with different dimensions is recorded as XkThen the first gaussian mixture model g (x) is:
Figure BDA0003547665560000061
wherein the covariance matrix is represented by XkDescribing the correlation among all dimensional variables, wherein a covariance matrix corresponding to the first Gaussian mixture model is two rows and two columns; in the first mixed gaussian model, two dimensions are uncorrelated, i.e. the covariance matrix is a diagonal matrix.
And fitting the plurality of first Gaussian mixture models under the obtained pressure parameters to obtain a target Gaussian mixture model.
And step S230, obtaining the model parameters of each first Gaussian mixture model in the target Gaussian mixture model through an EM (effective electromagnetic) algorithm, wherein the model parameters of each first Gaussian mixture model are the distribution parameters of the powder.
For a plurality of sample images under each pressure parameter, the first Gaussian mixture model obtained according to the correspondence of each sample image is formed by mixing K two-dimensional Gaussian models, so that three parameters of the corresponding K initialized two-dimensional Gaussian models are input, and are respectively mean values mukCovariance matrix XkA second weight wk. And (4) solving by using an EM (effective magnetic field) algorithm, and finally obtaining corresponding K groups of data records [ mu ] corresponding to each sample picturek,Xk,wkAnd (K ═ 1,2, …, K), the model parameters of all sample pictures constitute the model parameters of the target mixed gaussian model at the pressure parameter. For the K sets of data obtained, where μkIs a set of two-dimensional data, XkIs a diagonal matrix, the second weight wkIs [0,1 ]]A number of
Figure BDA0003547665560000071
The parameters of the first mixture gaussian model corresponding to the multiple sample pictures under each pressure parameter are obtained through the step 210-230, and the parameters include the weight, the mean value and the covariance of the corresponding two-dimensional gaussian model.
Preferably, the same pressure parameter corresponds to a plurality of different punch surface images, and the powder distribution in the different punch surface images is not necessarily the same, that is, the first mixed gaussian model under the fitting pressure parameter may have different model parameters; however, the distribution characteristics of the powder on the corresponding multiple gray-scale images under the same parameter have high similarity, so that the similar distribution characteristics can be considered as the distribution characteristics of the powder, and the distribution characteristics with larger differences are considered as noise characteristics; the parameters of the first gaussian mixture model reflect the corresponding distribution characteristics, so that the distribution characteristics of the powder represented by similar model parameters and the noise represented by a larger parameter difference in the multiple gray scale images corresponding to the same pressure parameter are adjusted by the similarity of the parameters, and therefore, the step of fitting all the first gaussian mixture models under the pressure parameter to obtain the target gaussian mixture model of the corresponding pressure parameter is further included with reference to fig. 4:
step S221, dividing the two-dimensional Gaussian model under the pressure parameter into a two-dimensional Gaussian model corresponding to the distribution characteristic of the powder and a two-dimensional Gaussian model corresponding to the distribution characteristic of the noise according to the similarity of the model parameters of the two-dimensional Gaussian model;
specifically, parameters of a first Gaussian mixture model of the multiple sample pictures under each pressure parameter are obtained, and the parameters include a mean, a covariance and a weight. For different sample images under the same pressure parameter, when the first mixed gaussian model is used for fitting, the corresponding first mixed gaussian model may have different parameters. Because the distribution characteristics of the powder in the multiple sample images under the same pressure parameter are similar, and the distribution characteristics of the noise are different, similar two-dimensional Gaussian distribution models are mixed in all the first Gaussian mixture models, and the corresponding weights are also similar, so that the similarity of the two-dimensional Gaussian distribution models is considered to be high if the similar two-dimensional Gaussian distribution models have good representativeness of the distribution characteristics of the powder in the multiple sample images of the pressure parameter; otherwise, the similarity is low.
Referring to fig. 5, in order to identify the two-dimensional gaussian model corresponding to the distribution characteristic of the noise to obtain accurate model parameters, the step of obtaining the two-dimensional gaussian model corresponding to the distribution characteristic of the noise and the two-dimensional gaussian model corresponding to the distribution characteristic of the powder by dividing the two-dimensional gaussian model under the pressure parameter according to the mean and the covariance includes:
step S2210, obtaining Euclidean distance sequences of the mean value of each two-dimensional Gaussian model in the first Gaussian mixture models relative to the Euclidean distance of the center of the punch, obtaining the similarity between the Euclidean distance sequences corresponding to the first Gaussian mixture models under the same pressure parameter, wherein the two-dimensional Gaussian models corresponding to the similar distance sequences are two-dimensional Gaussian models corresponding to the distribution characteristics of the powder, otherwise, the two-dimensional Gaussian models corresponding to the distribution characteristics of the noise;
and screening out a two-dimensional Gaussian model corresponding to the distribution characteristics of the noise by utilizing the similarity between the mean value and the distance from the center of the punch, so as to obtain relatively accurate model parameters corresponding to the distribution characteristics of the powder.
Specifically, the mean of the kth two-dimensional Gaussian model is recorded as μkAnd the mean sequence of the jth first Gaussian mixture model is recorded as { mu [ ]12,…μk…,μKRecording the Euclidean distance between the mean value and the circle center position of the punch as rkThe corresponding Euclidean distance sequence is marked as { r1,r2,…rk…,rKThe powder distribution in each sample image corresponds to a first mixed Gaussian model formed by mixing a plurality of two-dimensional Gaussian models, so that each sample image corresponds to a mean value sequence and a Euclidean distance sequence; and for a plurality of sample images under the same pressure parameter, a plurality of mean value sequences and a plurality of Euclidean distance sequences are corresponding. Mapping all Euclidean distance sequences under the same pressure onto a one-dimensional numerical axis according to the numerical value, wherein the distribution range of the Euclidean distance sequences is marked as [0, R ]max]Then, K one-dimensional sliding windows are set, and the width of the sliding window is preset to be RmaxAnd K one-dimensional sliding windows are uniformly distributed on a numerical axis. For one of the one-dimensional sliding windows, the modulo length of the vector obtained by adding and summing the corresponding vectors from the center of the one-dimensional sliding window to the vectors of the data points corresponding to all Euclidean distances in the sliding window is the moving distance of the corresponding sliding window, and the direction of the vector is the moving direction of the corresponding sliding window. When the moving distance is less than or equal toWhen the distance threshold value epsilon is reached, marking the central positions of the sliding windows at the moment, and when the distance between the central positions of the two sliding windows is smaller than or equal to the distance threshold value epsilon, classifying the two sliding windows into the same class, and so on; and carrying out the same operation on each one-dimensional sliding window to obtain the centers of a plurality of types of sliding windows, obtaining the class center of the center of each type of sliding window, and marking the data points within the range of the left-right distance threshold epsilon of the class center of each type as the data points of the same type.
And (3) endowing the data points in each category with preset numerical values again, calculating the intersection of all categories, and marking the data points in the intersection, namely the sample images corresponding to the mean value, as the sample images conforming to the distance similarity, wherein the sample images have larger similarity. The distance sequence corresponding to the sample image conforming to the distance similarity is a similar distance sequence, the two-dimensional Gaussian model corresponding to the similar distance sequence is a two-dimensional Gaussian model corresponding to the distribution characteristic of the powder, and otherwise, the two-dimensional Gaussian model corresponding to the distribution characteristic of the noise.
Wherein, the preset value newly assigned in the embodiment of the invention is the value of the central position of the corresponding category; in other embodiments, it may also be a mean, mode, or median of the respective category. The distance threshold ε is an empirical threshold, R in an embodiment of the present inventionmaxThe radius of the punch is equal to the value of the distance threshold epsilon of 0.01Rmax
In order to further identify a two-dimensional gaussian model corresponding to the distribution characteristics of the noise, the similarity of the parameters is measured by using the deviation degree of the angle, which specifically includes:
step S2211, calculating the similarity of the angles of the mean value sequences corresponding to the first mixed Gaussian models relative to the position of the circle center of the punch under the same pressure parameter, wherein the two-dimensional Gaussian models corresponding to the similar angle sequences are two-dimensional Gaussian models corresponding to the distribution characteristics of the powder, and otherwise, the two-dimensional Gaussian models corresponding to the distribution characteristics of the noise;
preferably, the mean sequence is a mean sequence of a two-dimensional gaussian model corresponding to the distribution characteristics of the powder obtained from the distance sequence. Through the step S2210, the sample images conforming to the distance similarity can be screened out, vectors pointing to the mean value of the sample images conforming to the distance similarity from the center position of the punch surface are obtained, the obtained vectors are sorted in the order from small to large, the included angle between every two vectors is obtained, and an included angle sequence is obtained.
Referring to fig. 6, as an example, it is assumed that the mean sequence conforming to the distance similarity includes four mean elements in total, a vector pointing to the mean value from the center position of the punch is obtained, and the obtained vectors are sorted to obtain a first vector 1, a second vector 2, a third vector 3, and a fourth vector 4, where the obtained included angle sequence is: a first included angle between the first vector 1 and the second vector 2, a second included angle between the second vector 2 and the third vector 3, a third included angle between the third vector 3 and the fourth vector 4, and a fourth included angle between the fourth vector 4 and the first vector 1 are recorded as follows: { theta ](1→2)(2→3)(3→4)(4→1)}。
For a plurality of sample images that conform to the distance similarity, there are a plurality of angular sequences. Each angle sequence comprises a multi-dimensional included angle sequence, the variance of included angles of corresponding dimensions in all the angle sequences is calculated, when the variance is smaller than or equal to a threshold value, the corresponding mean value accords with the angle similarity, otherwise, the mean value does not accord with the angle similarity. And obtaining a standard angle sequence by using the mean value which accords with the angle similarity as a standard angle. The sample images which accord with the distance similarity and the angle similarity under the same pressure parameter and the corresponding mean value thereof are obtained, and the corresponding sample images are recorded as the sample images which accord with the angle similarity. The angle sequence corresponding to the sample image conforming to the angle similarity is a similar angle sequence, the two-dimensional Gaussian model corresponding to the similar angle sequence is a two-dimensional Gaussian model corresponding to the distribution characteristic of the powder, and otherwise, the two-dimensional Gaussian model corresponding to the distribution characteristic of the noise.
As an example, for a plurality of sample images conforming to the distance similarity, each sample image corresponds to one angle sequence, a first variance of a first included angle and a second variance of a second included angle in all the angle sequences are calculated, and when both the first variance and the second variance are greater than a preset threshold, the second vector does not conform to the angle similarity because a common vector corresponding to the first included angle and the second included angle is the second vector.
In the embodiment of the invention, the preset threshold is set to be 2 pi/K.
In order to further identify the distribution characteristics of the noise, calculating the similarity between covariance matrices of sample images conforming to the angular similarity, specifically including:
step S2212, calculating the similarity of covariance sequences corresponding to the first mixed Gaussian models under the same pressure parameter, wherein the two-dimensional Gaussian model corresponding to the similar covariance sequence is the two-dimensional Gaussian model corresponding to the distribution characteristic of the powder, otherwise, the two-dimensional Gaussian model corresponding to the distribution characteristic of the noise;
preferably, the covariance sequence is a covariance sequence of a two-dimensional gaussian model corresponding to the distribution characteristics of the powder obtained from the angle sequence, and the covariance matrix is a diagonal matrix of two rows and two columns, so that the sum of squares of variances of two elements on the diagonal of the matrix is calculated, and when the variance is smaller than a preset threshold, the similarity at this time is larger, and the corresponding mean value conforms to the covariance similarity. And the covariance sequence corresponding to the covariance similarity is a similar covariance sequence, the two-dimensional Gaussian model corresponding to the similar covariance sequence is a two-dimensional Gaussian model corresponding to the distribution characteristic of the powder, and otherwise, the two-dimensional Gaussian model corresponding to the distribution characteristic of the noise.
According to the steps S2210-S2212, the sample image with the most similarity among the plurality of corresponding sample images under each pressure parameter is obtained, and the mean sequence, covariance and weight corresponding to the corresponding sample image. The two-dimensional gaussian model corresponding to the noise distribution characteristic and the two-dimensional gaussian model corresponding to the powder distribution characteristic are obtained through steps S2210 to S2212.
Step S222, redistributing the second weight corresponding to the two-dimensional Gaussian model corresponding to the distribution characteristic of the noise to the two-dimensional Gaussian model corresponding to the distribution characteristic of the powder to obtain the target mixed Gaussian model.
Specifically, the two-dimensional gaussian models corresponding to the distribution characteristics of the powder obtained by screening are renumbered, and the mean sequence is recorded as { mua1a2,…μai…,μa∈The corresponding covariance sequence is noted as { X }a1,Xa2,…Xai…,Xa∈The corresponding weight sequence is denoted as { w }a1,wa2,…wai…,wa∈In which μaiMean value X of ith two-dimensional Gaussian model corresponding to distribution characteristics of powderaiCovariance, w, of the ith two-dimensional Gaussian model corresponding to distribution characteristics of powderaiA second weight of the ith two-dimensional Gaussian model corresponding to the distribution characteristic of the powder, and a weight of the distribution characteristic of the noise being wτAnd then the corrected second weight w'aiComprises the following steps:
Figure BDA0003547665560000101
due to the fact that
Figure BDA0003547665560000102
The sum of the weight of the distribution characteristic of the noise and the weight of the distribution characteristic of the powder is 1, and therefore
Figure BDA0003547665560000103
Obtaining the adjusted weight sequence { w'a1,w′a2…w′ai……w′a∈For a certain pixel point on the image, its first weight
Figure BDA0003547665560000104
The calculation method of (c) is as follows:
Figure BDA0003547665560000105
wherein x represents the coordinate position (i, j) of a pixel point on the image,
Figure BDA0003547665560000106
and (3) representing the weight of the pixel point (i, j), and adjusting the weight of each pixel point to obtain a corresponding mean square error loss so as to obtain an accurate network training result.
And S003, obtaining the height ratio of the powder before and after sticking according to the gray image, and obtaining the pixel sum of the analog image by taking the height ratio as the weight of the corresponding pixel point in the analog image.
For the surface of the punch, the deepest part of the surface is the center of the punch, and the height ratio before and after sticking is obtained according to the depth of the punch and the thickness of a pressed piece set by the tablet press:
Figure BDA0003547665560000107
wherein d isiThe depth corresponding to the ith powder pixel point, D the depth of the punch center point and h the thickness of the tablet cylinder.
Taking the height ratio as the weight of a corresponding pixel point in the simulated image to obtain the total pixel sum of the simulated image:
Figure BDA0003547665560000111
wherein, WiFor the weight corresponding to the ith pixel point, IiThe gray value of the ith powder pixel point in the simulated image is shown, and Q is the number of the pixel points in the simulated image.
And step S004, the pressure parameter corresponding to the simulated image with the minimum pixel sum is the optimal pressure parameter, and the pressure parameter of the punch is adjusted according to the difference between the optimal pressure parameter and the current pressure parameter.
Optimizing the sum of the pixels by using a gradient descent method to obtain the pressure parameter corresponding to the pixel and the minimum simulated image as an optimal pressure parameter, and recording the optimal pressure parameter as FgIf the current pressure parameter is denoted as F, the difference is Δ F ═ Fg-F, where the sign can direct the phase to be turned up or downThe amount of difference should be.
In summary, in the embodiment of the present invention, the surface image of the punch of the tablet press is collected, and the pressure parameter corresponding to the surface image is obtained; preprocessing the surface image to obtain a gray image; inputting the pressure parameters into a condition variation self-coding network to obtain a simulation image; obtaining a height ratio before and after sticking according to the gray level image, and obtaining the pixel sum of the analog image by taking the height ratio as the weight of the corresponding pixel point in the analog image; and the pressure parameter corresponding to the simulated image with the minimum pixel sum is an optimal pressure parameter, and the pressure parameter of the pressure punch is adjusted according to the difference between the optimal pressure parameter and the current pressure parameter. The technical problems that the requirement on subjective ability of staff is high and correction efficiency is low due to manual adjustment of pressure parameters and repeated test and calibration at present are solved.
Based on the same inventive concept, the embodiment of the present invention further provides an artificial intelligence based tablet press die adjustment system, which includes a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps of the artificial intelligence based tablet press die adjustment method according to any one of the above embodiments. The sticking and punching adjusting system of the tablet press based on artificial intelligence is described in detail in the above embodiments, and is not described in detail.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (9)

1. An artificial intelligence based method for adjusting the sticking of a tablet press is characterized by comprising the following steps:
collecting a surface image of a punch of a tablet press, and acquiring a current pressure parameter corresponding to the surface image; preprocessing the surface image to obtain a gray image;
inputting the pressure parameters into a condition variation self-coding network to obtain a simulation image;
obtaining the height ratio of the powder before and after sticking according to the gray image, and obtaining the pixel sum of the simulated image by taking the height ratio as the weight of the corresponding pixel point in the simulated image;
and the pressure parameter corresponding to the simulated image with the minimum pixel sum is an optimal pressure parameter, and the pressure parameter of the punch is adjusted according to the difference between the optimal pressure parameter and the current pressure parameter.
2. The method of claim 1, wherein the conditional variational self-coding network is a network labeled with different pressure parameters and having a loss function of the sum of the loss of variance between the generated distribution and the normal distribution and the loss of mean square error between the sample image and the generated image.
3. The method of claim 2, wherein the loss of mean square error between the sample image and the generated simulated image, further comprises:
and acquiring the distribution parameters of powder in the sample image of each pressure parameter, distributing different first weights according to different distribution parameters corresponding to different pressure parameters, and performing weighted summation of the mean square error between the sample image and each pixel point in the generated image and the corresponding first weight to obtain the mean square error loss.
4. The method of claim 3, wherein said step of obtaining a powder distribution parameter in a sample image of each of said pressure parameters comprises:
the sample image corresponding to each pressure parameter is a target sample image, a first Gaussian mixture model of powder distribution in each target sample image is obtained, and the first Gaussian mixture model is formed by mixing a plurality of two-dimensional Gaussian models;
fitting the two-dimensional Gaussian models corresponding to all the first Gaussian mixture models under the pressure parameters to obtain a target Gaussian mixture model;
and obtaining the model parameters of each first Gaussian mixture model in the target Gaussian mixture model through an EM (effective magnetic field) algorithm, wherein the model parameters of each first Gaussian mixture model are the distribution parameters of the powder.
5. The method for adjusting the sticking of the tablet press based on the artificial intelligence as claimed in claim 1, wherein the step of fitting the two-dimensional gaussian models corresponding to all the first gaussian models under the pressure parameter to obtain the target gaussian mixture model comprises:
dividing the two-dimensional Gaussian model under the pressure parameter into a two-dimensional Gaussian model corresponding to the distribution characteristic of powder and a two-dimensional Gaussian model corresponding to the distribution characteristic of noise according to the similarity of the model parameters of the two-dimensional Gaussian model;
and redistributing the second weight corresponding to the two-dimensional Gaussian model corresponding to the distribution characteristic of the noise to the two-dimensional Gaussian model corresponding to the distribution characteristic of the powder to obtain the target mixed Gaussian model.
6. The method for adjusting the sticking of the tablet press based on the artificial intelligence as claimed in claim 5, wherein the step of dividing the two-dimensional Gaussian model under the pressure parameter into a two-dimensional Gaussian model corresponding to the distribution characteristics of the powder and a two-dimensional Gaussian model corresponding to the distribution characteristics of the noise according to the similarity of the model parameters of the two-dimensional Gaussian model comprises:
obtaining Euclidean distance of the mean value of each two-dimensional Gaussian model in the first mixed Gaussian models relative to the center of the punch to obtain Euclidean distance sequences, and obtaining similarity among the Euclidean distance sequences corresponding to the first mixed Gaussian models under the same pressure parameter, wherein the two-dimensional Gaussian model corresponding to the similar distance sequences is the two-dimensional Gaussian model corresponding to the distribution characteristics of the powder, otherwise, the two-dimensional Gaussian model corresponding to the distribution characteristics of the noise.
7. The method for adjusting the sticking of the tablet press based on the artificial intelligence as claimed in claim 5, wherein the step of dividing the two-dimensional Gaussian model under the pressure parameter into a two-dimensional Gaussian model corresponding to the distribution characteristics of the powder and a two-dimensional Gaussian model corresponding to the distribution characteristics of the noise according to the similarity of the model parameters of the two-dimensional Gaussian model comprises:
and calculating the similarity of the angles of the mean value sequences corresponding to the first mixed Gaussian models relative to the position of the circle center of the punch under the same pressure parameter, wherein the two-dimensional Gaussian models corresponding to the similar angle sequences are the two-dimensional Gaussian models corresponding to the distribution characteristics of the powder, and otherwise, the two-dimensional Gaussian models corresponding to the distribution characteristics of the noise.
8. The method for adjusting the sticking of the tablet press based on the artificial intelligence as claimed in claim 5, wherein the step of dividing the two-dimensional Gaussian model under the pressure parameter into a two-dimensional Gaussian model corresponding to the distribution characteristics of the powder and a two-dimensional Gaussian model corresponding to the distribution characteristics of the noise according to the similarity of the model parameters of the two-dimensional Gaussian model comprises:
and calculating the similarity of covariance sequences corresponding to the first mixed Gaussian models under the same pressure parameter, wherein the two-dimensional Gaussian model corresponding to the similar covariance sequence is the two-dimensional Gaussian model corresponding to the distribution characteristic of the powder, and otherwise, the two-dimensional Gaussian model is the two-dimensional Gaussian model corresponding to the distribution characteristic of the noise.
9. An artificial intelligence based tablet press blow-out adjustment system, comprising a memory, a processor and a computer program stored in said memory and executable on said processor, characterized in that said processor, when executing said computer program, carries out the steps of the method according to any one of claims 1 to 8.
CN202210253151.2A 2022-03-15 2022-03-15 Tablet press sticking adjusting method and system based on artificial intelligence Active CN114603912B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210253151.2A CN114603912B (en) 2022-03-15 2022-03-15 Tablet press sticking adjusting method and system based on artificial intelligence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210253151.2A CN114603912B (en) 2022-03-15 2022-03-15 Tablet press sticking adjusting method and system based on artificial intelligence

Publications (2)

Publication Number Publication Date
CN114603912A true CN114603912A (en) 2022-06-10
CN114603912B CN114603912B (en) 2022-12-20

Family

ID=81862511

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210253151.2A Active CN114603912B (en) 2022-03-15 2022-03-15 Tablet press sticking adjusting method and system based on artificial intelligence

Country Status (1)

Country Link
CN (1) CN114603912B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101612806A (en) * 2008-06-23 2009-12-30 上海天和制药机械有限公司 A kind of upper punch sticking detection device
CN204222259U (en) * 2014-11-04 2015-03-25 天津医药集团津康制药有限公司 A kind of antiseized mould in a state of excitement produced for Cefixime tablets
CN106355590A (en) * 2016-11-23 2017-01-25 河北工业大学 Visual inspection method for mold residue based on image difference and device
DE102019122699A1 (en) * 2019-08-23 2021-02-25 Schuler Pressen Gmbh Forming and / or cutting device and method for operating the forming and / or cutting device
CN114011903A (en) * 2021-11-01 2022-02-08 深圳市信润富联数字科技有限公司 Stamping production abnormity monitoring method, device and system and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101612806A (en) * 2008-06-23 2009-12-30 上海天和制药机械有限公司 A kind of upper punch sticking detection device
CN204222259U (en) * 2014-11-04 2015-03-25 天津医药集团津康制药有限公司 A kind of antiseized mould in a state of excitement produced for Cefixime tablets
CN106355590A (en) * 2016-11-23 2017-01-25 河北工业大学 Visual inspection method for mold residue based on image difference and device
DE102019122699A1 (en) * 2019-08-23 2021-02-25 Schuler Pressen Gmbh Forming and / or cutting device and method for operating the forming and / or cutting device
CN114011903A (en) * 2021-11-01 2022-02-08 深圳市信润富联数字科技有限公司 Stamping production abnormity monitoring method, device and system and readable storage medium

Also Published As

Publication number Publication date
CN114603912B (en) 2022-12-20

Similar Documents

Publication Publication Date Title
US7970212B2 (en) Method for automatic detection and classification of objects and patterns in low resolution environments
CN109612888B (en) Powder mixing uniformity detection method based on image technology
CN104573744B (en) Fine granulation classification identifies and the part of object positions and feature extracting method
CN108154499B (en) Woven fabric texture flaw detection method based on K-SVD learning dictionary
CN109242870A (en) A kind of sea horizon detection method divided based on image with textural characteristics
CN114612469B (en) Product defect detection method, device and equipment and readable storage medium
CN106340000A (en) Bone age assessment method
CN116721391B (en) Method for detecting separation effect of raw oil based on computer vision
CN111507976A (en) Defect detection method and system based on multi-angle imaging
CN109410175B (en) SAR radar imaging quality rapid automatic evaluation method based on multi-subregion image matching
CN110097537A (en) A kind of meat quantitative analysis evaluation method based on three-D grain feature
CN116091455A (en) Steel mesh surface defect judging method based on machine vision
CN111462092A (en) Vacuum cup surface defect detection method based on deep learning
CN109788275A (en) Naturality, structure and binocular asymmetry are without reference stereo image quality evaluation method
Gurubelli et al. Texture and colour gradient features for grade analysis of pomegranate and mango fruits using kernel-SVM classifiers
CN109948548B (en) Lipstick recommendation method and system based on color matching of machine learning
CN114603912B (en) Tablet press sticking adjusting method and system based on artificial intelligence
CN117495852B (en) Digital printing quality detection method based on image analysis
CN117237747B (en) Hardware defect classification and identification method based on artificial intelligence
EP2750081B1 (en) A method for vehicle identification and a system for vehicle identification
Lei et al. Automatic grading of placental maturity based on LIOP and fisher vector
CN113569737A (en) Notebook screen defect detection method and medium based on autonomous learning network model
CN113223098A (en) Preprocessing optimization method for image color classification
CN117416049B (en) Printing equipment control method and system based on 3D printing technology
CN113362244B (en) Image processing method based on priority and data use plan

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant