Image segmentation model training method and particle size detection method based on Mask RCNN

文档序号:8480 发布日期:2021-09-17 浏览:30次 中文

1. An image segmentation model training method based on Mask RCNN is characterized by comprising the following steps:

acquiring a detection image and a sample image of the stone;

inputting a detection image into a CNN (computer network), and performing feature extraction on the detection image by the CNN to obtain a feature map;

generating an anchor frame through the RPN, correcting the anchor frame according to an output result of the RPN regression branch, and selecting a preset number of anchor frames to form a suggestion window;

mapping the suggestion windows to a feature map of the last layer of the CNN, and enabling each suggestion window to generate a RoI feature map with a fixed size through a RoI Align layer;

classifying the RoIs by using the full-connection layer and performing frame regression, generating a mask of each RoI through the FCN, and segmenting to obtain stone outlines; calculating the offset between the stone outline and the real outline marked by the sample image, and updating the parameters of the Mask RCNN neural network according to the offset;

judging whether the offset reaches the standard, if not, repeating the steps; if yes, finishing the training of the Mask RCNN model.

2. The Mask RCNN-based image segmentation model training method according to claim 1, wherein the calculating of the offset between the stone sub-contour and the real contour of the sample image mark and the updating of the parameters of the Mask RCNN neural network according to the offset comprise:

calculating the offset of the stone profile relative to the real profile by using a loss formula:

in the formula: loss is the offset, n is the number of samples,coordinates of coordinate axes of true contours, xiPredicting coordinates corresponding to the stone contour;

recording the offset, drawing a loss curve of the offset, and adjusting the learning rate according to the loss curve;

and adjusting the gradient of the offset according to the learning rate, and updating the parameters of the Mask RCNN neural network by using the gradient.

3. The Mask RCNN-based image segmentation model training method as claimed in claim 2, wherein the recording offset, drawing a loss curve of the offset, and adjusting the learning rate according to the loss curve comprises:

calculating the reduction rate of the loss curve in a preset interval, and if the reduction rate is smaller than a preset reduction value, increasing the learning rate;

and acquiring offset in a preset interval, calculating a difference value of adjacent offsets, and reducing the learning rate if the number of times that the difference value is smaller than a preset error is larger than a preset number of times.

4. The Mask RCNN-based image segmentation model training method according to claim 2, wherein the adjusting of the gradient of the offset according to the learning rate and the updating of the parameters of the Mask RCNN neural network by using the gradient comprise:

taking a derivative of x by a loss formula to obtain a derivative with respect to x;

and calculating the product of the learning rate and the derivative, and calculating the difference value between the original parameter of the Mask RCNN model and the product, wherein the difference value is the updated parameter of the Mask RCNN model.

5. The Mask RCNN-based image segmentation model training method according to claim 1, wherein the judgment of whether the offset reaches the standard is performed, and if not, the steps are repeated; if so, finishing the training of the Mask RCNN model, comprising the following steps:

recording the number of rounds of which the offset is smaller than the preset offset value, and if the number of rounds of which the offset is smaller than the preset offset value is larger than the preset number of rounds, determining that the offset reaches the standard.

6. The Mask RCNN-based image segmentation model training method according to claim 1, wherein the obtaining of the detection image and the sample image comprises:

deleting the folder which originally stores the test picture, and rebuilding a new empty folder;

and carrying out distortion calibration processing on the detection image and the sample image, and then carrying out histogram equalization processing.

7. The Mask RCNN-based image segmentation model training method as claimed in claim 6, wherein the distortion calibration processing is performed on the detection image and the sample image, and then the histogram equalization processing is performed, further comprising: uniformly dividing the detection image and the sample image into a plurality of result images with preset sizes, wherein overlapping areas exist between the adjacent result images;

and performing rotation transformation and/or scaling transformation on the result image to obtain a plurality of detection images and sample images.

8. A method for particle size detection, comprising the steps of:

inputting the detection image into a Mask RCNN model obtained by the training method according to any one of claims 1 to 7 to obtain a stone profile;

mapping the stone contour to a detection image to obtain contour information of the stone, and calculating the particle size information of the stone according to the contour information;

