The spectral computed tomography (CT) based on photon-counting detector performs energy-dependent image reconstruction of material attenuation coefficients, allowing for effective medical diagnosis and material discrimination. However, the spectral CT image quality is degraded in narrow energy bins as a consequence of low photon counts. Thus the edge information of some materials with similar attenuation cannot be well identified. To improve the accuracy of material discrimination of spectral CT, we proposed a deep-learning-based material discrimination method based on Fully Convolutional Pyramidal Residual Network (FC-PRNet). The FC-PRNet model can predict each pixel of spectral CT images and extract more edge information for different material components. We evaluated our method using mouse spectral CT data set, and experimental results demonstrated that the proposed method could efficiently discriminate different materials compared with traditional method based on post-reconstruction. Moreover, our algorithm has fewer parameters, faster convergent speed and higher accuracy, and achieves better quality of material discrimination than SegNet, FCN-8s and U-Net.