A method and device for detecting integrity of items on a production line

By using the Mobilenetv2 backbone network and BiFPN structure in YOLOv3, combined with image enhancement technology, the problems of slow speed and low generalization of YOLOv3 in production line detection are solved, and fast response and high-precision small item recognition are achieved.

CN114399720BActive Publication Date: 2024-10-15SOUTH CHINA INST OF INTELLIGENT ROBOT INNOVATION +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111618382.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2024-10-15
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

The YOLOv3 algorithm in the existing technology has the problems of slow speed and low generalization in the detection of production line items, especially poor performance in identifying small items, and the large number of parameters is not suitable for deployment on mobile terminals.

Method used

The lightweight convolutional neural network Mobilenetv2 is used as the backbone network of YOLOv3, combined with the bidirectional fusion BiFPN network structure, to simplify the detection model, strengthen feature extraction, and improve the generalization of detection through image enhancement technology.

Benefits of technology

It improves the detection speed and small item recognition accuracy, and enhances the generalization ability of the model, allowing the detection model to respond faster and adapt to different scenarios, making it suitable for real-time detection on the production line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114399720B_ABST
    Figure CN114399720B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for detecting the integrity of items on a production line. The detection method comprises the following steps: collecting on-site pictures of the production line to obtain an original picture data set; marking the original picture data set to obtain a marked picture data set; inputting the marked picture data set into a YOLOv3 detection model for target detection, wherein the backbone network of the YOLOv3 algorithm model adopts a Mobilenetv2 architecture to perform deep convolution processing on the marked picture data set; adopts a bidirectional fusion BiFPN to perform feature information fusion on the marked picture data processed by deep convolution; adopts image enhancement technology to perform image data enhancement on the marked image data set after the feature information is fused; outputs the target detection result, and obtains the integrity information of the items on the production line. The detection method has a fast response speed, strengthens feature extraction, and improves the recognition accuracy of small items. During model training, the training samples are enriched by image enhancement technology to improve the detection accuracy of the detection model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention mainly relates to the technical field of image detection, and in particular to a method and device for detecting the integrity of items on a production line. Background Art

[0002] With the continuous development of computer computing power and deep learning, object detection methods based on deep learning have been widely used in engineering. The mainstream target detection framework is divided into two categories: two-stage and one-stage. The two-stage algorithm uses the region recommendation network to classify and regress the bounding box to obtain the recommended box after initial screening, and then uses the recommended box to intercept in the region, classify and regress again, and finally complete the detection of the target through non-maximum suppression. Compared with the two-stage algorithm, the one-stage algorithm omits the region recommendation process, fuses feature maps of different scales through the neck connection layer, obtains multi-scale feature maps, uses dense connection heads to classify and regress anchor boxes, and finally completes the detection of the target through non-maximum suppression.

[0003] Compared with the single-stage target detection framework, the two-stage algorithm performs one more classification and regression. Its calculation accuracy is higher than that of the general single-stage algorithm. However, its detection speed has obvious disadvantages in industry and it is difficult to meet the real-time requirements of the production line. The current object detection generally uses the YOLO (You Only Look Once) architecture for target detection.

[0004] The backbone network of the current YOLOv3 algorithm uses a deep network architecture (DarkNet53), which has a large number of parameters, making it difficult to deploy on mobile devices. It also lacks image enhancement technology, resulting in low generalization. Summary of the invention

[0005] The purpose of the present invention is to overcome the shortcomings of the prior art. The present invention provides a method and device for detecting the integrity of items on a production line. The detection method improves the original YOLOv3 algorithm, adopts a lightweight convolutional neural network Mobilenetv2 as the backbone network, and combines the network structure of the bidirectional fusion BiFPN to simplify the detection model, increase the response speed, enhance feature extraction, and improve the recognition of small items.

[0006] The present invention provides a method for detecting the integrity of items on a production line, the method comprising the following steps:

[0007] Collect on-site pictures of the production line and obtain the original picture data set;

[0008] Marking the original image data set to obtain a marked image data set;

[0009] Inputting the labeled image dataset into the YOLOv3 detection model for target detection, wherein inputting the labeled image dataset into the YOLOv3 detection model for target detection comprises:

[0010] The backbone network of the YOLOv3 algorithm model uses the Mobilenetv2 architecture to perform deep convolution processing on the labeled image dataset;

[0011] Bidirectional fusion BiFPN is used to fuse feature information for deeply convolutionally processed labeled image data;

[0012] Image enhancement technology is used to enhance the image data set of labeled images after the feature information is fused;