and judging whether the particle size information exceeds a quantity threshold value, and if so, giving an early warning.

9. The method according to claim 8, wherein the determining whether the particle size information exceeds a quantity threshold, and if so, performing an early warning includes:

comparing the particle size information with a preset particle size, and counting the number of the preset particle size to obtain an excess number if the particle size information is larger than the preset particle size;

and comparing the excess number with a number threshold, and if the excess number is greater than the number threshold, performing early warning.

Background

Crushed stone aggregate production enterprises generally adopt crushers to crush stones, and use mechanical sieves or vibrating sieves to screen crushed stone aggregates to produce crushed stone aggregate finished products with various specifications. Whether the produced broken stone aggregate meets the standard or not and whether the produced broken stone aggregate exceeds the standard or not (ultra-long material, needle-shaped material and the like) exists or not, and the detection work is also very critical, such as: the screen cloth damage leads to the super rule big material to sneak into, can influence finished product specification constitution etc. if can not in time detect out and discover unusually, can influence the quality of finished product, bring great economic loss for rubble manufacturing enterprise.

In the non-ferrous metal smelting industry, a multi-layer crusher is used for crushing large ores in an ore dissociation procedure, and similar conditions of broken stone aggregate production enterprises exist in the granularity detection of the crushed ores.

With the development of machine vision, research institutions at home and abroad invest a great deal of effort to try to detect the ore aggregate by using a computer vision technology, in the existing method for detecting the granularity of the ore aggregate by adopting machine vision, a watershed transform-based segmentation algorithm is most widely applied, watershed transform is carried out on a threshold segmentation result, an ore aggregate image is segmented into single closed ore areas so as to carry out granularity measurement, and the algorithm is easy to cause over-segmentation and under-segmentation; the pit matching method proposed later solves the two problems, but due to the complexity of stacking ore aggregates and the complexity of the shape of the ore itself, the pit matching method is low in robustness and easily causes secondary wrong segmentation, and the problems cause large deviation of the granularity statistical result.

Disclosure of Invention

In order to improve the accuracy of particle size detection, the application provides an image segmentation model training method and a particle size detection method based on Mask RCNN.

In a first aspect, the present application provides a Mask RCNN-based image segmentation model training method, which adopts the following technical scheme:

an image segmentation model training method based on Mask RCNN comprises the following steps:

acquiring a detection image and a sample image of the stone;

inputting a detection image into a CNN (computer network), and performing feature extraction on the detection image by the CNN to obtain a feature map;

generating an anchor frame through the RPN, correcting the anchor frame according to an output result of the RPN regression branch, and selecting a preset number of anchor frames to form a suggestion window;

mapping the suggestion windows to a feature map of the last layer of the CNN, and enabling each suggestion window to generate a RoI feature map with a fixed size through a RoI Align layer;

classifying the RoIs by using the full-connection layer and performing frame regression, generating a mask of each RoI through the FCN, and segmenting to obtain stone outlines; calculating the offset between the stone outline and the real outline marked by the sample image, and updating the parameters of the Mask RCNN neural network according to the offset;

judging whether the offset reaches the standard, if not, repeating the steps; if yes, finishing the training of the Mask RCNN model.

By adopting the technical scheme, the image of the stone is segmented by utilizing the neural network, the stone profile obtained by segmentation is compared with the real profile, then the parameters of the neural network are adjusted, and the Mask RCNN model is obtained by training, so that the Mask RCNN model can accurately segment the obtained stone profile, and the segmentation accuracy is effectively improved.

Optionally, calculating an offset between the stone outline and the real outline marked by the sample image, and updating parameters of the Mask RCNN neural network according to the offset, including:

calculating the offset of the stone profile relative to the real profile by using a loss formula:

in the formula: loss is the offset, n is the number of samples,coordinates of coordinate axes of true contours, xiPredicting coordinates corresponding to the stone contour;

recording the offset, drawing a loss curve of the offset, and adjusting the learning rate according to the loss curve;

and adjusting the gradient of the offset according to the learning rate, and updating the parameters of the Mask RCNN neural network by using the gradient.

