To develop a deep learning (DL) model for automated detection of glaucoma and to compare diagnostic capability against hand-craft features (HCFs) based on spectral domain optical coherence tomography (SD-OCT) peripapillary retinal nerve fiber layer (pRNFL) images. A DL model with pre-trained convolutional neural network (CNN) based was trained using a retrospective training set of 1501 pRNFL OCT images, which included 690 images from 153 glaucoma patients and 811 images from 394 normal subjects. The DL model was further tested in an independent test set of 50 images from 50 glaucoma patients and 52 images from 52 normal subjects. A customized software was used to extract and measure HCFs including pRNFL thickness in average and four different sectors. Area under the receiver operator characteristics (AROC) curves was calculated to compare the diagnostic capability between DL model and hand-crafted pRNFL parameters. In this study, the DL model achieved an AROC of 0.99 [CI: 0.97 to 1.00] which was significantly larger than the AROC values of all other HCFs (AROCs 0.661 with 95% CI 0.549 to 0.772 for temporal sector, AROCs 0.696 with 95% CI 0.549 to 0.799 for nasal sector, AROCs 0.913 with 95% CI 0.855 to 0.970 for superior sector, AROCs 0.938 with 95% CI 0.894 to 0.982 for inferior sector, and AROCs 0.895 with 95% CI 0.832 to 0.957 for average). Our study demonstrated that DL models based on pre-trained CNN are capable of identifying glaucoma with high sensitivity and specificity based on SD-OCT pRNFL images.