[0013] The target detection results are output and the integrity information of the production line items is obtained.

[0014] Furthermore, the step of labeling the original image dataset to obtain the labeled image dataset includes:

[0015] Labelimg software is used to mark the items on the production line in the production line site pictures to obtain a labeled image dataset.

[0016] Furthermore, the use of the Mobilenetv2 architecture to perform deep convolution processing on the labeled image dataset includes: performing a first point-by-point convolution processing, a deep spatial convolution processing, and a second point-by-point convolution processing on the labeled image dataset in sequence.

[0017] Furthermore, the fusion formula of the bidirectional fusion BiFPN is:

[0018]

[0019] Among them, w i is the value after applying the relu activation function, w i ≥0,∈=0.0001,I i is the feature value of each feature layer.

[0020] Furthermore, the image enhancement technology is used to perform image data enhancement on the labeled image data set after the characteristic information is fused, including horizontal flipping, cropping, Mosaic data enhancement, Mixup data enhancement, and data enhancement in terms of brightness and saturation on the images of the labeled image data set after the characteristic information is fused.

[0021] The Mosaic data enhancement selects four labeled images from the labeled image data set after the characteristic information is fused, performs flipping, scaling, and color gamut change processing, retains the characteristic information of the items on the production line on the four images, and performs random cropping to obtain the processed images;

[0022] An image frame is set, and the four processed images are placed in the four corners of the image frame in a counterclockwise direction starting from the upper left corner of the image frame, and spliced ​​into a new image to obtain a Mosaic data enhanced image. The Mixup data enhancement includes randomly selecting two images from the labeled image data set after the feature information is fused, and mixing the two images in proportion according to a mixing formula to obtain mixed image data.

[0023] The mixing formula is:

[0024]

[0025] Among them, x i , x j For any two input images, λ is the parameter that conforms to the β distribution, λ∈(0,1).

[0026] Furthermore, the target detection result is outputted and the integrity information of the production line items is obtained, including:

[0027] Compare the test results with the preset item information to determine whether the items on the production line are complete. If not, output the missing item information.

[0028] The present invention also provides an on-line article integrity detection device, the detection device comprising:

[0029] Acquisition module: used to collect on-site pictures of the production line and obtain the original picture data set;

[0030] Data marking module: used to mark the original image data set to obtain a marked image data set;

[0031] Detection module: Input the labeled image dataset into the YOLOv3 detection model for target detection, wherein the inputting the labeled image dataset into the YOLOv3 detection model for target detection includes:

[0032] The backbone network of the YOLOv3 algorithm model uses the Mobilenetv2 architecture to perform deep convolution processing on the labeled image dataset;

[0033] Bidirectional fusion BiFPN is used to fuse feature information for deeply convolutionally processed labeled image data;

[0034] Image enhancement technology is used to enhance the image data of the labeled image data set after the characteristic information is fused; the output module: outputs the target detection result and obtains the integrity information of the items on the production line. The present invention provides a method and device for detecting the integrity of items on the production line. The detection method improves the original YOLOv3 architecture, takes Mobilenet-v2 as the backbone network, and combines the bidirectional fusion BiFPN network to simplify the detection model, has a fast response speed, strengthens feature extraction, and improves the recognition of small items. When constructing the detection model, the generalization is improved through image enhancement technology, and it can adapt to different scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 is a flow chart of a method for detecting items on a production line in an embodiment of the present invention;

[0037] Figure 2 Schematic diagram of the BiFPN network structure in an embodiment of the present invention;

[0038] Figure 3 It is a schematic diagram of the structure of an article integrity detection device on a production line in an embodiment of the present invention. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0040] Embodiment 1:

[0041] Figure 1 The flowchart of the method for detecting the integrity of items on a production line in an embodiment of the present invention is shown. The method for detecting the integrity of items on a production line includes:

[0042] S11: Collect on-site pictures of the production line to obtain an original picture dataset;

[0043] Specifically, during the operation of the production line, images of objects at the same position on the production line within a continuous period of time are collected by an image acquisition device, or images of objects at different positions on the production line at the same time are collected by an image acquisition device and organized into an original image data set.

[0044] S12: Marking the original image data set to obtain a marked image data set;

[0045] Specifically, the original image dataset is used to label the items on the production line in the production line site pictures through Labelimg software to obtain a labeled image dataset.

[0046] Furthermore, the Labelimg software is a graphic image processing software that can identify objects in pictures, frame and mark the objects in pictures.

[0047] S13: Input the labeled image dataset into the YOLOv3 detection model for target detection.

