Diagnosis of basal cell carcinoma (BCC), the most common skin cancer, is made by histologic examination traditionally. Yet the process is invasive and time-consuming. In vivo imaging modalities such as harmonic generation microscopy (HGM) was therefore developed for noninvasive diagnosis of BCC. However the images acquired by HGM are too many for physicians to interpret manually. Thus, in this paper we focus on detecting features of BCC automatically by customizing compact and efficient convolutional neural network (CNN) models on HGM images of BCC. Our best model achieves a better result than AlexNet cite{krizhevsky2012imagenet}, while using less than its 1\% number of parameters. The study indicated the potential solution of using customized CNN to detect the features in similar imaging modalities.