This study proposes a dense target detection algorithm utilizing array distribution information guidance to address challenges related to positioning errors and false targets commonly occurring during the detection process of numerous similar targets in industrial settings. The methodology involves extracting seed targets from dense target images and implementing a fourdirection search matching strategy based on target array layout rules. It forms candidate target matching regions from the surrounding four regions of the seed targets, thereby updating the target position index through a reindexing algorithm and conducting continuous traversing to precisely position all targets. Additionally, to address the difficulty of detecting similar targets, a Transformer selfattention structure is introduced in front of the convolutional neural network to extract correlation features of positions and categories among samples. Subsequently, a classification network based on the twin convolutional Transformer is devised to enhance structured information within adjacent target images, enabling accurate classification of dense and similar targets and thereby accomplishing robust target detection tasks. Experiments are conducted on a large number of dense target image datasets, and the results show that the proposed algorithm outperforms the comparison algorithms in accuracy, achieving detection and classification accuracy of 98. 71%. Therefore, it can effectively extract targets and conduct precise classification.