# Improved YOLOv7 for Small Object Detection Algorithm Based on Attention and Dynamic Convolution
## 4 Experiments
### Evaluation Metrics  
In this study, we engaged in a comprehensive comparison of the improved network models' efficacy across various image types, maintaining consistency in the experimental environment. Our objective was to assess the impact on detection accuracy, false detection rates, and leakage phenomena. For this purpose, we chose four pivotal metrics: the accuracy-recall rate (P-R) curve, the number of parameters, the computational complexity, the mean Average Precision (mAP), and the F1-score.  
The precision of prediction for the subject of evaluation was determined by dividing the number of correctly predicted positive samples by the overall amount of favorable samples. The following is the definition of precision:  
\[P=\frac{TP}{TP+FP} \tag{12}\]  
where TP is the proportion of samples with positive predictions that are in fact true and FP is the proportion of samples with positive predictions that are not.  
Recall is the measurement of the proportion of correctly predicted positive samples to all of the actual samples that are positive, i.e., whether the detection target is even found. The following is the definition of recall:  
\[R=\frac{TP}{TP+FN} \tag{13}\]  
in which FN indicates the sample that is really a positive sample, but is predicted to be a negative sample.  
The mAP is used to assess the overall effectiveness of the algorithm by averaging the Average Precision (AP) values for all categories. As stated in its definition, the mAP is as follows:  
\[AP=\int_{0}^{1}PdR \tag{14}\]  
\[mAP=\frac{\sum_{j=1}^{\zeta}AP_{j}}{c} \tag{15}\]  
The F1-score is also known as the Balanced F-Score (BFS), which is defined as the reconciled average of precision and recall. Its formula is defined as follows:  
\[\text{F1}-\text{Score}=2\times\frac{\text{precision}\times\text{recall}}{ \text{precision}+\text{recall}} \tag{16}\]  
The F1-score metric combines the results of the precision and recall outputs. The value of the F1-score ranges from 0 to 1, with 1 representing the best output of the model and 0 representing the worst output of the model.  
The parameter count signifies the aggregate count of parameters that are necessary for learning within a deep neural network. Within the framework of deep learning, each individual neuron possesses a weight, and these weights are iteratively determined through the training process. The total number of parameters in a deep neural network is an amalgamation of all these weights. This encompasses the weights that interconnect the inputs and outputs, alongside the inclusion of the bias terms associated with all neurons.  
Computation, in the context of deep learning models, pertains to the quantity of floating-point operations essential for executing both forward and backward propagation. Typically, a sequence of multiplication followed by addition is treated as a single operation, with emphasis on the greater computational load posed by multiplication. Within deep learning, the computational effort of a neural network is primarily defined by the total of the convolution, multiplication, and addition operations. Given the substantial computational demands inherent in deep neural networks, these models require robust computational resources for both the training and inference tasks.