By adopting the technical scheme, the offset of each prediction frame can be calculated through a Loss calculation formula, the offsets are summed and averaged to obtain the final offset, the error between the stone profile and the real profile can be obtained, and the parameters of the neural network are adjusted according to the error, so that the neural network can obtain a more accurate result in the next round of training.

Optionally, the recording the offset, drawing a loss curve of the offset, and adjusting the learning rate according to the loss curve includes: :

calculating the reduction rate of the loss curve in a preset interval, and if the reduction rate is smaller than a preset reduction value, increasing the learning rate;

and acquiring offset in a preset interval, calculating a difference value of adjacent offsets, and reducing the learning rate if the number of times that the difference value is smaller than a preset error is larger than a preset number of times.

By adopting the technical scheme, whether the model is converged or is fitted is judged according to whether the final loss curve is stable, so that the number of training rounds is increased or decreased, the learning speed of the neural network is monitored conveniently, and the number of training rounds is increased or decreased selectively.

Optionally, the adjusting the gradient of the offset according to the learning rate and updating the parameters of the Mask RCNN neural network by using the gradient includes:

and calculating the product of the learning rate and the derivative, and calculating the difference value between the original parameter of the Mask RCNN model and the product, wherein the difference value is the updated parameter of the Mask RCNN model.

By adopting the technical scheme, the gradient of the offset is returned to the whole network by utilizing a gradient descent method and a learning rate, so that the network is updated to obtain a more accurate result in the next prediction.

Optionally, acquiring the detection image and the sample image includes:

deleting the folder which originally stores the test picture, and rebuilding a new empty folder;

and carrying out distortion calibration processing on the detection image and the sample image, and then carrying out histogram equalization processing.

By adopting the technical scheme, the folder for storing the test picture is deleted, and the conflict between the code and the file stored originally when the output result is stored is prevented. The influence of lens distortion effect is eliminated, more accurate and real images can be obtained, histogram equalization processing is carried out, the problem of overexposure or over darkness of the images can be effectively solved, and stone detection and segmentation are facilitated.

Optionally, after performing distortion calibration processing on the detection image and the sample image and then performing histogram equalization processing, the method further includes:

uniformly dividing the detection image and the sample image into a plurality of result images with preset sizes, wherein overlapping areas exist between the adjacent result images;

and performing rotation transformation and/or scaling transformation on the result image to obtain a plurality of detection images and sample images.

By adopting the technical scheme, the processed picture occupies less video memory when being sent to the neural network model for training, and the processing speed is higher. By expanding the training data, the model can identify the stones placed at different angles and with different sizes, and meanwhile, the workload of manual marking can be reduced.

In a second aspect, the present application provides a method for detecting particle size, which adopts the following technical solutions:

a method of particle size detection comprising the steps of:

inputting the detection image into a Mask RCNN model obtained by the training method to obtain a stone outline;

mapping the stone contour to a detection image to obtain contour information of the stone, and calculating the particle size information of the stone according to the contour information;

and judging whether the particle size information exceeds a quantity threshold value, and if so, giving an early warning.

By adopting the technical scheme, the Mask RCNN model can accurately segment the outline of the stone, identify the outline, obtain the particle size information of the stone, and improve the accuracy of particle size detection. The particle size information is fed back, an out-of-specification event is detected in time, and an alarm prompt is given, so that the working personnel can maintain the equipment in time, and the product quality is guaranteed.

Optionally, the determining whether the particle size information exceeds the number threshold, and if so, performing early warning, including:

comparing the particle size information with a preset particle size, and counting the number of the preset particle size to obtain an excess number if the particle size information is larger than the preset particle size;

and comparing the excess number with a number threshold, and if the excess number is greater than the number threshold, performing early warning.

By adopting the technical scheme, the situation of false alarm can be reduced by setting the quantity threshold value.

In summary, the present application includes at least one of the following beneficial technical effects:

1. the method has strong adaptability, can adapt to various stone shapes, illumination conditions and the like, can accurately identify, segment and analyze images of the stone shapes, and can calculate more accurate stone sizes and granularity sizes.

