# High-Precision Chip Detection Using YOLO-Based Methods
## 3 Results
### Performance Indicators  
In order to evaluate the extraction accuracy and computational cost of the proposed algorithm for chip detection, several commonly used metrics are employed [16; 17; 19; 30; 31]: precision, recall, F1-score, [EMAIL_ADDRESS], FLOPs, model size (MS), and frames per second (FPS). To evaluate the accuracy of the chip quantity statistics in videos, the error proportion is used as the indicator.  
1. Precision measures the proportion of correctly detected chip images relative to the total number of images identified as chips (both correct and incorrect). It is formally defined as \[P=\frac{TP}{TP+FP}\] (12) where TP is the number of samples correctly identified as debris, FP is the number of samples whose background is identified as chips, and FN is the number of chip samples identified as the background.  
Figure 8: Chip video data.  
Recall measures the proportion of correctly detected chip images relative to the total number of images that should have been detected (including both correctly detected and undetected chips). It is formally defined as \[R=\frac{TP}{TP+FN}\] (13)
3. The F1-score is a composite metric for the evaluation of the performance of classification models, defined as the harmonic mean of the precision and recall. It is formally defined as \[F1-Score=\frac{2*Precision*Recall}{Precision+Recall}=\frac{2*TP}{2*TP+FP+FN}\] (14)
4. The average precision (AP) averages the accuracy of the chips in the dataset. The mean average precision (mAP) refers to the average of the AP values for each category. However, the only category in this experiment is pineapple, and the AP is equal to the mAP. The mAP is formally defined as \[mAP=\frac{\sum_{i=1}^{N}AP_{i}}{N}\] (15)  
where \(\text{AP}=\int_{0}^{1}\text{P(R)dR}\), and N represents the quantity of the detection category. [EMAIL_ADDRESS] represents the mean average precision when the IoU of the prediction and ground truth boxes is greater than 0.5.
5. The FLOPs value quantifies the computational complexity of the algorithm by measuring the number of floating-point operations required during inference. It is formally defined as \[FLOPs=\sum_{layer=1...N}\left(K^{layer}\times K^{layer}\times C_{in}{}^{layer} \times C_{out}{}^{layer}\times H^{layer}\times W^{layer}\right)\] (16)  
For each layer, \(H^{layer}\) and \(W^{layer}\) represent the sizes of the output feature maps, respectively. \(K^{layer}\) is the convolutional kernel size, and \(C_{in}{}^{layer}\) and \(C_{out}{}^{layer}\) stand for the numbers of input channels and output channels, respectively.
6. Model Size (MS) refers to the size of model and is used to evaluate the complexity of the model.
7. Frames per second (FPS) is the number of pictures that the model can detect in one second. The calculation formula is \[FPS=\frac{1}{T_{pre}+T_{in}+T_{post}}\] (17)  
where \(\text{T}_{\text{pre}}\), \(\text{T}_{\text{in}}\), \(\text{T}_{\text{post}}\) indicate, respectively, the time (units: second) taken for preprocessing, inference, and post-processing.
8. The error proportion is used to evaluate the accuracy of the chip quantity statistics in videos to assess the overall system's accuracy. It is formally defined as \[EP=\frac{|S_{true}-S_{det}|}{S_{true}}\times 100\%\] (18) where \(S_{\text{true}}\) represents the true number of falling chips shown in a video, and \(S_{\text{det}}\) represents the number of falling chips detected by the algorithm in a video.