Intelligent steel bar end face detecting and counting system

Through the intelligent steel bar end face detection and counting system, the industrial camera and YOLOv8 algorithm are used to realize automatic detection of steel bar end faces, which solves the problems of traditional slow counting speed and low accuracy, improves production efficiency and safety, and supports intelligent manufacturing.

CN120339229APending Publication Date: 2025-07-18INNER MONGOLIA UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510423667.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

Traditional manual counting steel bars have slow speed and low accuracy, which is difficult to meet the needs of efficient production, and there are misjudgments and safety risks, which cannot support the data-based needs of intelligent manufacturing.

Method used

The intelligent steel bar end face detection and counting system is adopted, including industrial cameras, light source systems, control units and storage devices, and combined with the YOLOv8 algorithm, the steel bar end face image acquisition and detection are used to optimize the model through data expansion and transfer learning to realize automated counting.

Benefits of technology

Improve production efficiency, reduce human error, reduce labor costs, support intelligent manufacturing, and ensure high-precision detection and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339229A_ABST
    Figure CN120339229A_ABST
Patent Text Reader

Abstract

The invention relates to the field of steel bar visual counting, in particular to an intelligent steel bar end face detecting and counting system which comprises a mechanical support arranged on the ground and used for bearing steel bars to be detected and counted. The industrial camera is installed on the mechanical support right facing the steel bar end face and used for collecting steel bar end face images; the light source system is used for irradiating rebar end faces; the control unit deploys a steel bar end face detection counting model; the control unit is connected with the B-type industrial camera and used for receiving the steel bar end face image collected by the industrial camera. Outputting the number of the end faces of the reinforcing steel bars into the reinforcing steel bar end face detection counting model; the storage device is connected with the control unit; the problems of low detection speed and low precision of traditional manual counting are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of visual counting of steel bars, and particularly to an intelligent steel bar end face detection and counting system. Background Art

[0002] As an indispensable structural material, steel bars are widely used in infrastructure industries such as construction, bridges, and transportation. Whether in the steel bar production process or at the construction site, accurate counting of steel bars is an essential step. Traditional steel bar end face counting has the following problems: Manual counting is relatively slow. Especially when the number of steel bars is large and the production line is busy, manual counting cannot meet the requirements of high-efficiency production, which may lead to delays in the production process and affect the overall efficiency. The end faces of steel bars may be deformed, worn, or have burrs during production and transportation, which causes interference to manual counting. Workers may make misjudgments or omissions due to changes in the end face shape, affecting the accuracy of counting. Manual counting is often difficult to accurately record and manage, and the information lacks systematicness, making it impossible to achieve real-time data tracking and data-driven production optimization. The traditional manual method is difficult to support the needs of digital and intelligent manufacturing.

[0003] Therefore, the problem existing in the prior art is: how to perform online intelligent counting of steel bars by machines instead of humans. Summary of the Invention

[0004] To solve the deficiencies of the prior art, the present invention provides an intelligent steel bar end face detection and counting system.

[0005] The first aspect objective of the present invention is to provide:

[0006] The beneficial effects achieved by the present invention are:

[0007] 1. Improve production efficiency. The automated steel bar end face detection system can significantly improve the efficiency of the production line. It can process a large number of steel bars in a short time, reducing the waiting and manual counting time.

[0008] 2. Reduce human errors: Manual counting is easily affected by factors such as fatigue and inattention, while the intelligent system can continuously maintain high-precision detection and counting, reducing errors caused by human factors.

[0009] 3. Improve safety. In some cases, the stacking and handling of steel bars may pose safety hazards. The automated system can complete the detection work without human operation, thus reducing the opportunity for workers to contact dangerous environments.

[0010] 4. Reduce labor costs. By reducing the demand for labor, enterprises can significantly reduce labor costs. Especially in regions with high labor costs, the economic benefits of the automated system are more obvious.

[0011] 5. Support intelligent manufacturing. With the advancement of Industry 4.0 and intelligent manufacturing, more and more manufacturing enterprises need to optimize production in a data-driven manner. The deployment of the intelligent steel bar end face detection system can provide valuable data support for enterprises and contribute to the realization of intelligent manufacturing. Description of the Drawings

[0012] Figure 1 It is a schematic connection diagram of the intelligent steel bar end face detection and counting system.

