Early detection of pulmonary nodules is an effective way to improve patients' chances of survival. In this work, we propose a novel and efficient way to build a computer-aided detection (CAD) system for pulmonary nodules based on computed tomography (CT) scans. The system can be roughly divided into two steps: nodule candidate detection and false positive reduction. Considering the three-dimensional (3D) nature of nodules, the CAD system adopts 3D convolutional neural networks (CNNs) in both stages. Specifically, in the first stage, a segmentation-based 3D CNN with a hybrid loss is designed to segment nodules. According to the probability maps produced by the segmentation network, a threshold method and connected component analysis are applied to generate nodule candidates. In the second stage, we employ three classification-based 3D CNNs with different types of inputs to reduce false positives. In addition to simple raw data input, we also introduce hybrid inputs to make better use of the output of the previous segmentation network. In experiments, we use data augmentation and batch normalization to avoid overfitting. We evaluate the system on 888 CT scans from the publicly available LIDC-IDRI dataset, and our method achieves the best performance by comparing with the state-of-the-art methods, which has a high detection sensitivity of 97.5% with an average of only one false positive per scan. An additional evaluation on 115 CT scans from local hospitals is also performed. Experimental results demonstrate that our method is highly suited for the detection of pulmonary nodules. © 2020 American Association of Physicists in Medicine.