The anchor-free method based on key point detection has made great progress. However, the anchor-free method is too dependent on using a convolutional network to generate a rough heat map. This is difficult to detect for objects with a large size variation and dense and overlapping objects. To solve this problem, first, we propose a mask attention mechanism for object detection methods. And make full use of the advantages of the attention mechanism to improve the accuracy of network detection heat map generation. Then, we designed an optimized fire model to reduce the size of the model. The fire model is an extension of grouped convolution. The fire model allows each group of convolutional network features to learn the same feature through purposeful grouping. In this paper, the mask attention mechanism uses object segmentation images to guide the generation of corner heat maps. Our approach achieved an accuracy of 91.84% and a recall 89.83% in the Tencent-100K dataset. Compared with the popular object detection methods, the proposed method has advantages in model size and accuracy.