[0013] Figure 2 It is a schematic diagram of the external structure of the industrial camera of the present invention.

[0014] Figure 3 It is a flow chart for constructing the steel bar end face detection and counting model of the present invention.

[0015] Figure 4 It is a structural diagram of the YOLOv8 algorithm of the present invention.

[0016] Figure 5 It is a physical diagram of the detection and counting of the present invention Detailed Embodiments

[0017] To facilitate the understanding of the present invention by those skilled in the art, the following describes the detailed embodiments of the present invention with reference to the accompanying drawings.

[0018] The present invention provides an intelligent steel bar end face detection and counting system, including:

[0019] A mechanical support, which is arranged above the ground and is used to carry the steel bars to be detected and counted.

[0020] An industrial camera, which is installed on the mechanical support facing the end face of the steel bar and is used to collect images of the end face of the steel bar;

[0021] The industrial camera adopts a HIKROBOT MV-CH120-10GM / GC gigabit Ethernet industrial area array camera, and the lens is an IMX304 CMOS chip of Sony, with low noise, high resolution and excellent images.

[0022] A light source system, which can be any one of an LED ring light and a strip light. The LED ring light source is arranged at an angle from the upper side to illuminate the end face of the steel bar to ensure uniform illumination and reduce shadows and reflections.

[0023] A control unit, which is a Raspberry Pi (Raspberry Pi4) and deploys a steel bar end face detection and counting model; the control unit is connected to the type B industrial camera and is used to receive the images of the end face of the steel bar collected by the industrial camera; and input them into the steel bar end face detection and counting model to output the number of end faces of the steel bar.

[0024] A storage device, connected to a control unit; a Raspberry Pi serves as the control center of the system, responsible for managing the read and write operations of the storage device, storing captured image data, detection results, system configurations, log information, etc. into the storage device, and reading data from the storage device when needed.

[0025] The steel bar end face detection and counting model is constructed by the following method:

[0026] S1. Training image data acquisition: Call an industrial camera to capture the appearance images of the steel bar end faces, and a total of 544 photos of the steel bar end faces are taken.

[0027] The industrial camera is placed laterally at the position of the steel bar to capture the images of the steel bar end faces from the side.

[0028] S2. Training image data augmentation: Use the LabelImg tool to annotate the captured steel bar end face images, and use methods such as random flipping, random rotation, scaling, adding noise, brightness and contrast enhancement, as well as traditional image processing methods to augment the annotated images and corresponding labels, and expand the original image data to 5440 images.

[0029] The specific implementation steps of step S2 are as follows:

[0030] S201. Use the LabelImg tool to load the captured image data, change the output annotation format to an XML file in VOC format in the tool, and annotate the defect types of all the captured images.

[0031] S202. Use a Python program to read the paths of the original captured images and the XML label files annotated by the LabelImg tool, and run the Python program to augment the data to 5440 images.

[0032] S202 is specifically:

[0033] For the original images of the steel bar end faces captured, read the XML files of the original image bounding boxes coordinates, and use ElementTree to parse the XML files to find each coordinate value.

[0034] Perform image enhancement on the images obtained by XML parsing to generate a transformation sequence.

[0035] Through the generated transformation sequence, calculate the changed coordinates of each box in turn, and ensure that the adjusted coordinates do not exceed the image range or are less than 1.

[0036] Save the processed images and bounding boxes, and automatically update the information in the XML files.

[0037] Specifically:

[0038] Read the bounding box information in the XML file, and its defined calculation formula is as follows:

[0039] xmin = int(bndboxfind('xmin')text) (1)

[0040] xmax = int(bndboxfind('xmax')text) (2)

[0041] ymin = int(bndboxfind('ymin')-text) (3)

[0042] ymax = int(bndboxfind('ymax')text) (4)

[0043] Where: xmin, xmax, ymin, and ymax in the parentheses are strings used to find the corresponding nodes in the XML (representing the x-coordinate of the upper left corner, the x-coordinate of the lower right corner, the y-coordinate of the upper left corner, and the y-coordinate of the lower right corner of the bounding box in sequence). xmin, xmax, ymin, and ymax on the left side of the formula represent assigning the text content obtained after converting to an integer to these variables;

