Abstract:In medicine,blood count detection is an important diagnostic method to measure human health,However, there are difficulties in detecting small targets and overlapping cells in blood cell images.To solve the above problems, an improved YOLOv7 object detection algorithm is proposed.By adding global attention mechanism(GAM)to the original network,improve the Receptive field of the network and the detection accuracy of small targets.A feature pyramid HorNet-BiFPN structure is proposed that combines the BiFPN network and the recursive-gated convolution HorNet.Its high-order spatial interaction is used to enhance the feature fusion capability of the network,realize the modeling of overlapping regions of red blood cells,and solve the detection problem of overlapping red blood cells.The experimental results show that the detection accuracy of the improved YOLOv7 model reaches 96.3%,the detection time of a single image is 74 ms,and the detection effect of three types of cells in the image is relatively strong,which achieves the rationality of medical assisted diagnosis.