2. The out-of-specification event can be detected in time, and an alarm prompt is given, so that the quality of the product is improved.

Drawings

FIG. 1 is a flowchart of an image segmentation model training method based on Mask RCNN in an embodiment of the present application;

FIG. 2 is a schematic diagram of setting an anchor frame according to feature points;

FIG. 3 is a schematic drawing of a loss curve;

fig. 4 is a flowchart of a method for particle size detection according to an embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described in detail below with reference to fig. 1-4 and the embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

The embodiment of the application discloses an image segmentation model training method based on Mask RCNN, which comprises the following steps: s1: and acquiring a detection image and a sample image of the stone.

Specifically, the industrial camera CCD is used for shooting stones to obtain real-time detection images, the detection images are transmitted to the industrial personal computer, manual labeling is carried out on the stones in the detection images by using a labelme tool to obtain sample images, and the sample images serve as the basis for result comparison and parameter adjustment.

S2: inputting the detection image into a CNN, and performing feature extraction on the detection image by the CNN to obtain a feature map.

Specifically, the CNN first extracts a feature map of the detection image using a set of basic conv + relu + pooling layers, where the size of the feature map is 1/32 of the detection image, the feature map is shared for a subsequent RPN network and a full connection layer, and the CNN includes 13 conv layers +13 relu layers +4 pooling layers.

S3: and generating an anchor frame through the RPN, correcting the anchor frame according to an output result of the RPN regression branch, and selecting a preset number of anchor frames to form a suggestion window.

Specifically, pixel points of the feature map serve as feature points, each feature point generates a plurality of anchor frames (anchors) with different widths and heights, sorting is performed from high to low according to intersection-parallel ratios of the anchor frames and the real stone frames (ratios of intersections and unions of the anchor frames and the real stone frames), and M anchor frames before sorting are taken as suggestion windows (propusals), namely, as a first result, M can be valued according to actual needs, wherein in the embodiment, the value of M is 3000. And calculating the initial offset of the M anchor frames and the real stone frame, correcting the anchor frames through the regression branch of the RPN, and updating the parameters of the Mask RCNN neural network through a gradient descent method.

For example, 9 anchor frames are generated on each feature point, and the width and height of the 9 anchor frames are different. For example, a dot is a certain feature point, a square frame is 9 anchor frames with different scales generated by the feature point, an ellipse is two overlapped stones, and anchor frames with scales and spatial positions close to the two stones are selected from the 9 anchor frames according to the intersection ratio to serve as a suggested window for fine segmentation of a mask later.

S4: and mapping the suggestion windows to the feature map of the last layer of the CNN, and enabling each suggestion window to generate a fixed-size RoI feature map through a RoI Align layer.

Specifically, the ROI Pooling layer pools the corresponding region in the feature map into a fixed-size feature map according to the position coordinates of the suggested window for subsequent classification and bounding box regression operations. Since the position of the proposed window is usually derived from model regression, it is generally a floating point number, whereas the pooled feature map requires a fixed size. For example, the size of ROI (region of interest) is (7,6), and ROI Pooling is a part divided into (6,6), and the conversion from (7,6) to (6,6) brings loss of a certain pixel at the edge, and ROI (7,6) is interpolated and expanded to (12,12) by bilinear interpolation, and then ROI (6,6) is regenerated.

S5: and (4) classifying the RoIs by using the full connection layer and performing frame regression, generating a mask of each RoI through the FCN, and segmenting to obtain the stone outline.

Specifically, feature vectors with fixed lengths are mapped through the full connection layer, the fact that the frame belongs to the background or the stone is judged through the softmax function, and the background frame is removed. Mask information of each pixel in the image is generally expressed by 0 and 1, wherein 0 represents background, 1 represents mask value of corresponding pixel, and mask of each RoI is generated through FCN, that is, stone contour of each stone is predicted, that is, second result.

S6: and calculating the offset between the stone outline and the real outline marked by the sample image, and updating the parameters of the Mask RCNN neural network according to the offset.

Specifically, the offset between the stone profile and the actual frame is calculated, and parameters of the Mask RCNN neural network are updated by using a gradient descent method.

