# A Computer-Aided Detection System for the Detection of Lung Nodules Based on 3D-ResNet
## 3 Method
### Candidate Detection  
For a CAD system, the candidate detection plays a decisive role in the performance of the next phase. The candidate detection algorithm should improve the detection intensity as much as possible while reducing the number of false positives on the basis of guaranteeing a high detection intensity. To improve the detection intensity and reduce the number of false positives, we designed a convolution neural network based on U-NET to detect candidates. In contrast to Z-NET [19] which only used vertical sections for candidate detection, we cut three axis planes of each CT to detect candidate nodules through the same U-NET. We obtained the position information p(x, y, z) and diameter of each candidate as well as the probability of the given candidate. We only focused on candidates with R \(\geq\) 3 mm since nodules R < 3 mm and non-nodules were considered as meaningless. We merged candidate sets of three sections to improve the detection intensity. The merger rule was to merge the candidates whose distances of (x, y, z) coordinates did not exceed 5 mm and the new coordinates took the average. The images were preprocessed before passing through U-NET. There were great differences between the scans because they came from different facilities and different devices, which would have a great impact on our CAD system. We re-sampled the segmented images so that each voxel represented 1 mm\({}^{3}\). Then we adjusted the pixel intensity from (\(-\)1000, 400) to (0, 1), and the portion outside this range was discarded. The original U-NET is very prone to over-fitting because this model contains a large number of parameters [20]. To solve this problem, several adjustments were made to the structure of U-NET. (1) We adjusted the U-NET input size from \(572\times 572\) to \(320\times 320\); the input size of \(320\times 320\) can contain all the lung tissue areas of all existing image data. (2) The number of convolutional cores was appropriately reduced on the premise of securing the number of original network layers. The modified U-NET did not show a significant drop in performance and this avoids over-fitting [21]. The adjusted network structure is shown by Figure 1. It consists of down-sampling steps and up-sampling steps. Each down-sampling step consists of two consecutive convolutional layers and one pooling layer. The convolution kernel size of a convolution layer was \(3\times 3\), and the initial number of convolution kernels was 32. We doubled the number of convolution cores in every down-sampling step. The rectified linear unit (ReLU) [22] was applied to every convolution layer. We used the filling mode of the same padding to keep the size. The pooling layer used a \(2\times 2\) maximum pool in steps of 2 for down-sampling. Each up-sampling step consisted of two consecutive convolution layers--a connection layer and an up-sampling layer. The convolution kernel size of the convolution layer was also \(3\times 3\), and the number of convolution kernels was halved in each stage. ReLU and the same padding were applied to each convolutional layer. The connection layer duplicated the corresponding same-size features in the down-sampling step and linked them with the corresponding features in the upper sampling line. The up-sampling layer used \(2\times 2\) steps for up-sampling to achieve size amplification. The last layer of the network adopted a \(1\times 1\) convolution operation. The sigmoid activation function was used in this layer. A probability map with the size of \(320\times 320\times 1\)--the same as the input size--was obtained, and the candidate nodules were extracted based on the U-NET output probability mapping. In order to prevent the network from over-fitting the false positive reduction caused by the imbalance of the positive nodules and the false positive nodules in the candidate set, we discarded some low-probability candidates and only focused on the higher-probability candidates. We selected a probability threshold based on experience and the performance on the cross-validation set.