Rebar Counting based on Object Detection


Background

In the area of construction engineering and management, accurate rebar (reinforcing bar) detection and counting are crucial for ensuring structural integrity, compliance with design specifications, and efficient use of materials. Rebars are used extensively in concrete reinforcement, and their precise placement and quantity are vital for the strength and durability of concrete structures.

The importance of rebar counting:

Structural Integrity: The strength and resilience of reinforced concrete structures heavily depend on the correct placement and quantity of rebars. Inaccurate rebar installation can lead to structural weaknesses, making buildings susceptible to damage under stress.

Cost Efficiency: Precise rebar counting helps in estimating the exact amount of material needed, avoiding wastage, and ensuring cost-effective construction practices.

Compliance and Safety: Adhering to the architectural and engineering specifications is paramount for construction projects. Accurate rebar counting ensures compliance with these specifications, contributing to the overall safety of the construction.

The challenges of rebar counting are:

Complexity of Detection: Rebars in construction images are often closely packed, overlapped, or partially obscured, making their detection a challenging task for traditional image processing techniques.

Variability of Conditions: The appearance of rebars can significantly vary due to lighting conditions, angles of capture, and the presence of construction materials or debris, further complicating the detection process.

Scale and Density: Construction projects can vary greatly in scale, and the density of rebars in images can range from sparse to extremely dense clusters, requiring a robust detection system capable of handling such variability.

Real-time Processing Needs: In many cases, there's a requirement for real-time or near-real-time processing of images to provide timely feedback to construction teams, posing additional computational challenges.

YOLOv9

Existing methods overlook significant information loss during deep network operations. YOLOv9 addresses this by introducing Programmable Gradient Information (PGI) to combat data loss issues. PGI ensures comprehensive input data for target tasks, enabling reliable gradient information for weight updates. Additionally, YOLOv9 presents a Generalized Efficient Layer Aggregation Network (GELAN), outperforming state-of-the-art methods in parameter utilization, even with conventional convolution operators. PGI's versatility extends to various model sizes, offering superior performance for train-from-scratch models. Source code: https://github.com/WongKinYiu/yolov9.

Rebar dataset

Dataset for IJCAI 2021 paper "Object Detection in Densely Packed Scenes via Semi-Supervised Learning with Dual Consistency"

RebarDSC is a new dataset of the industrial rebar collection scene. To construct this dataset:

We collected 2,125 images from the top 3 rebar manufacturing companies in Asia, where the images are captured in the real production environment with various types of mobile devices, with resolution vary from 800×600 to 4600×3400;

To satisfy the requirement of bundle counting, we capture all the raw images with a bundle of rebar as the image center. If two or more bundles are captured, we only considered the rebar within the bundle closing to the image center and ignored other bundles.

We hired professional human workers from rebar manufacturing companies to annotate each image’s bounding box, and finally, 350,348 annotations, 164.9 annotations per image are collected.

Examine training results

Now we can examine the training results by showing the plotted training/validation loss and metrics during training.

Testing the new YOLOv9 model on the Rebar testset

Run let's run the new detect.py file to get all the results. Please remember to set the experiment ID, corresponding to the training procedure above, in --weights runs/train//weights/best.pt. After running through all the 1000 test images. You should be able to get an accuracy around 98%.