S7: judging whether the offset reaches the standard, if not, repeating the steps; if yes, finishing the training of the Mask RCNN model.

Specifically, after one round of image input → first result → gradient descent method update Mask RCNN neural network → second result → gradient descent method update Mask RCNN neural network ", the Mask RCNN neural network is continuously updated and continuously learned, and finally the outline of the stone can be accurately predicted.

Optionally, in step S1, acquiring the detection image and the sample image includes:

s11: and deleting the folder which originally stores the test picture, and rebuilding a new empty folder.

S12: and carrying out distortion calibration processing on the detection image and the sample image, and then carrying out histogram equalization processing.

Specifically, the camera calibration for distortion calibration is carried out on the industrial camera, the industrial camera extracts corner point information of a calibrated picture, corresponding relation parameters of the size and the position of the image and the size and the position corresponding to an actual chessboard are calculated through the corner point information and actual corner point position distance information, then an internal reference matrix and an external reference matrix of the industrial camera are obtained, the internal reference coefficient and the external reference coefficient can correct the image shot by the camera later, an image with relatively small distortion is obtained, and the follow-up more accurate and real image can be obtained.

The RGB image is converted into the YCrCb image, histogram equalization processing is carried out on the brightness channel of the image, and then the YCrCb image is converted into the RGB image, so that the problem of overexposure or over-darkness of the image is solved, and the detection and the stone segmentation are facilitated.

Optionally, after step S12, that is, after performing distortion calibration processing on the detection image and the sample image, and then performing histogram equalization processing, the method further includes:

s13: the detection image and the sample image are evenly divided into a plurality of result images with preset sizes, and overlapping areas exist between the adjacent result images.

S14: and performing rotation transformation and/or scaling transformation on the result image to obtain a plurality of detection images and sample images.

Specifically, for example, each image is uniformly cut into 9 result images of 3 × 3, and there is an overlapping portion of 10% area between adjacent result images. The processed pictures occupy less video memory when being sent to the Mask RCNN model for training, and the processing speed is higher.

And carrying out 7 times of rotation transformation with an angle of 45 degrees on the result image, carrying out the same transformation on the frame marked by the mask, storing the result of each transformation, and transforming each result image to obtain 8 images which are rotated by different angles and contain the original image, thereby expanding the data set and enabling the model to identify the stones placed at different angles. And performing J times of scaling expansion transformation on the result image, such as amplifying by 1 time, and reducing to 1/2, 1/4, 1/8 and the like to obtain N pieces of scaling expansion transformation images, so that the model can identify stones placed at different angles, and the Mask RCNN model can identify stones with different sizes.

Optionally, in step S6, calculating an offset between the stone outline and the real outline marked by the sample image, and updating parameters of the Mask RCNN neural network according to the offset, including:

s61: calculating the offset of the stone profile relative to the real profile by using a loss formula:

in the formula: loss is the offset, n is the number of samples,coordinates of coordinate axes of true contours, xiThe corresponding predicted coordinates for the stone profile.

Specifically, for example, 1 stone border is predicted, the coordinates of the upper left corner of the stone border are (10,10), and the coordinates of the upper left corner of the real stone border are (8,8), so that the offset of the predicted frame is 1/2 (2 × 2+ 2) ═ 4 through the Loss calculation formula, the offsets of all frames are calculated through the formula, the final offset is obtained by summing and averaging, then the gradient of the final offset is returned to the whole network by using a gradient descent method, and the Mask RCNN neural network performs parameter updating.

S62: recording the offset, drawing a loss curve of the offset, and adjusting the learning rate according to the loss curve.

S63: and adjusting the gradient of the offset according to the learning rate, and updating the parameters of the Mask RCNN neural network by using the gradient.

Specifically, the LEARNING RATE (LEARNING _ RATE) is adjusted according to the descending speed of the loss curve by drawing the loss curve in the training process, if the loss curve descends too slowly, the LEARNING RATE is increased, and if the fluctuation amplitude of the loss curve is larger than the threshold, the LEARNING RATE is over-large, and the LEARNING RATE is reduced. And judging whether the Mask RCNN model converges or is fitted according to whether the final loss curve is smooth, and accordingly increasing or decreasing the number of training rounds (EPOCHS).

