CN116993710A - Spinning process detection method and device, electronic equipment and storage medium - Google Patents

Spinning process detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116993710A
CN116993710A CN202311041139.6A CN202311041139A CN116993710A CN 116993710 A CN116993710 A CN 116993710A CN 202311041139 A CN202311041139 A CN 202311041139A CN 116993710 A CN116993710 A CN 116993710A
Authority
CN
China
Prior art keywords
relu activation
activation function
linear function
threshold
function
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.)
Pending
Application number
CN202311041139.6A
Other languages
Chinese (zh)
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.)
Zhejiang Hengyi Hi Tech Materials Co ltd
Zhejiang Hengyi Petrochemical Co ltd
Original Assignee
Zhejiang Hengyi Hi Tech Materials Co ltd
Zhejiang Hengyi Petrochemical 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 Zhejiang Hengyi Hi Tech Materials Co ltd, Zhejiang Hengyi Petrochemical Co ltd filed Critical Zhejiang Hengyi Hi Tech Materials Co ltd
Priority to CN202311041139.6A priority Critical patent/CN116993710A/en
Publication of CN116993710A publication Critical patent/CN116993710A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30124Fabrics; Textile; Paper
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/06Recognition of objects for industrial automation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Medical Informatics (AREA)
  • Image Analysis (AREA)

Abstract

The disclosure provides a method and a device for detecting spinning technology, electronic equipment and a storage medium. The method comprises the following steps: acquiring an image to be detected of a spinning box body; inputting an image to be detected into a yarn path inspection model to obtain a detection result of a spinning process; the improved ReLU activation function comprises a first linear function and a second linear function, and the slope difference of the first linear function and the second linear function is smaller than a preset threshold; the first linear function is used for extracting characteristics of input parameters within a first threshold range; the second linear function is used to perform feature extraction on input parameters that are within a second threshold range. According to the scheme of the disclosure, the efficiency of yarn detection can be improved by taking the improved ReLU activation function as the activation function of the yarn inspection model.

Description

