## 3 Method
### Cascade Region Proposal Networks  
As shown in Figure 1, images from the source domain and target domain are sequentially input into the feature extraction network, and these features are fed into the branch of cascade RPNs and generate a set of candidate regional proposals; the last layer of each branch outputs a classification probability between 0 and 1 with a softmax function for source proposals when training. Then, some easy samples from the source domain are filtered out if the probability is greater than a threshold, and the remaining samples go on to the training of the next cascade stage. According to the green line of dashes in Figure 1, for example, the source image features extracted by Conv1 and Conv2_x are resized and fed into PRN1 and generate region proposals with corresponding binary classification scores. For training efficiency, 1024 of these region proposals are selected and used to train RPN1. If the proposal feature is significantly different from that of the real tree crown, it obtains a very high classification score in the background category in RPN1 and is then marked as the easiest negative sample and rejected. Similarly, the easiest positive samples is also filtered at this stage. Then, the same number of region proposals is generated in the deeper feature map further extracted by Conv3_x, but only 512 of the remaining harder samples are used to train RPN2, and the comparatively easier samples are rejected at that stage. Similar processes are applied in RPN3 with an extra bounding-box regression. Finally, the remaining proposals are allowed to join the subsequent processing. Such a cascade structure brings two advantages:  
(1) A large quantity of easy samples are detected and rejected at an early stage, which reduces the number of samples to be trained in the subsequent network and improves the computing efficiency of the network. (2) In cascade RPNs, the classifiers perform a stage-by-stage hard sampling. Each RPN can be trained to detect the tree crown at different levels of difficulty. Consequently, the classifier of RPNs is sequentially adept at distinguishing more difficult distractors, and the distribution of training samples are sequentially more balanced. As in Faster R-CNN, in Strong Weak Faster R-CNN, the RPN loss function \(L_{RPN}\) is composed of binary classification loss function \(L_{cls}\) and regression loss function \(L_{reg}\) as Equation (1):  
\[L_{RPN}(\{p_{i},t_{i}\})=\frac{1}{N_{cls}}\sum_{i}L_{cls}(p_{i},p_{i}^{*})+ \frac{1}{N_{reg}}\sum_{i}p_{i}^{*}L_{reg}(t_{i},t_{i}^{*}). \tag{1}\]  
\(p_{i}\) represents the probability that the \(i\)th anchor contains an object (\(p_{i}^{*}=1\) when the \(i\)th anchor box is positive, otherwise \(p_{i}^{*}=0\)). \(t_{i}\) and \(t_{i}^{*}\) are the trained coordinates of the anchor box and the coordinates of the ground-truth bounding box, respectively. \(N_{cls}\) is the proposal minibatch size for participating in the RPN training, and \(N_{reg}\) is the number of anchor locations. Specifically,  
\[L_{cls}(p_{i},p_{i}^{*})=-log[p_{i}p_{i}^{*}+(1-p_{i})(1-p_{i}^{*})], \tag{2}\]  
\[L_{reg}(t_{i},t_{i}^{*})=R(t_{i}-t_{i}^{*}), \tag{3}\]  
where \(R\) is a smooth L1 loss function. Similar to the Strong Weak Faster R-CNN, in CAS-DA, the cascade RPNs adopt a multitask loss, including the binary classification loss \(L_{cls}^{r}\) in the \(r^{th}\) (\(1\leq r\leq R\)) stage and the regression loss \(L_{reg}^{R}\) of the final stage. For each stage, the binary classification loss is computed as Equation (2). The regression loss is computed as Equation (3). The loss function of cascade RPNs is expressed as follows:  
\[L_{Cascade-RPNs}=\sum_{r=1}^{R}\frac{\mu_{r}\pi_{r}}{N_{cls}^{r}}\sum_{i}L_{cls }^{r}(p_{i,r},p_{i,r}^{*})+\frac{1}{N_{reg}^{R}}\sum_{i}p_{i,i}^{*}L_{reg}^{R} (t_{i,3},t_{i,3}^{*}), \tag{4}\]\[\alpha_{r}= \begin{cases}1&r=1,\\ \prod_{i-1}^{r-1}[p_{i,r}>threshold]&r>1.\end{cases}  \tag{5}\]  
\[\mu_{r}=\frac{\mu_{R}}{10^{R-r}}, \tag{6}\]  
where \(\mu_{R}=1\), \(R=3\), and r\(\in\){1,2,3} in this paper.