[0048] Specifically, inputting the labeled image dataset into the YOLOv3 detection model for target detection includes:

[0049] The backbone network of the YOLOv3 algorithm model uses the Mobilenetv2 architecture to perform deep convolution processing on the labeled image dataset;

[0050] Specifically, based on the original YOLOv3 network architecture, Mobilenet-v2 is used as the backbone network, replacing the original backbone network DarkNet53.

[0051] The Mobilenetv2 is a lightweight deep neural network, whose main feature is the use of a large number of depth-separable convolutions, which greatly reduces the number of model parameters. In addition, Mobilenetv2 also introduces a reverse residual structure block to increase the model depth and solve the gradient vanishing problem that occurs when the network depth increases. Compared with the original backbone DarkNet53 architecture, the model is smaller and faster.

[0052] Furthermore, by adopting Mobilenetv2 as the backbone network, the number of parameters on the YOLOv3 network architecture is reduced, making it easier to carry the detection model on the mobile terminal, making it easier for staff to perform detection.

[0053] Furthermore, the use of the Mobilenetv2 architecture to perform deep convolution processing on the labeled image dataset includes: sequentially performing a first point-by-point convolution processing, a deep spatial convolution processing, and a second point-by-point convolution processing on the labeled image dataset. The Mobilenetv2 network architecture includes an inverted residual structure, and the inverted residual structure includes three convolution layers, and the number of channels of the convolution layer in the middle layer is more than that of the other two convolution layers. The Mobilenetv2 network architecture first performs channel enhancement through a 1*1 point-by-point convolution layer to increase the number of feature channels, and then performs a 3*3 spatial convolution through a deep separable convolution, and then reduces the dimension through a 1*1 point-by-point convolution layer. The computational complexity of the deep separable convolution and the 1*1 convolution layer in the operations of enhancing and reducing channels is small. Increasing the number of feature channels of the deep separable convolution can improve the accuracy of the calculation.

[0054] Bidirectional fusion BiFPN is used to fuse feature information for deeply convolutionally processed labeled image data;

[0055] Furthermore, the bidirectionally fused BiFPN is used on the YOLOv3 detection model to replace the unidirectionally fused FPN in the original YOLOv3 network architecture;

[0056] Furthermore, the BiFPN is a weighted bidirectional feature pyramid network that can conveniently and quickly perform multi-scale feature fusion by introducing weight coefficients to the feature layer when fusing features.

[0057] Since feature layers of different sizes have different resolutions, their contributions to the output features are different. Therefore, it is necessary to introduce weight coefficients to the feature layers during feature fusion to better balance information of different scales. The fusion calculation formula of the bidirectional fusion BiFPN is:

[0058]

[0059] Among them, w i is the value after applying the relu activation function, w i ≥0,∈=0.0001,I i is the feature value of each feature layer.

[0060] Specifically, Figure 2 The schematic diagram of the BiFPN network structure in the embodiment of the present invention is shown. According to the fusion calculation formula of the bidirectionally fused BiFPN, the fusion formula of P4 is:

[0061]

[0062]

[0063] in, is the input variable of the fifth feature layer, is the input variable of the fourth feature layer, is the output variable of the third feature layer, is the output variable of the fourth feature layer, It is the intermediate variable of the fourth feature layer, and Resize is the upsampling or downsampling value.

[0064] Specifically, image data enhancement is performed on the labeled image data set after the characteristic information is fused using image enhancement technology, which includes horizontal flipping, cropping, mosaic data enhancement, mixup data enhancement, and data enhancement in terms of brightness and saturation.

[0065] Furthermore, through the operations of horizontal flipping and cropping, the image data set is expanded, the detection accuracy is improved, the brightness and saturation are adjusted, and the samples are enriched, so that the detection model can recognize images of objects under different environmental conditions.

[0066] Specifically, the Mosaic data enhancement is a picture data processing technology, and the Mosaic data enhancement picture processing operation includes: the Mosaic data enhancement selects four labeled pictures from the labeled image data set after the characteristic information is fused, performs flipping, scaling, and color gamut change, retains the characteristic information of the items on the production line on the four pictures, and performs random cropping to obtain the processed pictures;

[0067] An image frame is set, and the four processed images are placed in the four corners of the image frame in a counterclockwise direction starting from the upper left corner of the image frame, and spliced ​​into a new image to obtain a Mosaic data enhanced image. The Mosaic data enhancement can enrich the background of the image dataset, make full use of computing resources, and increase sample diversity.

[0068] Furthermore, the Mosaic data enhancement crops and splices different pictures, enriches the boundary background of the pictures, and improves the accuracy of model detection during model training.

