# A Few-Shot Object Detection Method for Endangered Species
## 4 Experimental Results and Analysis
### Evaluation Indicators  
All of our experiments were implemented using PyTorch on 8 NVIDIA 2080 Ti workstations. Where CUDA version is 10.2, CUDNN version is 8.1, Python version is 3.8, and PyTorch version is 1.10. A two-stage training method is used for training; the first stage trains Backbone without freezing the parameters of the network modules and uses all the images of the base class, with the Batch-Size set to 16. The second stage is fine-tuning, which freezes all the parameters of Backbone while keeping the parameters of the RPN module based on the attentional mechanism, the Box Classifier, and the parameters of the Box Regressor module. The training time was 3 h and 12 min, and the testing time was 8 min, in which the average time per image was 0.31 s. The specific parameters of the model are shown in Table 2.  
IOU (intersection-over-union) is a metric used in target detection that refers to the overlap rate of the generated candidate frames with the true labeled frames. The mathematical formula is shown in Equation (9):  
\[IOU=\frac{area(C)\cap area(G)}{area(C)\cup area(G)} \tag{9}\] \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter Name** & **Value** & **Description** \\ \hline weight & R-101.pkl & Base class training initial weights \\ max-items & 18,000 & Maximum number of iterations for base class training \\ lr & 0.02 & Base class training learning rate \\ weight (ft) & model\_surgery.pth & Fine-tuning the training initial weights \\ lr (ft) & 0.001 & Fine-tuning training learning rates \\ momentum & 0.9 & Momentum of gradient descent \\ weight decay & 0.0001 & Weight decay factor \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Model-specific parameters. Figure 6: Examples of endangered species datasets. where \(area(C)\) denotes the generated candidate frame area; \(area(G)\) denotes the original labeled frame area. In target detection, the classification targets are divided into two categories: positive and negative cases. TPs (true positives) are true positive cases, which indicate the number of samples that are actually positive and correctly categorized as positive cases by the classifier; FPs (false positives) are false positive cases, which indicate the number of samples that are actually negative but incorrectly categorized as positive by the classifier; and FNs (false negatives) are the number of samples that are actually negative but incorrectly categorized as positive cases by the classifier. Recall, also known as the check rate, is the ratio of the number of true cases to the number of true positive cases, and the mathematical formula is shown in Equation (10):  
\[Recall=\frac{TP}{TP+FN} \tag{10}\]  
Precision, also known as the check rate, is the ratio of the number of true instances to the number of instances classified as positive instances by the classifier and is mathematically formulated as Equation (11):  
\[Precision=\frac{TP}{TP+FP} \tag{11}\]  
AP (average precision) is also known as the average precision rate, and the mathematical formula is shown in Equation (12). In general, the higher \(AP\) is, the better the classifier is in general, where \(AP50\) denotes the value of \(AP\) when the IOU threshold is 0.5. \[AP=\int_{0}^{1}p(r)dr \tag{12}\]  
In order to evaluate the generalization ability of the AR-FSOD, experimental validation on the Pascal VOC dataset is also conducted. In this paper, \(Q_{a}\) is designed as an evaluation metric to measure the quality of the region proposals generated by the RPN network, which is mainly based on the confidence level and the size of the overlap between these proposals and the actual labeled anchors.