Optionally, in step S62, recording the offset amount, drawing a loss curve of the offset amount, and adjusting the learning rate according to the loss curve, the method includes:

s621: and calculating the descending rate of the loss curve in a preset interval, and if the descending rate is smaller than a preset descending value, increasing the learning rate.

S622: and acquiring offset in a preset interval, calculating a difference value of adjacent offsets, and reducing the learning rate if the number of times that the difference value is smaller than a preset error is larger than a preset number of times.

Specifically, an initial learning rate is set, then the Mask RCNN model is trained, and a loss curve is drawn according to the training condition. If the initial learning rate is 0.1, the predetermined degradation value is 1, the predetermined number of times is 3, the predetermined error is-1, the number of training rounds of 10 adjacent times before the predetermined interval loss curve fitting, for example, the interval { a, B }, the difference between the adjacent offsets in the interval { a, B } is calculated, where X1 represents the offset of the previous round and X2 represents the offset of the next round, the difference is X1-X2, the average of the differences between all the offsets in the interval { a, B } is calculated, the average is the degradation rate, and if the degradation rate is 0.5 and 0.5 is less than 1, which indicates that the learning rate is too small, the learning rate is increased, for example, the learning rate is adjusted to 0.15.

And calculating the difference value of the adjacent offset values in the interval { A, B }, wherein the times of the difference value being less than-1 are 5 times, 5 is more than 3, the fluctuation amplitude value of the loss curve being more than the threshold value is shown, and if the learning rate is too large, the learning rate is reduced, and if the learning rate is adjusted to be 0.05. For easy understanding, L1 shows a normal loss curve, L2 shows a loss curve with an excessively small learning rate, and the learning rate needs to be increased because the descending speed is slower than that of L1; l3 represents a loss curve with an excessive learning rate, and the loss curve has a large fluctuation amplitude and needs to be reduced.

Optionally, in step S63, adjusting a gradient of the offset according to the learning rate, and updating parameters of the Mask RCNN neural network by using the gradient, includes:

s631: the derivative is taken of x by a loss formula to obtain a derivative with respect to x.

S632: and calculating the product of the learning rate and the derivative, and calculating the difference value between the original parameter of the Mask RCNN model and the product, wherein the difference value is the updated parameter of the Mask RCNN model.

Specifically, take the Loss function above as an example, falseThe predicted value of the coordinate is X, the Loss is derived from X, and the derivative can be regarded asIf the learning rate is 0.1, the gradient of the backward propagation isIf the original parameter of Mask RCNN model is H, thenAnd (5) updating parameters of the Mask RCNN model.

Optionally, in step S7, it is determined whether the offset reaches the standard, and if not, the above steps are repeated; if so, finishing the training of the Mask RCNN model, comprising the following steps:

s71: recording the number of rounds of which the offset is smaller than the preset offset value, and if the number of rounds of which the offset is smaller than the preset offset value is larger than the preset number of rounds, determining that the offset reaches the standard.

Specifically, for example, the predetermined number of rounds is 50, the predetermined offset value is set to X0, X0 is 0.5, the number of rounds with an offset smaller than 0.5 in the training is 60, and 60 is larger than 50, which indicates that the loss curve has been fitted, the offset reaches the standard, and the training of the Mask RCNN model is completed.

The embodiment of the application also discloses a particle size detection method, which comprises the following steps:

s100: and inputting the detection image into a Mask RCNN model obtained by the training method to obtain the stone outline.

S200: and mapping the stone contour to the detection image to obtain contour information of the stone, and calculating the particle size information of the stone according to the contour information.

Specifically, the mask output of the stone outline is mapped onto the detection image, the mask is drawn on the original image by using opencv, the speed is higher, the storage space is saved, and the drawn visualization result is stored in the root directory images/true _ result. And calculating the particle size of the stone, positioning the stone to the position of the stone with the over-standard size, and storing the result information in the root directory images/result.

