With the improvement of industrial automation level, hot-rolled steel plates are increasingly widely used in industries such as automobiles, construction, and ships. However, surface defects generated during the hot rolling process will seriously affect the quality and performance of the steel plates. In order to improve the accuracy and real-time performance of defect detection, this study proposes a defect detection method based on YOLOV9 and a programming layer information (PGI). This method uses the deep learning framework of YOLOV9 for rapid defect recognition, achieving efficient detection of four common defects on the surface of hot-rolled steel plates (including inclusions, cracks, scratches, and pits). Experimental results show that the average accuracy of this method reaches 84.6%, which is significantly improved compared to traditional methods and early models.