[0044] The second step: Change the XML file information of a single bounding box, defined as follows:

[0045] xmin text = str(new_xmin) (5)

[0046] ymin text = str(new_ymin) (6)

[0047] xmax text = str·(new_xmax) (7)

[0048] ymax text = str(new_ymax) (8)

[0049] Where: new_xmin, new_xmax, new_ymin, and new_ymax represent the variables assigned after rounding in the previous step;

[0050] The third step: Change the XML file information of the bounding box list, defined as follows:

[0051] new_xmin = new_taget[index][0] (9)

[0052] new_ymin = new_target[index][1] (10)

[0053] new_xmax = new_target[index][2] (11)

[0054] new_ymax = new_target[index][3] (12)

[0055] Where: The new_target list represents the coordinate information of the original image and the coordinate information in the second step. After uniformly updating these coordinate information, they correspond to the information of the original image and the image after the data augmentation algorithm in sequence.

[0056] S3. Train the image processing. Resize all the images obtained in S2 to the size of RGB three-channel images of 640×640. Use the convert_annotation method to traverse and parse the annotation files in XML format, extract the label information and positions therein, then convert this information into a specific format and write it into a txt file, and generate the training set and validation set files.

[0057] Step S3 includes the following steps:

[0058] S301. To ensure fast detection speed and high accuracy of the subsequent algorithm, use a Python program to uniformly resize the image size to 640×640 and the coordinates of the XML label file;

[0059] S302. After the image size is uniformly adjusted, the program continues to generate the training set and test set files of the YOLOv8 algorithm program according to the adjusted image size and the XML label file.

[0060] S4. Build the YOLOv8 training model. Input the generated training set file into the YOLOv8 algorithm program for learning the characteristics of the steel bar end face. According to the results learned by the algorithm, an optimal weight file best_epoch_weights.pth will be generated, and a steel bar end face detection and counting model will be obtained.

[0061] The YOLOv8 model of this detection method is mainly composed of four parts: Input, Back-bone, Neck, and Prediction; In the input part, the YOLOv8 model uses a unique data augmentation technique Mosaic, which can greatly enrich the background of the detected objects, fully train the image, and improve the training speed.

[0062] In the backbone part, the Focus layer can change the number of channels of the input image from 3 to 12, effectively reducing parameter calculations and improving the calculation speed. The entire backbone structure of YOLOv8 is composed of residual blocks, including 4 CBS blocks. CBS includes convolution, batch normalization, and SiLU activation function, which can reduce the width and height of the image and expand the channels.

[0063] In the neck, the FPN and PAN feature extraction network structures are adopted. Its principle is to upsample the deep image features and merge them with the shallow image features. When three effective feature layers are obtained, they are sent to the prediction part to obtain the prediction results.

[0064] In the prediction, YOLOv8 replaces it with three Decoupled Heads. It can accelerate the convergence speed of the network and improve the prediction accuracy. At the same time, YOLOXv8 introduces an anchor-free structure, which means deleting the anchor boxes. And the introduction of SimOTA (Simplified Optimal Transport Assignment) can solve the problem of uneven distribution of positive and negative samples.

[0065] When using the YOLOv8 model for training, we adopted the method of transfer learning, that is, using the pre-trained YOLOv8 model as the initial model, and then fine-tuning it on our steel bar end face dataset. This method not only accelerates the training process but also significantly improves the detection accuracy of the model. By adjusting hyperparameters such as the learning rate and batch size, the model gradually converges during the training process and finally achieves a high detection accuracy. The embodiments of the present invention described above do not constitute a limitation on the protection scope of the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the claims of the present invention.

Claims

1. An intelligent steel bar end face detection and counting system, characterized in that, Including: A mechanical support, which is set above the ground and used to carry the steel bars to be detected and counted; An industrial camera, which is installed on the mechanical support facing the end face of the steel bar and used to collect images of the end face of the steel bar; A light source system for irradiating the end face of the steel bar; A control unit, which deploys a steel bar end face detection and counting model; the control unit is connected to the type B industrial camera and used to receive the images of the end face of the steel bar collected by the industrial camera; and input them into the steel bar end face detection and counting model to output the number of end faces of the steel bar; A storage device, which is connected to the control unit.

