AbstractBuilding material inventory is routine work of the material delivery process at most construction sites. Manual counting is the conventional manner of taking inventory; however, it is subjective, time consuming, and error prone, especially for densely stacked material. This study proposes a new and accurate counting model based on YOLOv3 to automatically and efficiently count dense steel pipes by images. To promote counting models’ development and verification, a large-scale steel pipe image data set including various on-site conditions was constructed and publicly available. The proposed model was observed to be superior to the original YOLOv3 detector in terms of average precision, mean absolute error, and root-mean-square error based on the steel pipe data set. Furthermore, several improvement measures, split into bag of specials and bag of freebies, were introduced to enhance counting performance further and verified by an ablation study. Comparisons with other popular detectors demonstrate the effectiveness and superiority of the proposed model for counting densely stacked steel pipes. The counting model can be easily extended for other dense material counting and integrated into mobile devices for practical application at construction sites.