[0069] Specifically, the Mixup data enhancement aims at the problem that the network tends to memorize training samples but is difficult to resist out-of-distribution samples, such as adversarial samples that cannot be distinguished by the naked eye. The neighborhood risk minimization principle is adopted to randomly select two pictures from the labeled image data set after the feature information is fused, and the two pictures are mixed in proportion according to a mixing formula to obtain a new training picture, thereby enriching the diversity of the sample data. The mixing formula is:

[0070]

[0071] Among them, x i , x j For any two input images, λ is the parameter that conforms to the β distribution, λ∈(0,1).

[0072] Furthermore, the β distribution refers to a set of connection probability distributions defined in the interval (0, 1).

[0073] Specifically, the labeled image data set is processed for image data enhancement to enrich training samples, improve the training effect of the detection model, and improve the generalization of the detection model.

[0074] Furthermore, the generalization of the model is improved through the Mixup data enhancement. The detection model trained through the Mixup data enhancement can accurately identify objects on the production line when objects are stacked or blocked from each other on the production line.

[0075] Specifically, the detection model is improved on the original YOLOv3 network architecture, using Mobilenetv2 as the backbone network, reducing the parameters of the detection model, making the response speed of the detection model faster, and combining the bidirectional fusion BiFPN to strengthen the feature extraction network, thereby improving the recognition of small objects.

[0076] Furthermore, the YOLOv3 network is used as the basic architecture of the detection model, and the detection speed of the detection model is guaranteed by a single-stage algorithm framework. Mobilenetv2 is used as the backbone network to simplify the detection model architecture and improve the response speed of the model.

[0077] S14: Output the target detection result and obtain the integrity information of the production line items.

[0078] Specifically, the detection model outputs a detection result, compares the detection result with preset item information, determines whether the items on the production line are complete, and if not, outputs information about missing items on the production line.

[0079] Furthermore, the detection model is pre-set with information of items on the production line. The detection model detects the items on the production line in real time, and compares the detected item information with the preset item information on the production line, so as to determine in real time whether the items on the production line are complete, thereby facilitating the work of production personnel.

[0080] The embodiment of the present invention provides a method for detecting items on a production line based on a YOLOv3 detection model. Pictures of the on-site production line are collected and input into an improved YOLOv3 detection model after identification to detect whether the items on the production line are complete. If not, information about missing items is output. The improved YOLOv3 detection model adopts Mobilenetv2 as the backbone network and combines a bidirectionally fused BiFPN network, so that the detection model has a fast response speed, can detect the status of items on the production line in real time, has improved detection accuracy, and can accurately identify small items.

[0081] Embodiment 2:

[0082] Figure 3 The schematic diagram of the structure of an article integrity detection device on a production line according to an embodiment of the present invention is shown, and the detection device comprises:

[0083] Acquisition module 1: used to collect on-site pictures of the production line and obtain the original picture data set;

[0084] Specifically, during the operation of the production line, the acquisition module 1 uses an image acquisition device to acquire images of objects at the same position on the production line within a continuous period of time, or uses an image acquisition device to acquire images of objects at different positions on the production line at the same time, and organizes them into an original image data set.

[0085] Furthermore, the acquisition device includes a camera, and the camera can be fixed on the production line, or the camera can be set on the detection device.

[0086] Data marking module 2: used to mark the original image data set to obtain a marked image data set;

[0087] Specifically, the picture labeling module 2 labels the items on the production line in the production line site picture using Labelimg software using the original picture data set collected by the collection module 1 to obtain a labeled picture data set.

[0088] Furthermore, the Labelimg software is an image identification software that can identify objects in pictures, frame and identify the objects in pictures.

[0089] Detection module 3: Input the labeled image dataset into the YOLOv3 detection model for target detection.

[0090] Specifically, the detection model is improved on the original YOLOv3 network architecture, using Mobilenetv2 as the backbone network to simplify the architecture and improve the response speed of the detection model, so that the detection model can meet the requirements of real-time detection of production line items, and combined with the bidirectional fusion BiFPN enhanced feature extraction network, it can accurately identify small items.

[0091] The labeled image data set is input into the YOLOv3 network model, and the image deep separable convolution processing is performed on the Mobilenetv2 model. The bidirectional fusion BiFPN is used to fuse the feature information of the deeply convolutionally processed labeled image data, and the image features are refined. The image data is enhanced by the image data enhancement technology to facilitate detection and recognition.

[0092] Output module 4: Outputs the target detection results and obtains the integrity information of the production line items.

