A system and method for identifying disordered cigarettes
By taking photos with PLC controller and industrial camera, combined with image processing and photocoupler recognition system, the problem of out-of-order cigarettes is automatically identified and dealt with, which solves the quality problems caused by out-of-order cigarettes during the transmission of cigarettes and improves the efficiency of product quality management. Efficiency and accuracy.
Patent Information
- Application Number
- CN202010129969.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-28
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-02-28
AI Technical Summary
In the production process of cigarette products, due to the disorder in the transmission process of cigarettes, quality problems of cigarettes are caused. The existing technology relies on manual inspection, which is time-consuming and labor-intensive and cannot be analyzed in real time, which brings risks to product quality.
An identification system composed of a PLC controller, industrial camera, image processing device and photoelectric coupler is used to determine the order of cigarettes through taking pictures and image processing, and sends out an enabling signal to identify out-of-order cigarettes, and can remind the operator through the industrial computer or Use the blower solenoid valve to automatically eliminate out-of-order cigarettes.
It realizes the automatic identification and processing of out-of-order cigarettes, reduces the time and energy of manual inspection, improves the efficiency of product quality management, and eliminates quality hazards caused by out-of-order cigarettes.
Smart Images

Figure CN111242099B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cigarette production, and in particular to a system and method for identifying disordered cigarettes. Background Art
[0002] In the production process of cigarette products, due to production site reasons, the qualified cigarettes produced by the cigarette machine (such as models: ZJ17, ZJ116, M5) need to be transported over long distances by belts, tracks, and motors to reach the packaging machine, where the packaging machine completes the packaging process to form finished cigarettes. The cigarette transmission process is complicated, and the cigarette flow is easily pulled and blocked by the aisle, resulting in disordered arrangement. Disordered cigarettes will have a greater impact on the quality of cigarettes, causing cigarettes to be wrinkled, deformed, and scratched. The lack of corresponding detection methods in the packaging machine brings risks to product quality. Once defective products enter the market, they will harm the interests of consumers. The existing method of detecting disordered cigarettes mainly involves manual observation with the naked eye by operators of the rolling and packaging machine group, and then identification. This manual detection has the following defects in quality inspection behavior judgment: (1) Due to the randomness of the appearance of disordered cigarettes, operators need to constantly observe the aisles, which consumes a lot of time and energy. (2) If it is necessary to conduct statistical analysis on the number, time and other related factors of disordered cigarettes, manual observation is extremely inconvenient for adding, deleting, modifying and viewing statistical results, which wastes a lot of manpower, material resources and management resources. (3) Manual observation cannot perform real-time analysis. Summary of the invention
[0003] The present invention provides a disordered cigarette identification system and method, which solves the problem that disordered cigarettes need to be manually detected during existing cigarette production, which easily causes cigarette quality problems and brings risks to product quality management. It fundamentally eliminates the quality risks caused by disordered cigarettes and ensures product quality.
[0004] To achieve the above objectives, the present invention provides the following technical solutions:
[0005] A disordered cigarette recognition system includes: a PLC controller, an industrial camera, an image processing device and a photoelectric coupler;
[0006] The control end of the industrial camera is connected to the output end of the PLC controller, the industrial camera is connected to the image processing device through a bus, and the output end of the image processing device is respectively connected to the input end of the photoelectric coupler and the input end of the PLC controller;
[0007] The PLC controller is used to control the industrial camera to take pictures of cigarettes in the cigarette flow channel to obtain a cigarette sorting image;
[0008] The image processing device is used to process the cigarette sorting image according to a set algorithm, and determine whether there are disordered cigarettes based on the processed image. If so, a high level is sent to the photoelectric coupler to make the photoelectric coupler send an enable signal to identify the disordered cigarettes.
[0009] Preferably, it also includes: an industrial computer;
[0010] The industrial computer is connected to the PLC controller by signal, and is used to display the cigarette sorting image and the image processed by the image device, and to display and / or voice remind the operator when there are disordered cigarettes in the cigarette flow channel.
[0011] Preferably, it also includes: a blowing solenoid valve;
[0012] The control end of the blowing solenoid valve is connected to the output end of the photoelectric coupler. When the output end of the photoelectric coupler outputs a high level, the blowing solenoid valve turns on the purge air holes of the cigarette branch flow channel, so that the purge air blows the disordered cigarettes out of the cigarette branch flow channel.
[0013] Preferably, the image processing device comprises: an image filtering unit, which performs filtering processing on the cigarette sorting image to remove noise in the image.
[0014] Preferably, the image processing device further comprises: an image sample generating unit, which is used to perform data enhancement on the cigarette sorting image to form a series of enhanced image samples.
[0015] Preferably, the image processing device further comprises: an image feature comparison unit, which is used to extract an image feature map, and to determine whether there are disordered cigarettes by performing grayscale comparison, edge feature comparison, and connected domain area comparison on the feature map.
[0016] Preferably, the image processing device further comprises: a neural network recognition unit;
[0017] The neural network recognition unit is used to use the enhanced image sample as an input sample of a preset neural network model, and perform learning and training through the neural network model to determine whether there are disordered cigarettes in the enhanced image sample.
[0018] The present invention also provides a method for identifying disordered cigarettes, comprising:
[0019] An industrial camera is arranged in the cigarette branch flow channel, and the industrial camera is controlled to take pictures of cigarettes in the cigarette branch flow channel to obtain a cigarette sorting image;
[0020] Performing image processing on the cigarette sorting image according to a set algorithm, and judging whether there are disordered cigarettes according to the processed image;
[0021] If yes, a high level is sent to the photoelectric coupler, so that the photoelectric coupler sends an enable signal to identify the disordered cigarettes.
[0022] Preferably, the step of performing image processing on the cigarette sorting image according to a set algorithm, and judging whether there are disordered cigarettes according to the processed image, comprises:
[0023] Performing filtering on the cigarette sorting image to remove noise in the image;
[0024] The cigarette sorting image is translated, rotated, flipped, and lifted to form a series of lifted image samples;
[0025] The enhanced image samples are used as input samples of a preset neural network model, and learning and training are performed through the neural network model to determine whether there are disordered cigarettes in the enhanced image samples.
[0026] Preferably, the neural network model includes:
[0027] The first layer is the input layer, which transforms the image samples into a matrix input network.
[0028] Set up 3 convolutional layers and 2 fully connected layers, and generate a feature matrix after convolution with the convolution kernel;
[0029] Use the activation function to calculate each node and generate an activation matrix;
[0030] Define the loss function and determine whether the loss function value reaches the set value. If so, the training ends, otherwise return to the input layer to continue training.
[0031] The present invention provides a disordered cigarette recognition system and method, which uses an industrial camera to take pictures of the cigarette flow conveying channel, and uses an image processing device to perform a disordered cigarette recognition algorithm to determine whether there are disordered cigarettes in the aisle. If there are disordered cigarettes, the operator is reminded through an industrial control computer. This solves the problem that disordered cigarettes need to be manually detected during existing cigarette production, which is easy to cause cigarette quality problems and bring risks to product quality management. It fundamentally eliminates the quality risks caused by disordered cigarettes and ensures product quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the specific embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below.
[0033] Figure 1It is a schematic diagram of a disordered cigarette recognition system provided by the present invention.
[0034] Figure 2 3 is a comparison diagram of the effects after image filtering in the embodiment.
[0035] Figure 3 It is a schematic diagram of performing data enhancement processing on an image provided in an embodiment.
[0036] Figure 4 This is a flow chart of a method for identifying disordered cigarettes provided by the present invention;
[0037] Figure 5 It is a training diagram of the neural network model provided by an embodiment of the present invention.
[0038] Reference numerals
[0039] J Photocoupler DETAILED DESCRIPTION
[0040] In order to enable persons skilled in the art to better understand the solutions of the embodiments of the present invention, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings and implementation modes.
[0041] In view of the fact that the current production of cigarettes is prone to quality problems due to disordered cigarettes, the present invention provides a disordered cigarette identification system, which uses an industrial camera to take pictures of the cigarette flow conveying channel, and uses an image processing device to perform a disordered cigarette identification algorithm to determine whether there are disordered cigarettes in the aisle. If there are disordered cigarettes, the operator is reminded through an industrial computer. This solves the problem that disordered cigarettes need to be manually inspected during the existing production of cigarettes, which is prone to cause cigarette quality problems and bring risks to product quality management. It fundamentally eliminates the quality risks caused by disordered cigarettes and ensures product quality.
[0042] like Figure 1 As shown, a disordered cigarette identification system includes: a PLC controller, an industrial camera, an image processing device and a photoelectric coupler J. The control end of the industrial camera is connected to the output end of the PLC controller, and the industrial camera is connected to the image processing device through a bus, and the output end of the image processing device is respectively connected to the input end of the photoelectric coupler J and the input end of the PLC controller. The PLC controller is used to control the industrial camera to take pictures of the cigarettes in the cigarette flow channel to obtain a cigarette sorting image. The image processing device is used to process the cigarette sorting image according to a set algorithm, and judge whether there are disordered cigarettes based on the processed image. If yes, a high level is sent to the photoelectric coupler, so that the photoelectric coupler sends an enable signal to identify the disordered cigarettes.
[0043] Specifically, the hardware mainly includes the following parts: industrial camera, photoelectric coupler, PLC controller and image processing device. The brand and model of the industrial computer are: the smart camera is the POMEAS industrial camera, model VP-CCN-1000G11CSC. The photoelectric coupler is Everlight optocoupler, model 6N135 6N136 6N137. The model of the PLC controller is Siemens (SIEMENS-1000). Figure 1 As shown: Pins 0 and 1 of the industrial camera are connected to 0V and 24V respectively, and port 2 is connected to the image processing module. The output of the image processing module is connected to the X01 input pin in the PLC, and is connected in parallel to the photoelectric coupling signal input pin. The photoelectric coupling output is connected to the blowing solenoid valve. The X04 output port of the PLC is connected to the industrial camera photo trigger enable signal, and the enable signal is incorporated into the connection light source. At the same time, the grounding terminals of all components are connected to the common ground. The industrial camera takes a photo of the cigarette branch flow conveying channel, and identifies it through the image processing device, and then determines whether there are disordered cigarettes in the cigarette branch flow channel. If there are disordered cigarettes, the operator is reminded through the industrial computer. The quality risks caused by the disorder of cigarettes are fundamentally eliminated, ensuring product quality.
[0044] Furthermore, the system also includes: an industrial computer; the industrial computer is connected to the PLC controller by signal, and is used to display the cigarette sorting image and the image processed by the image device, and to display and / or voice remind the operator when there are disordered cigarettes in the cigarette flow channel.
[0045] The system also includes: a blowing solenoid valve; the control end of the blowing solenoid valve is connected to the output end of the photoelectric coupler. When the output end of the photoelectric coupler outputs a high level, the blowing solenoid valve turns on the purge air holes of the cigarette branch flow channel, so that the purge air blows the disordered cigarettes out of the cigarette branch flow channel.
[0046] Specifically, its working process is as follows: PLC sends a photo-taking enable signal to the industrial camera through the X05 port, and the light source is turned on at the same time. The industrial camera receives the enable signal and takes a photo. The image is compressed into JPEG format and sent to the image processing device. The image is inferred by the image processing device to determine whether there are disordered cigarettes in the image. If there are disordered cigarettes in the image, the signal is transmitted to the photoelectric coupler signal input port through the output port. At this time, the photoelectric coupler output port outputs a signal, and the blowing solenoid valve is turned on to blow the disordered cigarettes out of the cigarette flow channel. At the same time, the industrial computer screen reminds the operator that disordered cigarettes are generated in the cigarette flow channel at this time.
[0047] The image processing device comprises: an image filtering unit, which performs filtering processing on the cigarette sorting image to remove noise in the image.
[0048] Considering that the image is collected in a production environment and is affected by special environmental factors such as smoke and dust, there will be noise in the image, so the bilateral filtering method is used to filter the image. The filtering effect is as follows Figure 2 shown.
[0049] Furthermore, the image processing device further comprises: an image sample generating unit, which is used to perform data enhancement on the cigarette sorting image to form a series of enhanced image samples.
[0050] like Figure 3 As shown in the figure, performing operations on the image by translating, rotating, flipping, stretching, and other data enhancement methods can effectively prevent the model from overfitting.
[0051] In practical applications, the image processing device also includes: an image feature comparison unit for extracting an image feature map, and performing grayscale comparison, edge feature comparison, and connected domain area comparison on the feature map to determine whether there are disordered cigarettes.
[0052] Furthermore, the image processing device also includes: a neural network recognition unit; the neural network recognition unit is used to use the enhanced image sample as an input sample of a preset neural network model, and perform learning and training through the neural network model, so as to determine whether there are disordered cigarettes in the enhanced image sample.
[0053] Furthermore, the image processing device adopts a Jetson Nano deep learning acceleration inference module.
[0054] The system also includes: a direct current power supply; the direct current power supply is used as a 24V power supply for the industrial camera and the photoelectric coupler.
[0055] The system also includes: LED lights;
[0056] The LED lamp is connected to the output end of the PLC controller and is lit when the industrial camera takes a picture. The power supply of the LED lamp can be supplied by a DC power supply.
[0057] It can be seen that the present invention provides a disordered cigarette recognition system, which uses an industrial camera to take pictures of the cigarette flow conveying channel, and uses an image processing device to perform a disordered cigarette recognition algorithm to determine whether there are disordered cigarettes in the aisle. If there are disordered cigarettes, the operator is reminded through the industrial computer. This solves the problem that disordered cigarettes need to be manually detected during existing cigarette production, which can easily cause cigarette quality problems and bring risks to product quality management. It fundamentally eliminates the quality risks caused by disordered cigarettes and ensures product quality.
[0058] Accordingly, if Figure 4As shown, the present invention also provides a method for identifying disordered cigarettes, comprising:
[0059] S1: an industrial camera is arranged in the cigarette branch flow channel, and the industrial camera is controlled to take pictures of cigarettes in the cigarette branch flow channel to obtain a cigarette sorting image;
[0060] S2: performing image processing on the cigarette sorting image according to a set algorithm, and judging whether there are disordered cigarettes according to the processed image;
[0061] S3: If yes, a high level is sent to the photoelectric coupler, so that the photoelectric coupler sends an enable signal to identify the disordered cigarettes.
[0062] Furthermore, the cigarette sorting image is processed according to a set algorithm, and judging whether there are disordered cigarettes according to the processed image, including:
[0063] S21: filtering the cigarette sorting image to remove noise in the image;
[0064] S22: translating, rotating, flipping, and lifting the cigarette sorting image to form a series of lifted image samples;
[0065] S23: Using the enhanced image sample as an input sample of a preset neural network model, and performing learning and training through the neural network model, thereby determining whether there are disordered cigarettes in the enhanced image sample.
[0066] Furthermore, the neural network model includes: the first layer is the input layer, which converts the promoted image samples into matrices for input into the network; 3 convolutional layers and 2 fully connected layers are set, and after convolution with convolution kernels, feature matrices are generated; activation functions are used to calculate each node to generate activation matrices; a loss function is defined, and it is determined whether the loss function value reaches the set value. If so, the training ends, otherwise it returns to the input layer to continue training.
[0067] Specifically, Figure 5 As shown, the forward derivation process of the neural network model is as follows: In the model structure, the first layer is the input layer input: the image in the format of 640*480*3 (length: 640 pixels, width: 480 pixels, RGB3 channels) is converted into a matrix A of 150*150*3 (length: 150 pixels, width: 150 pixels, RGB3 channels) and input into the network.
[0068] Three convolutional layers (Conv2D) are used in the model. The positions of the convolutional layers are as follows: Figure 5 As shown, the general calculation method is as follows: Matrix A is the input of the kth layer Conv2D in the calculation model, F cis the c convolution kernels with m×m receptive fields in the current convolution layer Calculation results for each layer The convolution calculation formula is as follows:
[0069]
[0070] Where b c is the bias term, valid′ is the effective value of the ith convolution calculation. After convolution with the convolution kernel, c feature matrices are generated.
[0071] The model uses 5 activation layers. The activation layer uses the ReLU function to calculate each node. The calculation process is as follows: Matrix B is the input of the activation layer of the i-th layer in the calculation model. The calculation results of each layer are The calculation method is as follows:
[0072]
[0073] After the activation layer calculation, c activation matrices are generated.
[0074] The model uses three max pooling layers (MaxPooling), and the location of the max pooling layer is shown in the figure. The calculation process is as follows: Matrix C is the pth pooling layer P in the model P The input of the pooling layer is n×n, and each pooling layer outputs P P Calculation formula:
[0075] P P =β·down(C)+b p
[0076] Fully connected layer (Dense): The fully connected layer is located in the last three layers of the model, and its input is a 1×n dimensional vector. Vector v is the input of the dth fully connected layer. d The calculation formula is:
[0077] z=w·v+b d
[0078] Among them, w is the weight vector of the fully connected layer, b d is the bias term of the fully connected layer.
[0079] Output layer (Activation_5): Softmax can compress a K-dimensional vector v containing any real number into another K-dimensional real vector σ(v), so that each element is between (0, 1) and the sum of all elements is 1. The vector v is the input of the output layer, and its calculation formula is:
[0080]
[0081] In order to require the model to have good accuracy, recall, efficiency, and generalization performance, the following factors need to be considered: 1. During the detection process, the cigarette aisles being detected are mostly normal, and there are fewer cases of disordered cigarettes. It is difficult to obtain disordered cigarette image samples. 2. For deep learning methods, the total number of samples that can be obtained is relatively small.
[0082] You can use a custom loss function, which is calculated as follows:
[0083]
[0084] The process of back propagation is to minimize the value of the loss function J(p, σ(v)), where p is the input sample label. If p is a positive sample, the standard cross entropy function is used to calculate the loss function. In order to solve the problem that negative samples are difficult to obtain and the number is small, an appropriate gain τ is given to the standard cross entropy function. The τ value is between [1,10]. The larger the τ value, the more sensitive the model is to negative samples and the better the model effect.
[0085] During the back propagation process, the model output error is first calculated by the following formula:
[0086]
[0087] in: is the error on the jth neuron in the lth layer; is a vector whose elements are partial derivatives is the output of the jth neuron in the lth layer, is a small change, ⊙ is the Hadamard product, and the meaning of the output layer error equation is: Error Relative to the first layer Rate of change
[0088] Second, use the next layer error To represent the current layer error
[0089] δ l =((w l+1 ) T δ l+1 )⊙σ'(z l )
[0090] Again, the rate of change of the loss function with respect to any bias in the network is:
[0091]
[0092] Finally, the rate of change of the loss function with respect to any weight is:
[0093]
[0094] At this point, the model has completed training.
[0095] In practical application, the following test is designed:
[0096] Experiment 1: Under different sample sizes, the classification accuracy of the present invention is obtained using the 2-fold cross validation method.
[0097] Experiment 2: Using 2-fold cross validation to obtain the classification accuracy of VGG16, VGG19, ResNet50, and ResNet101 under different sample sizes.
[0098] Experiment 3: Discuss the reasoning efficiency of Experiment 1 and Experiment 2 under the same sample input conditions.
[0099] Experiment 4: Under the condition of a certain number of samples, different loss functions were used for comparison, and the 2-fold cross-validation method was used to obtain the inference accuracy.
[0100] The results of experiments one to three are shown in Table 1. It can be concluded from Table 1 that the number of samples is positively correlated with the detection accuracy of VGG16, VGG19, ResNet50, and ResNet101. When the sample size reaches 30,000, the accuracy of the present invention is not as good as ResNet101, but the efficiency is 42.85 times that of the ResNet101 model, achieving good results. It meets the requirements of detection efficiency. When the number of samples is small, the detection accuracy of this model is significantly higher than that of ResNet101, indicating that the model has good generalization performance.
[0101] Table 1
[0102]
[0103]
[0104] The results of Experiment 4 are shown in Table 2. It can be seen from the table that when the number of samples is constant, the custom loss function achieves a higher accuracy.
[0105] Table 2
[0106]
[0107] It can be seen that the present invention provides a method for identifying disordered cigarettes, which uses an industrial camera to take pictures of the cigarette flow conveying channel, and uses an image processing device to perform a recognition algorithm for disordered cigarettes to determine whether there are disordered cigarettes in the aisle. If there are disordered cigarettes, the operator is reminded through the industrial computer. This solves the problem that disordered cigarettes need to be manually detected during existing cigarette production, which can easily cause cigarette quality problems and bring risks to product quality management. It fundamentally eliminates the quality risks caused by disordered cigarettes and ensures product quality.
[0108] The above describes in detail the structure, features and effects of the present invention based on the embodiments shown in the drawings. The above is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the drawings. Any changes made in accordance with the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which still do not exceed the spirit covered by the description and drawings, should be within the protection scope of the present invention.
Claims
1. A system for identifying disordered cigarettes, characterized in that: include: PLC controller, industrial camera, image processing device, air blowing solenoid valve and photoelectric coupler; The control end of the industrial camera is connected to the output end of the PLC controller, the industrial camera is connected to the image processing device through a bus, and the output end of the image processing device is respectively connected to the input end of the photoelectric coupler and the input end of the PLC controller; The PLC controller is used to control the industrial camera to take pictures of cigarettes in the cigarette flow channel to obtain a cigarette sorting image; The image processing device is used to process the cigarette sorting image according to a set algorithm, and determine whether there are disordered cigarettes based on the processed image. If yes, a high level is sent to the photoelectric coupler to make the photoelectric coupler send an enable signal to identify the disordered cigarettes; The control end of the blowing solenoid valve is connected to the output end of the photoelectric coupler. When the output end of the photoelectric coupler outputs a high level, the blowing solenoid valve conducts the purge air holes of the cigarette branch flow channel, so that the purge air blows the disordered cigarettes out of the cigarette branch flow channel. The image processing device comprises: a neural network recognition unit; The neural network recognition unit is used to use the image sample as an input sample of a preset neural network model, and to perform learning and training through the neural network model, thereby determining whether there are disordered cigarettes in the image sample; The neural network model includes: the first layer is the input layer, which converts the image sample into a matrix input network; 3 convolution layers and 2 fully connected layers are set, and after convolution kernel convolution, a feature matrix is generated; an activation function is used to calculate each node to generate an activation matrix; a fully connected layer, which is located in the last three layers of the model, and its input is a 1×n dimensional vector; a custom loss function is defined, and it is determined whether the loss function value reaches the set value. If so, the training ends, otherwise it returns to the input layer to continue training; Custom loss function, the calculation process is as follows: ; Among them, p is the input sample label, is the standard cross entropy function, .
2. The out-of-order cigarette identification system according to claim 1, characterized in that: Also includes: Industrial computer; The industrial computer is connected to the PLC controller by signal, and is used to display the cigarette sorting image and the image processed by the image device, and to display and / or voice remind the operator when there are disordered cigarettes in the cigarette flow channel.
3. The out-of-order cigarette identification system according to claim 2, characterized in that: The image processing device further includes: an image filtering unit, which performs filtering processing on the cigarette sorting image to remove noise in the image.
4. The out-of-order cigarette identification system according to claim 3, characterized in that: The image processing device further comprises: an image sample generating unit, which is used to perform data enhancement on the cigarette sorting image to form a series of enhanced image samples.
5. The out-of-order cigarette identification system according to claim 4, characterized in that: The image processing device also includes: an image feature comparison unit, which is used to extract an image feature map and perform grayscale comparison, edge feature comparison, and connected domain area comparison on the feature map to determine whether there are disordered cigarettes.
6. A method for identifying disordered cigarettes, characterized in that: include: An industrial camera is arranged in the cigarette branch flow channel, and the industrial camera is controlled to take pictures of cigarettes in the cigarette branch flow channel to obtain a cigarette sorting image; Performing image processing on the cigarette sorting image according to a set algorithm, and judging whether there are disordered cigarettes according to the processed image; If yes, a high level is sent to the photoelectric coupler, so that the photoelectric coupler sends an enable signal to identify the disordered cigarettes; The step of performing image processing on the cigarette sorting image according to a set algorithm and judging whether there are disordered cigarettes according to the processed image includes: Performing filtering on the cigarette sorting image to remove noise in the image; The cigarette sorting image is translated, rotated, flipped, and lifted to form a series of lifted image samples; The enhanced image samples are used as input samples of a preset neural network model, and learning and training are performed through the neural network model to determine whether there are disordered cigarettes in the enhanced image samples; The neural network model includes: The first layer is the input layer, which converts the image sample into a matrix input network; Set up 3 convolutional layers and 2 fully connected layers, and generate a feature matrix after convolution with the convolution kernel; Use the activation function to calculate each node and generate an activation matrix; Fully connected layer, the fully connected layer is located in the last three layers of the model, and its input is a 1×n dimensional vector; Customize the loss function and determine whether the loss function value reaches the set value. If so, the training ends; otherwise, return to the input layer to continue training. Custom loss function, the calculation process is as follows: ; Among them, p is the input sample label, is the standard cross entropy function, .
Citation Information
Patent Citations
Online cigarette defect visual detection system and method
CN108107054A
Detecting method and monitoring system for coupling fault of rotating machine
CN109782603A
Anti - cigarette detecting system of indiscriminate cigarette based on PLC and vision sensing
CN205022961U
Out-of-order cigarette identification system
CN212586906U