Spinning process detection method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of artificial intelligence, and in particular relates to a detection method and device for a spinning process, electronic equipment and a storage medium.
Background
Spinning is an important step in the yarn production process. In the spinning process, the filament yarn is thinner, has different forms and high degree of compounding, and is easy to be influenced by the process, equipment and production environment to generate the problems of filament floating, filament breakage, filament misplacement and the like.
For the above problems, the existing solutions are usually manual detection. A certain number of inspection robots are arranged in a production workshop to detect spinning equipment. The inspection robot can collect images of the spinning equipment for manual detection, but the manual detection efficiency is low.
Disclosure of Invention
The present disclosure provides a method, apparatus, electronic device, and storage medium for detecting a spinning process, so as to solve or alleviate one or more technical problems in the prior art.
In a first aspect, the present disclosure provides a method for detecting a spinning process, comprising:
acquiring an image to be detected of a spinning box body;
inputting an image to be detected into a yarn path inspection model to obtain a detection result of a spinning process;
the improved ReLU (Rectified Linear Unit, modified linear unit) activation function is included in the circuit inspection model, the improved ReLU activation function includes a first linear function and a second linear function, and the slope difference of the first linear function and the second linear function is smaller than a preset threshold; the first linear function is used for extracting characteristics of input parameters within a first threshold range; the second linear function is used to perform feature extraction on input parameters that are within a second threshold range.
In a second aspect, the present disclosure provides a detection device for a spinning process, comprising:
the acquisition module is used for acquiring an image to be detected of the spinning manifold;
the input module is used for inputting the image to be detected into the yarn inspection model to obtain a detection result of the spinning process;
the improved ReLU activation function comprises a first linear function and a second linear function, and the slope difference of the first linear function and the second linear function is smaller than a preset threshold; the first linear function is used for extracting characteristics of input parameters within a first threshold range; the second linear function is used to perform feature extraction on input parameters that are within a second threshold range.
In a third aspect, an electronic device is provided, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the embodiments of the present disclosure.
In a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are for causing the computer to perform a method according to any one of the embodiments of the present disclosure.
In a fifth aspect, a computer program product is provided, comprising a computer program which, when executed by a processor, implements a method according to any of the embodiments of the present disclosure.
The beneficial effects of the technical scheme provided by the disclosure at least include: the characteristic of the image can be automatically extracted by the screw inspection model, the characteristic is not dependent on manual extraction, and the improved ReLU activation function is used as the activation function of the screw inspection model, so that the screw inspection model improves the efficiency of screw inspection under the condition of stronger expression capability.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
In the drawings, the same reference numerals refer to the same or similar parts or elements throughout the several views unless otherwise specified. The figures are not necessarily drawn to scale. It is appreciated that these drawings depict only some embodiments provided according to the disclosure and are not to be considered limiting of its scope.
FIG. 1 is a schematic illustration of a spin beam according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of a method of detecting a spinning process according to one embodiment of the disclosure;
FIG. 3 is a flow diagram of training a road patrol model according to an embodiment of the disclosure;
FIG. 4 is a schematic diagram of a structure for detecting images of different scales in accordance with an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a neural network in a road patrol model according to an embodiment of the disclosure;
FIG. 6 is a schematic diagram of improving a ReLU activation function in accordance with an embodiment of the disclosure;
FIG. 7 is a schematic structural view of a detecting device for spinning process according to an embodiment of the present disclosure;
fig. 8 is a block diagram of an electronic device for implementing a method of detecting a spinning process in accordance with an embodiment of the disclosure.
Detailed Description
The present disclosure will be described in further detail below with reference to the accompanying drawings. In the drawings, like reference numbers indicate identical or functionally similar elements. Although various aspects of the embodiments are illustrated in the accompanying drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
In addition, numerous specific details are set forth in the following detailed description in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements, circuits, etc. well known to those skilled in the art have not been described in detail in order not to obscure the present disclosure.
A schematic of the spinning beam is shown in fig. 1. Wherein the threads are off-white and the threads are similar in color to the background plate, which makes it difficult to detect the thread condition at the background plate.
The spinning process can be detected manually, but the cost of labor is high and the efficiency is low. Because the silk thread is thin (the minimum aperture is 0.06 mm) and many (a bundle of silk has 576 silk compound at most), the worker is easy to use excessive etc. for long-term inspection, and the manual inspection is easy to appear and leak inspection, thus leading to inaccurate manual detection result.
In order to automatically detect the silk thread, so as to reduce the cost of silk thread detection and improve the accuracy of silk thread detection, the embodiment of the disclosure designs a detection method of a spinning process. As shown in fig. 2, a flow chart of the method includes the following:
s201, obtaining an image to be detected of the spinning manifold.
The image to be detected of the spinning beam can be understood as an image obtained by image acquisition of the spinning beam by the road inspection robot. The spinning box body is provided with a spinning line inspection robot, a spinning line inspection robot and a spinning line inspection system, wherein the spinning line inspection robot can periodically acquire images of the spinning box body so as to facilitate the detection of a spinning process.
Besides the wire inspection robot, a plurality of USB (Universal Serial Bus, universal thread bus) infrared cameras can be installed in the spinning box body to shoot wires and spinning equipment, and an original image is acquired from the USB infrared cameras by using opencv (Open Source Computer Vision Library ).
The collected images can be screened no matter what mode is adopted, and the images meeting the detection requirements are selected as images to be detected. For example, quality evaluation is performed on the acquired images, and the image with better quality is selected as the image to be detected. Of course, in the embodiment of the present disclosure, the method for acquiring the image to be detected is not limited, and the requirement may be set according to the actual requirement.
In the embodiment of the disclosure, the image to be detected can be preprocessed, so that the accuracy of detection is improved. Because the color of the spinning background plate is very similar to that of the silk thread, the image enhancement can be carried out on the image to be detected, the problems of low contrast, fuzzy details and the like in the image to be detected are relieved, and the characteristics of the image to be detected are easier to extract.
The method of image enhancement in the embodiments of the present disclosure is not limited, and for example, an image enhancement algorithm such as MSRCR (Multiscale Retinex with Color Restoration, multi-scale retinal enhancement algorithm with color recovery) may be used.
In some possible embodiments, the preprocessing may further include noise reduction, normalization, and graying.
S202, inputting an image to be detected into a yarn inspection model to obtain a detection result of a spinning process; the improved ReLU activation function comprises a first linear function and a second linear function, and the slope difference of the first linear function and the second linear function is smaller than a preset threshold; the first linear function is used for extracting characteristics of input parameters within a first threshold range; the second linear function is used to perform feature extraction on input parameters that are within a second threshold range.
Since the image features extracted from the shallow network are generally some shallow features, learning cannot be performed well. Thus, in the embodiments of the present disclosure, a circuit inspection model, such as a ResNet101 (Residual Network 101 layers) Network, is constructed using a deep neural Network as a base Network, but is not limited to a ResNet101 Network.
In the embodiment of the disclosure, the slope difference of the first linear function and the second linear function of the modified ReLU activation function is smaller than the preset threshold, and similar features between the input parameters of the first threshold range and the second threshold range can be extracted. For example, the characteristics of the silk thread similar to the background plate can enable the silk thread inspection model to extract effective characteristics under the condition of stronger expression capacity so as to improve the accuracy of silk thread detection. In addition, the color difference of the silk thread and the background plate is in a section, namely, some background plate characteristic values are smaller than the silk thread characteristic values, and some background plate characteristic values are larger than the silk thread characteristic values, so that the slopes of the first linear function and the second linear function are consistent, and the characteristics in the section can be learned uniformly, so that effective characteristics can be extracted conveniently. In addition, the improved ReLU activation function is added into the yarn inspection model, so that the characteristics of the image to be detected can be automatically extracted, the characteristics are not extracted manually, and the efficiency of spinning process detection is improved.
As shown in fig. 1, the image to be detected at least includes the image content of the silk thread and the background plate. The detection content of the spinning process comprises at least one of the following steps: floating silk, broken silk, wrong silk, improper guide wire hook, improper nozzle tip, foreign matter on the silk path, etc.
In the embodiment of the disclosure, defects in the spinning process can be found in time by detecting various abnormal conditions of the spinning process, so that corresponding repair measures can be adopted in a targeted manner later. The spinning quality is improved, and the probability of spinning defects produced by modern textile machine equipment is reduced to the minimum possible.
In the embodiment of the present disclosure, before step S202 is performed, the road inspection model may be trained based on the sample image, and the training process is as follows in fig. 3:
s301, labeling the sample image.
In the embodiment of the disclosure, in order to increase the effect of model training, the training sample set may be expanded before labeling the sample image, so as to obtain a richer training sample set. The sample image can be rotated (90 degrees/180 degrees/270 degrees), flipped (horizontal/vertical) and translated (+ -10) pixels, so that the data are more balanced, the model training result is better, and the detection result is more accurate. The method for amplifying the data is not limited in the present disclosure, and a proper processing method or a combination of multiple methods can be selected to expand the training sample according to the specific task needs.
In some embodiments, labeling the sample images may use an image labeling tool to create label data for each sample image. The label data refer to the corresponding silk threads in the sample image and abnormal conditions of the production process. In the embodiment of the disclosure, abnormal conditions of the silk thread include broken silk, floating silk, wrong silk and the like, and abnormal conditions of the spinning equipment include improper nozzle, improper yarn guide hook and the like, foreign matters on the silk road and the like. In implementation, labelImg (labeling image) can be selected as an image labeling tool, and labelImg tag data is defined as the category shown in table 1:
TABLE 1
Broken yarn Floating yarn Staggered yarn Malposition of oil nozzle Misalignment of guide wire hook Foreign matter on the wire
BF FF SF YZNG GSGNG FMSR
The embodiment of the disclosure does not limit the labeling method, and the image labeling method can be flexibly selected according to actual conditions during implementation.
S302, a training set and a verification set are established based on the sample image and the label data.
And dividing the marked sample image into a training set and a verification set according to a preset proportion. The preset proportion can be adjusted according to actual requirements. The training set is used for training the yarn inspection model to gradually improve the performance of the yarn inspection model on yarn inspection, achieve better learning effect and improve the accuracy of yarn inspection. The verification set is used for verifying the trained road inspection model and judging whether the trained road inspection model achieves the actually required detection effect.
S303, initializing a wire road inspection model to obtain the wire road inspection model to be trained.
In the embodiment of the disclosure, a deep neural network is taken as a base line network, and an improved ReLU activation function is added into the neural network to construct a to-be-trained road inspection model.
In the embodiment of the disclosure, as targets in the captured image to be detected have various scales, the occupation of the threads in the whole image is small and dense. It is therefore difficult to generate finer granularity features to help distinguish categories using a single deep neural network to extract target features. Further improvements may be made to the deep neural network in embodiments of the present disclosure to extract finer granularity features on the image to be detected.
Taking a ResNet101 network as an example, a scale classification standard is introduced on the basis of the ResNet101 network, and different training strategies are used for different scale targets. First, to obtain fine-grained knowledge of images to be detected at different scales, embodiments of the present disclosure divide the images to be detected into two classes according to classification criteria, into large-scale objects (e.g., a nipple, a wire guide hook), and small-scale objects (e.g., a wire). Wherein, the images to be detected can be classified by using a tridentNet (trigeminal network) network. The use level of the Trident block in the Trident net in the res net101 network is not limited, and the Trident block can be used at the input position of the res net101 network or at the network position of the middle level of the res net101 network.
In the embodiments of the present disclosure, the complexity of the spinning process is considered. The detection content of the small-scale object can comprise yarn floating yarn, broken yarn and foreign matter on a yarn path. The detection content of the large-scale object comprises the malposition of the oil nozzle and the malposition of the guide wire hook.
In addition to employing a ResNet101 network, in embodiments of the present disclosure, a yolt (You Only Look Twice, only twice seen) network may be used to detect objects of different dimensions. For example, as shown in fig. 4, for a small-scale object, an image to be detected may be output cut into image blocks of a×a size with C% overlap between each image block. For large scale objects, the image to be detected may be segmented into b×b size outputs with D% overlap between each image block. The size of A, B, C, D can be adjusted according to the actual situation. The cut images have a certain overlapping rate, so that the loss of partial areas of the images to be detected in the cutting process can be avoided, and the characteristics of the images to be detected are kept more completely.
In the embodiment of the disclosure, different prediction networks are generated for images to be detected with different scales in order to obtain better characteristic representation. For example, as shown in FIG. 4, a small-scale object generates 26X 26 image blocks using A X A size, C% overlapping image blocks as input to the yolt1 network, in order to describe the differences between different small objects with more dimensional (26X 26) features. Large scale objects generate 19 x 19 image blocks using B x B size, D% overlapping image blocks as input to the yolt2 network in order to describe differences between different small objects with fewer dimensional (19 x 19) features. The image blocks processed by the ylot network are used for classification regression as shown in fig. 4. The classification of the small-scale object comprises classifying silk threads in an image to be detected into various types such as floating silk, broken silk, wrong silk, foreign matters on a silk path and the like, and regression can be used for determining the abnormal positions of the silk threads in the image to be detected. Classification of large scale objects includes glib and guide wire hook misalignment, regression may be used to determine the location of glib and guide wire hook misalignment.
In the embodiment of the disclosure, the yarn inspection model realizes a unique network structure, has a denser final prediction network, helps to distinguish categories by generating finer-granularity characteristics, and improves the accuracy and efficiency of spinning process detection.
The to-be-trained road inspection model is trained to establish a mapping relation between the to-be-detected images and the corresponding recognition results. In order to avoid the problem that the input parameters of the activation function have gradient disappearance and neuronal death in the negative interval, the embodiment of the disclosure improves the characteristic that the ReLU activation function introduces a small slope in the negative area (i.e. the first threshold range), and designs the first linear function. During training, these inhibited neurons can be activated, even in the negative region, increasing the expression capacity of the network.
In the disclosed embodiments, the modified ReLU activation function is applied to the hidden layer. As shown in fig. 5, the neural network has some neuron layers in the middle in addition to the input layer and the output layer. In a three-layer neural network, the middle neuron layer is called the hidden layer.
In the disclosed embodiments, the hidden layer uses an activation function to introduce a nonlinear transformation. Enabling it to learn complex nonlinear relationships. In addition, the activation function in the hidden layer may also limit the output of the neural network layer to a certain range, such as mapping the output onto the interval of [0,1 ].
In some embodiments, the modified ReLU activation function is applied within a specified range of levels from the input layer in the hidden layer, and between two levels of at least one set of adjacent convolutional layers.
For example, as shown in fig. 5, the hidden layer includes n convolution layers, and the modified ReLU activation function is located within a hierarchical range of m layers from the input layer. At least one improved ReLU activation function can be added in the range, and the implementation can be flexibly determined according to actual requirements. Fig. 5 illustrates the addition of 3 modified ReLU activation functions. An improved ReLU activation function 1 is added between the first and second ones of the hidden layers. Modified ReLU activation function 2 is added at the kth and kth+1th convolutional layers, where 1< k < m. An improved ReLU activation function 3 is added at the m-1 and m-th convolution layers.
In the embodiment of the disclosure, the activation function is added to the low feature processing layer (namely within a specified level range from the input layer), so that the original input data can be subjected to preliminary feature extraction. Because the silk thread target is smaller, the abundant characteristics of the image to be detected can be reserved by adding the activation function in the low-characteristic processing layer, so that the network can better extract important characteristics in the image to be detected, and the accuracy of silk thread detection is improved. In addition, the improved ReLU activation function is added to a part of the layer of the hidden layer, so that the calculated amount in the training process of the screw inspection model can be reduced, and the computer resources are saved.
In some embodiments, the input parameters of the modified ReLU activation function are the output parameters of the neurons of the previous level of the modified ReLU activation function; the output parameter of the modified ReLU activation function is the input of the next level neuron of the modified ReLU activation function.
The input to improve the ReLU activation function is a weighted input to the neuron, which is obtained by multiplying the input features with corresponding weights and summing. The output of the modified ReLU activation function is the activation state of the neuron, which converts the weighted input into a nonlinear output that is passed to the next layer of neurons or as the final output of the model.
In the embodiment of the disclosure, the improved ReLU activation function weights and converts the input of the neurons of the upper level into nonlinear output, and transmits the nonlinear output to the neurons of the lower level, so that the expression and learning capacity of the road inspection model are improved.
The appropriate activation function determines the ability of the model to solve complex tasks. Therefore, in the embodiment of the disclosure, an improved ReLU activation function is added to the wire inspection model to improve the accuracy of the wire inspection model in detecting the wire. In the embodiment of the disclosure, the ReLU activation function is improved to be a piecewise function, so that effective characteristics can be extracted by using lower calculation amount, and the output parameters of the improved ReLU activation function are divided into three threshold ranges. Wherein:
the first threshold range is the portion of the modified ReLU activation function where the input parameter is less than the first threshold;
the second threshold range is a portion of the modified ReLU activation function where the input parameter is greater than the second threshold;
the third threshold range is a portion of the modified ReLU activation function where the input parameter is greater than the first threshold and less than the second threshold.
In the disclosed embodiments, three threshold ranges are designed, a third threshold range can be used to extract the main features that improve the ReLU activation function input parameters. And input parameters in the first threshold value and the second threshold value range are not simply discarded, but part of the input parameters are taken for feature extraction, so that the features of the part of the region can be extracted in limited calculation, and the accuracy of yarn detection is improved.
In some embodiments, to perform feature extraction with less computation, linear functions are used in all three threshold ranges, such as a first linear function for performing feature extraction on input parameters in a first threshold range. The second linear function is used for extracting characteristics of input parameters in a second threshold range. The third linear function is used for extracting characteristics of input parameters in a third threshold range.
In the spinning process detection scene, the image content is not complex, and the linear function is adopted, so that not only can the effective characteristics be extracted for the detection of the spinning process, but also the detection efficiency can be improved.
In the embodiment of the disclosure, the first linear function is designed within the first threshold range, so that the problem of gradient disappearance is effectively avoided. And a second linear function is designed in the second threshold range, so that the convergence trend of the model can be slowed down under the condition of smaller slope, and the gradient explosion problem caused by a large amount of data in the depth network can be prevented. In addition, the three linear functions are arranged to extract the characteristics in different threshold ranges, so that the calculation amount of the road inspection model in the training process is effectively reduced while the important characteristics are reserved, and the computer resources are saved.
In some embodiments, the calculation formula for improving the ReLU activation function is shown as expression (1):
where x is the input parameter for improving the ReLU activation function. a. b, c, d are constants. The difference between a and c is smaller than a preset threshold value and has smaller value, such as 0.01 and 0.02.e is a first threshold and f is a second threshold. The value of a, b, c, d, e, f can be adjusted in the process of model training and detection to achieve better learning effect.
For example, in the model training process, a set of parameter values of the improved ReLU activation function with better learning effect is obtained, which can be expressed as expression (2), and the function image is shown in fig. 6:
in some embodiments, the first threshold range is a portion of the modified ReLU activation function where the input parameter is less than the first threshold. The second threshold range is a portion of the modified ReLU activation function where the input parameter is greater than the second threshold. The third threshold range is a portion of the improved ReLU activation function where the input parameter is greater than the first threshold and less than the second threshold. As shown in expression (1), the portion of x > e is a first threshold range, the portion of x.ltoreq.f is a second threshold range, and f < x.ltoreq.e is a third threshold range.
In design, the minimum value of the first linear function corresponds to the maximum value of the third linear function, and there is generally a smooth transition from the third linear function to the first linear function.
In the embodiment of the disclosure, the smaller slopes of the first linear function and the second linear function effectively solve the problems of gradient disappearance and gradient explosion. And the slopes of the first linear function and the second linear function are smaller than the preset threshold, so that the similar characteristics between the input parameters in the first threshold range and the second threshold range can be ensured to be extracted, for example, the characteristics of the silk threads similar to the background plate can be effectively extracted, and the accuracy of silk thread detection is improved. Furthermore, the use of linear functions for feature extraction reduces the computational effort in model training.
S304, training the to-be-trained screw inspection model by adopting a training set to obtain the screw inspection model.
The training set is input into a to-be-trained wire inspection model for training, parameters are correspondingly adjusted according to actual conditions until the loss value of the model tends to be stable, and the model converges to obtain the wire inspection model.
In addition, in the process of training the model, the model can be optimized by using a model optimization method so as to obtain a better effect. For example using an RMSProp (Root Mean Square Propagation ) optimizer or Adam (Adaptive Moment Estimation, adaptive moment estimation) optimizer, which is not limited by the present disclosure.
S305, testing the wire inspection model on the verification set to obtain the wire inspection model meeting the detection requirements.
As shown in table 2, to compare the results of the spinning process detection with the modified ReLU activation function and the original ReLU activation function provided by the embodiments of the present disclosure, it can be known based on table 2 that the modified ReLU activation function provided by the embodiments of the present disclosure can effectively detect the problems in the spinning process.
TABLE 2
Based on the same technical concept, the embodiment of the present disclosure further provides a detection device 700 for a spinning process, as shown in fig. 7, including:
the acquisition module 701 is used for acquiring an image to be detected of the spinning manifold;
the input module 702 is configured to input an image to be detected into the yarn inspection model to obtain a detection result of the spinning process;
the improved ReLU activation function comprises a first linear function and a second linear function, and the slope difference of the first linear function and the second linear function is smaller than a preset threshold; the first linear function is used for extracting characteristics of input parameters within a first threshold range; the second linear function is used to perform feature extraction on input parameters that are within a second threshold range.
In some embodiments, the circuit inspection model includes an input layer, a hidden layer, and an output layer;
wherein the modified ReLU activation function is applied to the hidden layer.
In some embodiments, the modified ReLU activation function is applied within a specified hierarchical range from the input layer in the hidden layer.
In some embodiments, the input parameters of the modified ReLU activation function are the output parameters of the neurons of the previous level of the modified ReLU activation function;
the output parameter of the modified ReLU activation function is the input of the next level neuron of the modified ReLU activation function.
In some embodiments, the modified ReLU activation function includes three threshold ranges, wherein:
the first threshold range is a portion of the modified ReLU activation function where the input parameter is less than the first threshold;
the second threshold range is a portion of the modified ReLU activation function where the input parameter is greater than the second threshold;
the third threshold range is a portion of the improved ReLU activation function where the input parameter is greater than the first threshold and less than the second threshold.
In some embodiments, the modified ReLU activation function includes three linear functions, wherein:
the first linear function is used for extracting characteristics of input parameters in a first threshold range;
the second linear function is used for extracting characteristics of input parameters in a second threshold range;
the third linear function is used for extracting characteristics of input parameters in a third threshold range;
in some embodiments, the expression of the first linear function is ax+b; the expression of the second linear function is cx; the expression of the third linear function is dx; wherein x is an input parameter for improving the ReLU activation function; a. b, c and d are constants; the difference between a and c is less than a preset threshold.
In some embodiments, the detection of the spinning process includes at least one of: floating silk, broken silk, staggered silk, improper guide wire hook, improper nozzle tip and foreign matter on the silk road.
For descriptions of specific functions and examples of each module and sub-module of the apparatus in the embodiments of the present disclosure, reference may be made to the related descriptions of corresponding steps in the foregoing method embodiments, which are not repeated herein.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related user personal information all conform to the regulations of related laws and regulations, and the public sequence is not violated.
Fig. 8 is a block diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 8, the electronic device includes: a memory 810 and a processor 820, the memory 810 storing a computer program executable on the processor 820. The number of memory 810 and processors 820 may be one or more. The memory 810 may store one or more computer programs that, when executed by the electronic device, cause the electronic device to perform the methods provided by the method embodiments described above. The electronic device may further include: and the communication interface 830 is used for communicating with external devices and performing data interaction transmission.
If the memory 810, the processor 820, and the communication interface 830 are implemented independently, the memory 810, the processor 820, and the communication interface 830 may be connected to each other and perform communication with each other through buses. The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 8, but not only one bus or one type of bus.
Alternatively, in a specific implementation, if the memory 810, the processor 820, and the communication interface 830 are integrated on a chip, the memory 810, the processor 820, and the communication interface 830 may communicate with each other through internal interfaces.
It should be appreciated that the processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or any conventional processor or the like. It is noted that the processor may be a processor supporting an advanced reduced instruction set machine (Advanced RISC Machines, ARM) architecture.
Further, optionally, the memory may include a read-only memory and a random access memory, and may further include a nonvolatile random access memory. The memory may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), programmable ROM (PROM), erasable Programmable ROM (EPROM), electrically Erasable EPROM (EEPROM), or flash Memory, among others. Volatile memory can include random access memory (Random Access Memory, RAM), which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic RAM (Dynamic Random Access Memory, DRAM), synchronous DRAM (SDRAM), double Data rate Synchronous DRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous DRAM (SLDRAM), and Direct RAMBUS RAM (DR RAM).
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in accordance with the embodiments of the present disclosure are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, data subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, bluetooth, microwave, etc.) means. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., digital versatile Disk (Digital Versatile Disc, DVD)), or a semiconductor medium (e.g., solid State Disk (SSD)), etc. It is noted that the computer readable storage medium mentioned in the present disclosure may be a non-volatile storage medium, in other words, may be a non-transitory storage medium.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
In the description of embodiments of the present disclosure, a description of reference to the terms "one embodiment," "some embodiments," "examples," "particular examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
In the description of the embodiments of the present disclosure, unless otherwise indicated, "/" means or, for example, a/B may represent a or B. "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone.
In the description of the embodiments of the present disclosure, the terms "first," "second," and "second" are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the embodiments of the present disclosure, unless otherwise indicated, the meaning of "a plurality" is two or more.
The foregoing description of the exemplary embodiments of the present disclosure is not intended to limit the present disclosure, but rather, any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (18)

