Abstract:Currently, the main method used in the industrial assembly line production process to remove defective cardboard is manual inspection, which is inefficient. Therefore, it is of practical significance to achieve high-energy efficiency and accurate automatic detection of surface defects on cardboard during the production process. Based on the excellent performance of the YOLO series network in the field of object detection and the high energy efficiency of FPGA-deployed network models, a high-energy efficiency cardboard defect detection system based on FPGA is proposed. The cardboard defect dataset is trained using the YOLOv7-Tiny network, and the network model is retrained and quantized using QAT. With a loss of only 0.36% in detection accuracy, the weights and feature map data are quantized to 8 bits, reducing hardware resource consumption. A reusable multi-node configurable architecture for the hardware accelerator is designed to achieve inference acceleration for different network layers through multiple configuration nodes. Each network layer is optimized at the hardware level, and a pipelined design with intra-layer and inter-layer coordination is adopted. The entire hardware acceleration system is implemented through coordinated software-hardware design, with a rational division of software and hardware tasks, enabling highly parallel operation of the hardware accelerator and soft-core processor. Ultimately, on the Xilinx VC707 FPGA evaluation board, a throughput of 177.96 GOPS is achieved at a working frequency of 200 MHz, while consuming only 6.5 W of power. This results in a high energy efficiency of 27.38 GOPS/W, which is 19.7 times that of the I5-10400F CPU and 8.6 times that of the GTX 2070S GPU. It balances detection speed and power consumption, meeting the industrial environmental requirements for cardboard production.