This is a repository that implements rebar detection and counting using YOLOv9, which is the newest state-of-the-art object counting and detection model which was published very recently.
The jupyter notebook file YOLOv9_RebarCounting.ipynb includes everything needed for downloading datasets, training, and testing.