1. A method of detecting a spinning process comprising:
acquiring an image to be detected of a spinning box body;
inputting the image to be detected into a yarn inspection model to obtain a detection result of a spinning process;
the improved ReLU activation function comprises a first linear function and a second linear function, and the slope difference of the first linear function and the second linear function is smaller than a preset threshold; the first linear function is used for extracting characteristics of input parameters within a first threshold range; the second linear function is used for extracting characteristics of input parameters within a second threshold range.
2. The method of claim 1, wherein the wire inspection model comprises an input layer, a hidden layer, and an output layer;
the modified ReLU activation function is applied to the hidden layer.
3. The method of claim 2, wherein the modified ReLU activation function is applied within a specified hierarchical range from an input layer in the hidden layer.
4. A method according to claim 2 or 3, wherein the input parameters of the modified ReLU activation function are the output parameters of the neurons of the previous level of the modified ReLU activation function;
the output parameter of the modified ReLU activation function is the input of the next level neuron of the modified ReLU activation function.
5. The method of any of claims 1-4, the modified ReLU activation function comprising three threshold ranges, wherein:
the first threshold range is the portion of the modified ReLU activation function where the input parameter is less than the first threshold;
the second threshold range is the portion of the modified ReLU activation function where the input parameter is greater than the second threshold;
the third threshold range is a portion of the modified ReLU activation function where the input parameter is greater than the first threshold and less than the second threshold.
6. The method of claim 5, wherein the modified ReLU activation function comprises three linear functions, wherein:
the first linear function is used for extracting characteristics of input parameters in the first threshold range;
the second linear function is used for extracting the characteristics of the input parameters in the second threshold range;
the third linear function is used for extracting characteristics of input parameters in the third threshold range.
7. The method of claim 6, wherein the first linear function has an expression of ax+b; the expression of the second linear function is cx; the expression of the third linear function is dx; wherein x is an input parameter of the modified ReLU activation function; a. b, c and d are constants; the difference between a and c is smaller than the preset threshold.
8. The method of any of claims 1-7, wherein the detected content of the spinning process comprises at least one of: floating silk, broken silk, staggered silk, improper guide wire hook, improper nozzle tip and foreign matter on the silk road.
9. A detection device for a spinning process, comprising:
the acquisition module is used for acquiring an image to be detected of the spinning manifold;
the input module is used for inputting the image to be detected into the yarn inspection model to obtain a detection result of the spinning process;
the improved ReLU activation function comprises a first linear function and a second linear function, and the slope difference of the first linear function and the second linear function is smaller than a preset threshold; the first linear function is used for extracting characteristics of input parameters within a first threshold range; the second linear function is used for extracting characteristics of input parameters within a second threshold range.
10. The apparatus of claim 9, wherein the wire inspection model comprises an input layer, a hidden layer, and an output layer;
the modified ReLU activation function is applied to the hidden layer.
11. The apparatus of claim 10, wherein the modified ReLU activation function is applied within a specified hierarchical range from an input layer in the hidden layer.
12. The apparatus according to claim 10 or 11, wherein the input parameters of the modified ReLU activation function are output parameters of a neuron of a previous level of the modified ReLU activation function;
the output parameter of the modified ReLU activation function is the input of the next level neuron of the modified ReLU activation function.
13. The apparatus of any of claims 9-12, the modified ReLU activation function comprising three threshold ranges, wherein:
the first threshold range is the portion of the modified ReLU activation function where the input parameter is less than the first threshold;
the second threshold range is the portion of the modified ReLU activation function where the input parameter is greater than the second threshold;
the third threshold range is a portion of the modified ReLU activation function where the input parameter is greater than the first threshold and less than the second threshold.
14. The apparatus of claim 13, wherein the modified ReLU activation function comprises three linear functions, wherein:
the first linear function is used for extracting characteristics of input parameters in the first threshold range;
the second linear function is used for extracting the characteristics of the input parameters in the second threshold range;
the third linear function is used for extracting characteristics of input parameters in the third threshold range.
15. The apparatus of claim 14, wherein the first linear function has an expression of ax+b; the expression of the second linear function is cx; the expression of the third linear function is dx; wherein x is an input parameter of the modified ReLU activation function; a. b, c and d are constants; the difference between a and c is smaller than the preset threshold.
16. The apparatus of any of claims 9-15, wherein the detected content of the spinning process comprises at least one of: floating silk, broken silk, staggered silk, improper guide wire hook, improper nozzle tip and foreign matter on the silk road.
17. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-8.
CN202311041139.6A 2023-08-17 2023-08-17 Spinning process detection method and device, electronic equipment and storage medium Pending CN116993710A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311041139.6A CN116993710A (en) 2023-08-17 2023-08-17 Spinning process detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311041139.6A CN116993710A (en) 2023-08-17 2023-08-17 Spinning process detection method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116993710A true CN116993710A (en) 2023-11-03