2. The intelligent steel bar end face detection and counting system according to claim 1, wherein: The light source system can be any one of an LED ring light and a strip light.

3. The intelligent steel bar end face detection and counting system according to claim 1, characterized in that: The steel bar end face detection and counting model is constructed by the following method: S1, Training image data acquisition; S2, Training image data augmentation. Use the LabelImg tool to annotate the images of the end faces of the steel bars taken, and use methods such as random flipping, random rotation, scaling, adding noise, brightness and contrast enhancement, as well as traditional image processing methods to augment the annotated images and corresponding labels; S3, Training image processing. Adjust the size of all the images obtained in S2 to the size of RGB three-channel images of 640×640. Use the convert_annotation method to traverse and parse the XML format annotation files, extract the label information and positions therein, then convert this information into a specific format and write it into a txt file, and generate training set and validation set files; S4, Build a YOLOv8 training model. Input the generated training set file into the YOLOv8 algorithm program to learn the features of the end faces of the steel bars. According to the results learned by the algorithm, generate the optimal weight file best_epoch_weights.pth file to obtain the steel bar end face detection and counting model.

4. An intelligent steel bar end face detection and counting system according to claim 3, characterized in that: The specific implementation steps of step S2 are as follows: S201, Use the LabelImg tool to load the taken picture data, change the output annotation format to an XML file in VOC format in the tool, and annotate the defect types of all the taken pictures; S202, Use a Python program to read the paths of the original pictures taken and the XML label files annotated by the LabelImg tool, and run the Python program for data augmentation.

5. The intelligent steel bar end face detection and counting system according to claim 4, wherein: The specific implementation steps of step S2 are as follows: S202 specifically is: The first step, for the original pictures of the end faces of the steel bars taken, read the XML file of the coordinates of the original image bounding boxes, and use ElementTree to parse the XML file to find each coordinate value; The second step, perform image enhancement on the pictures obtained by XML parsing to generate a transformation sequence; Through the generated transformation sequence, calculate the changed coordinates of each box in turn, and ensure that the adjusted coordinates do not exceed the image range or are less than 1; The third step, save the processed images and bounding boxes, and automatically update the information in the XML file.

6. The intelligent steel bar end face detection and counting system according to claim 5, characterized in that: The The first step specifically is to read the bounding box information in the XML file, and its defined calculation formula is as follows: x min = int(bndbox.find('x min').text) (1) x max = int(bndbox.find('x max').text) (2) y min = int(bndbox.find('y min').text) (3) y max = int(bndbox.find('y max').text) (4) Where: xmin, xmax, ymin, and ymax in the parentheses are strings used to find the corresponding nodes in the XML (representing the x - coordinate of the upper - left corner, the x - coordinate of the lower - right corner, the y - coordinate of the upper - left corner, and the y - coordinate of the lower - right corner of the bounding box respectively). xmin, xmax, ymin, and ymax on the left - hand side of the formula represent the variables to which the text content obtained is assigned after being converted to an integer; Specifically, the second step is to change the XML file information of a single bounding box, defined as follows: x min.text = str(new_xmin) (5) y min.text = str(new_ymin) (6) x max.text = str(new__xmax) (7) y max.text = st(new_ymax) (8) Where: new_xmin, new_xmax, new_ymin, and new_ymax represent the variables assigned after rounding in the first step; Specifically, the third step is to change the XML file information of the bounding box list, defined as follows: new_xmin = new_target[index][0] (9) new_ymin = new__target[index][1] (10) new_xmax = new_target[index][2] (11) new_ynax = new_target[index][3] (12) Where: the new_target list represents the coordinate information of the original image and the coordinate information in the second step. After uniformly updating these coordinate information, they correspond to the information of the original image and the image after the data augmentation algorithm in sequence.

7. An intelligent steel bar end face detection and counting system according to claim 3, characterized in that: The Step S3 includes the following steps: S301, use a Python program to uniformly adjust the image size to 640×640 size and the coordinates of the XML label file; S302, after the image size is uniformly adjusted, the program continues to generate the training set and test set files of the YOLOv8 algorithm program according to the adjusted image size and the XML label file.

8. An intelligent steel bar end face detection and counting system according to claim 3, characterized in that: The YOLOv8 model mainly consists of four parts: an input part, a backbone part, a neck, and a prediction part.