To suppress background clutter and improve detection accuracy, this paper propose a dim target detection algorithm based on density peak search and region consistency. Firstly the density peak search algorithm is used to extract the candidate targets. And then the candidate targets are classified and marked according to the local mosaic probability factor, which is important to suppress the background clutter and accurately strip the candidate target region from the background. Considering the regional stability of the dim targets, local mosaic gradient factors are used to screen real targets from the candidate targets, and then facet kernel filter is used to extract the irregular contours of the dim targets, and as a result, the targets can be enhanced. The experimental results show that compared with the existing algorithms, the proposed method has better detection accuracy and stronger robustness in different complex scenarios.