As we know, the nearest neighbor search is a good and effective method for good-sized image search. This paper mainly introduced how to learn an outstanding image feature representation form and a series of compact binary Hash coding functions under deep learning framework. Our concept is that binary codes can be obtained using a hidden layer to present some latent concepts dominating the class labels with usable data labels. Our method is effective in obtaining hash codes and image representations, so it is suitable for good-sized dataset. It is demonstrated in our experiment that the performances of the proposed algorithms were then verified on three different databases, MNIST, CIFAR-10 and Caltech-101. The experimental results reveal that two-proposed image Hash retrieval algorithm based on pixel-level automatic feature learning show higher search accuracy than the other algorithms; moreover, these two algorithms were proved to be more favorable in scalability and generality.