To achieve a higher accuracy in classifying leukocytes (i.e., monocytes, granulocytes, and B and T lymphocytes), we developed a cascaded ResNet structure with a two-step classification design as shown in Figure 3a, b. This design has been inspired by the prior knowledge of leukocyte hierarchy classification structures\cite{RN64,RN65}. The first ResNet (Figure 3a) is used to classify monocytes, granulocytes, and lymphocytes. The predicted lymphocytes are then put into the second ResNet (Figure 3b) for further classification into B and T lymphocytes. From this cascaded structure, we can achieve a much higher accuracy in differentiating B and T lymphocytes, compared with a single-step classifier (refer to Table S1 and S2 for more comprehensive details on the comparison of two individual donors). ResNets of different depths were explored, while the highest validation accuracy was obtained on the ResNet-10 that had around 1.5 million trainable parameters. ResNet-10 has 10 layers, i.e., one input convolution layer, 8 convolution layers from 4 building blocks (each building block has 2 convolution layers), and one final dense layer. The shortcut connects the head and tail of each building block, which helps to restore the crucial shallower features for prediction. The layer size is halved, and the kernel quantity is doubled for every 1, 2, 1 building blocks. Batch normalization (Batch Norm)\cite{RN43} is applied for each mini-batch after each convolutional layer. Rectified Linear Unit (Relu)\cite{RN44} is used as the nonlinear activation function. After the last building block, an average pool and a flatten layer are applied to convert each two-dimensional feature map into one value, thus for 256 feature maps, a 256 × 1 vector is obtained to represent each of the input images. Probabilities of each type are produced based on this feature vector via a dense layer with the Softmax activation function\cite{RN45}. For the monocyte-granulocyte-lymphocyte classification task, probabilities of these three types are produced, while for B-T lymphocyte classification, two probability values are produced. The type with the largest probability value is used to make the final decision. To explore the differentiation capability of CD4 and CD8 cells, a separate ResNet was trained by fine-tuning the B-T lymphocyte classifier for the new classification task (Figure 3c). Details on the training and validation of the classification model are provided in the Method section.