Noise detection-based median filters have been widely adopted to reduce salt and pepper noise in images. However, since noise pixel is not detected accurately, it is likely to blur the fringe of image under the high noise density. In this paper, we propose an algorithm of salt and pepper noise filter which is based on GA-BP algorithm noise detector to remove the salt and pepper noise in images. The algorithm firstly detect the location of noise pixels by using optimized GA-BP network,then,it introduce edge-preserving function and PRP algorithm to solve the objective function of extreme value further to realize the image denoising. Compared with the traditional algorithms, experimental results show that the proposed algorithm has an evident improvement, and have good characters of generalization, robust and self-adaptive.