Family

ID=88530132

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311041139.6A Pending CN116993710A (en) 2023-08-17 2023-08-17 Spinning process detection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116993710A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117474907A (en) * 2023-12-25 2024-01-30 浙江恒逸石化有限公司 Method, device, equipment and storage medium for detecting wire outlet state

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117474907A (en) * 2023-12-25 2024-01-30 浙江恒逸石化有限公司 Method, device, equipment and storage medium for detecting wire outlet state
CN117474907B (en) * 2023-12-25 2024-03-22 浙江恒逸石化有限公司 Method, device, equipment and storage medium for detecting wire outlet state

Similar Documents

Publication Publication Date Title
CN110060237B (en) Fault detection method, device, equipment and system
CN108257121B (en) Method, apparatus, storage medium and the terminal device that product defects detection model updates
CN111932489A (en) Weld defect detection method, system, storage medium, computer device and terminal
CN111797890A (en) Method and system for detecting defects of power transmission line equipment
CN110807491A (en) License plate image definition model training method, definition detection method and device
US10636133B2 (en) Automated optical inspection (AOI) image classification method, system and computer-readable media
CN110930377B (en) Drainage pipeline abnormal type automatic detection method based on multitask learning
CN111914665B (en) Face shielding detection method, device, equipment and storage medium
CN116993710A (en) Spinning process detection method and device, electronic equipment and storage medium
CN114706358B (en) Method and system for processing welding process information of straight welded pipe
CN109993222B (en) Data anomaly detection system and method
CN112001406A (en) Text region detection method and device
CN111144425B (en) Method and device for detecting shot screen picture, electronic equipment and storage medium
US11132790B2 (en) Wafer map identification method and computer-readable recording medium
CN111340025A (en) Character recognition method, character recognition device, computer equipment and computer-readable storage medium
CN106997590A (en) A kind of image procossing and detecting system based on detection product performance
CN206897873U (en) A kind of image procossing and detecting system based on detection product performance
CN113487223A (en) Risk assessment method and risk assessment system based on information fusion
CN116363136B (en) On-line screening method and system for automatic production of motor vehicle parts
CN112784494A (en) Training method of false positive recognition model, target recognition method and device
CN112434600A (en) Unmanned aerial vehicle inspection method and system
CN111932515B (en) Short circuit detection method and system for product residual defects and defect classification system
CN107533748A (en) Component kind automatic distinguishing method, component kind automatic discrimination system, image procossing generate system with component data generation method and image procossing component data
CN115018842A (en) Defect detection method and device based on machine vision, terminal and storage medium
CN110728310B (en) Target detection model fusion method and fusion system based on super-parameter optimization

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