[0093] Specifically, the model outputs the detection results and compares the detection results with the preset item information. By comparing the real-time detected item information with the preset item information, it is determined whether the items on the production line are complete. If not, the missing item information is output.

[0094] In an embodiment of the present invention, a device for detecting the integrity of items on a production line is provided. The detection device is arranged on the production line site. By improving the YOLOv3 detection model, using Mobilenetv2 as the backbone network and combining the bidirectional fusion BiFPN, the detection model can accurately identify small items and improve the recognition accuracy. The model has a fast response speed and can detect items on the production line in real time.

[0095] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0096] In addition, the above is a detailed introduction to a method and device for detecting the integrity of items on a production line provided by an embodiment of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for detecting the integrity of items on a production line, characterized in that: The method comprises the following steps: Collect on-site pictures of the production line and obtain the original picture data set; Marking the original image data set to obtain a marked image data set; Inputting the labeled image dataset into the YOLOv3 detection model for target detection, wherein inputting the labeled image dataset into the YOLOv3 detection model for target detection comprises: The backbone network of the YOLOv3 algorithm model uses the Mobilenetv2 architecture to perform deep convolution processing on the labeled image dataset; Bidirectional fusion BiFPN is used to fuse feature information for deeply convolutionally processed labeled image data; Image enhancement technology is used to enhance the image data set of labeled images after the feature information is fused; The target detection results are output and the integrity information of the production line items is obtained.

2. The method for detecting the integrity of items on a production line according to claim 1, characterized in that: The labeling of the original image data set to obtain the labeled image data set includes: Labelimg software is used to mark the items on the production line in the production line site pictures to obtain a labeled image dataset.

3. The method for detecting the integrity of items on a production line according to claim 1, characterized in that: The use of the Mobilenetv2 architecture to perform deep convolution processing on the labeled image dataset includes: sequentially performing a first point-by-point convolution processing, a deep spatial convolution processing, and a second point-by-point convolution processing on the labeled image dataset.

4. The method for detecting the integrity of items on a production line according to claim 1, characterized in that: The fusion formula of the bidirectional fusion BiFPN is: Among them, w i is the value after applying the relu activation function, w i ≥0,∈=0.0001,I i is the feature value of each feature layer.

5. The method for detecting the integrity of items on a production line according to claim 1, characterized in that: The image data enhancement of the labeled image data set after the characteristic information is fused by using the image enhancement technology includes: The labeled image dataset after feature information fusion is horizontally flipped, cropped, Mosaic data enhanced, Mixup data enhanced, and data enhanced in terms of brightness and saturation.

6. The method for detecting the integrity of items on a production line according to claim 5, characterized in that: The Mosaic data enhancement selects four labeled images from the labeled image data set after the characteristic information is fused, performs flipping, scaling, and color gamut change processing, retains the characteristic information of the items on the production line on the four images, and performs random cropping to obtain the processed images; An image frame is set, and the four processed images are placed at the four corners of the image frame in a counterclockwise direction with the upper left corner of the image frame as the starting position, and are spliced ​​into a new image to obtain a Mosaic data enhanced image.

7. The method for detecting the integrity of items on a production line according to claim 5, characterized in that: The Mixup data enhancement includes: randomly selecting two pictures from the labeled image data set after the characteristic information is fused, and mixing the two pictures in proportion according to a mixing formula to obtain mixed picture data.

8. The method for detecting the integrity of items on a production line according to claim 7, characterized in that: The mixing formula is: Among them, x i , x j For any two input images, λ is the parameter that conforms to the β distribution, λ∈(0,1).

9. The method for detecting the integrity of items on a production line according to claim 1, characterized in that: Outputting the target detection result and obtaining the integrity information of the production line items includes: Compare the test results with the preset item information to determine whether the items on the production line are complete. If not, output the missing item information.

10. An article integrity detection device on a production line, characterized in that: The detection device comprises: Acquisition module: used to collect on-site pictures of the production line and obtain the original picture data set; Data marking module: used to mark the original image data set to obtain a marked image data set; Detection module: Input the labeled image dataset into the YOLOv3 detection model for target detection, wherein the inputting the labeled image dataset into the YOLOv3 detection model for target detection includes: The backbone network of the YOLOv3 algorithm model uses the Mobilenetv2 architecture to perform deep convolution processing on the labeled image dataset; Bidirectional fusion BiFPN is used to fuse feature information for deeply convolutionally processed labeled image data; Image enhancement technology is used to enhance the image data set of labeled images after the feature information is fused; Output module: outputs the target detection results and obtains the integrity information of the production line items.