And calculating the pixel area of each mask output by the model, wherein the pixel area can be regarded as the area of the stone, and screening out the masks with the pixel areas larger than a threshold value, so as to obtain the stones with the overproof sizes. Let the coordinates of each vertex of the stone profile be (X)0,Y0) Then, the contour area S:

then, the particle diameter R:

wherein each vertex coordinate (X) of the contour is determined according to0,Y0) Or, the perimeter D of the contour may be calculated, where the perimeter D is the sum of the distances of adjacent vertices, and the particle size R:

wherein each vertex coordinate (X) of the contour is determined according to0,Y0) And calculating the minimum circumscribed rectangle of the stone projection, thereby obtaining the length L and the width W of the stone projection, and then the particle size R:

or

Wherein alpha is122, typically α1、α21 is taken. The calculation of the particle size R can be compared according to the actual measurement effect, and then an appropriate formula is selected.

S300: and judging whether the particle size information exceeds a quantity threshold value, and if so, giving an early warning.

Specifically, the particle size data of each divided stone is calculated through the data such as the area, the perimeter, the length and the width of the minimum circumscribed rectangle of the stone, whether an over-scale alarm is triggered or not is detected according to an over-scale alarm rule, and whether the deviation from a standard curve is too large or not and whether a related alarm is triggered or not is judged according to a volume sifting distribution statistical curve calculated according to the particle size.

Optionally, in step S300, it is determined whether the particle size information exceeds the number threshold, and if so, performing an early warning, including:

s301: and comparing the particle size information with the preset particle size, and counting the number of the preset particle size to obtain the excess number if the particle size information is larger than the preset particle size.

S302: and comparing the excess number with a number threshold, and if the excess number is greater than the number threshold, performing early warning.

Specifically, S, D, L, W, R and other information is obtained through calculation, particle size distribution statistics is carried out, an out-of-specification alarm is judged according to configured out-of-specification alarm conditions, particle size detection is carried out according to configured particle size detection judgment conditions, and an out-of-specification alarm, particle size statistical data, curves, alarms and the like are formed. For example, the out-of-specification alarm may set a maximum value of the long side L, a threshold value of the number of stones exceeding the maximum value, and an out-of-specification alarm may be triggered if the number exceeds the threshold value. The maximum value of L is 5, the stone quantity threshold value is 10, the quantity of the long side L of the detected grain diameter, which is larger than 5, is 15, and the quantity of the long side L of the detected grain diameter is larger than 10, and an out-of-specification alarm is sent out if the quantity of the long side L of the detected grain diameter is larger than 15 and 15 is larger than 10.

The maximum value of the long side L and the short side W can be set for the over-standard alarm, the quantity threshold value of the stones exceeding the maximum value is exceeded, and the over-standard alarm is triggered when the quantity threshold value is exceeded.

The maximum value of the area S can be set for the out-of-specification alarm, the quantity threshold of the stones exceeding the maximum value S is triggered when the quantity threshold is exceeded.

The particle size detection may set a threshold value of the particle size statistical curve deviating from the set standard curve, and if the threshold value is exceeded, the particle size distribution is considered to be abnormal, and an alarm is triggered, for example, a statistical graph of the particle sizes is drawn according to the calculated particle sizes, the distribution number of the particle sizes smaller than 5 and the distribution number of the particle sizes larger than 5 are counted, and if the distribution number of the particle sizes larger than 5 is continuously increased, the particle size distribution is considered to be abnormal.

The alarm detection rules can be specified according to actual conditions, and some measures for alarm suppression are taken to avoid too frequent alarms, such as: and occasionally, exception is not triggered by one-time exception, and alarm is triggered by multiple times of continuous exceeding rules within a certain time period.

The foregoing is a preferred embodiment of the present application and is not intended to limit the scope of the application in any way, and any features disclosed in this specification (including the abstract and drawings) may be replaced by alternative features serving equivalent or similar purposes, unless expressly stated otherwise. That is, unless expressly stated otherwise, each feature is only an example of a generic series of equivalent or similar features.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:火焰检测方法、装置、计算机设备和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!