# Research on Pupil Center Localization Detection Algorithm with Improved YOLOv8
## 4 Experimental Results and Analysis
### Experimental Configuration and Evaluation Indicators  
The experimental system used in this article was the Windows 11 operating system, and the experimental computer was configured with an NVIDIA GeForce RTX 4060 graphics card with 8 GB of memory. The CPU was an Intel (R) Core (TM) i7-13700H, and the model was deployed under the Python framework. The Python framework of the model was PyTorch 2.0, and the programming language was Python 3.9, (video training version) CUDA11.7. The hyperparameters of the training model were set as follows: the size of the training batch was Batch_size = 96, the training time of the model was epoch = 100, and the initial learning rate was 0.001. PyTorch 2.0 offers the same eager-mode development and user experience, while fundamentally changing and supercharging how PyTorch operates at the compiler level under the hood. PyTorch 2.0 introduces the torch.compile feature, which takes PyTorch's performance to new heights and begins moving some of PyTorch back from C++ into Python. This is an important new direction for PyTorch--hence, 2.0. torch.compile is a fully additive (and optional) feature, so 2.0 is by definition 100% backward-compatible. Underpinning torch.compile are new technologies--TorchDynamo, AOTAutograd, PrimTorch, and TorchInductor.  
This experiment uses precision, recall, and mean average precision (\(mAP\)) as key indicators to evaluate the performance of the model. Precision measures the accuracy of model detection (i.e., positive predictive value), while recall evaluates the comprehensiveness of model detection (i.e., sensitivity). In the mean accuracy \(mAP\), m represents the mean, and aaa is the average accuracy for this type of sample when the \(IOU\) threshold of the confusion matrix is set to 0.5. \([EMAIL_ADDRESS]\) takes the average accuracy of samples from all categories, reflecting the trend of model accuracy with respect to recall. The higher the value, the easier it is for the model to maintain high accuracy under high recall, and \([EMAIL_ADDRESS]\)-\(0.95\) represents the average \(mAP\) value at different thresholds (from 0.5 to 0.95, with a step size of 0.05). The formula for parameter measurement is shown in (6) to (10):  
\[I_{IOU}=\frac{A\cap B}{A\cup B} \tag{6}\]  
\[Precision=\frac{TP}{TP+FP} \tag{7}\]  
\[Recall=\frac{TP}{TP+FN} \tag{8}\]  
\[A_{P}=\int_{0}^{1}P(r)dr \tag{9}\]  
\[mAP=\frac{\sum_{i=1}^{N}A_{P,i}}{N} \tag{10}\]  
where \(A\) and \(B\) represent the predicted and actual bounding box sets in the given expression, respectively. \(TP\) (true positive), \(FP\) (false positive), and \(FN\) (false negative) represent the number of correctly predicted, incorrectly predicted, and missed safety helmet targets, respectively. \(P(r)\) represents a smooth and precise recall curve and integrates it to obtain the area under the smooth curve. \(N\) represents the number of detection categories, and  
Figure 13: Recognition results and segmented images: (**a**) original image; (**b**) ROI image; (**c**) target recognition frame selection image; (**d**) target recognition result image.  
represents the accuracy of class \(i\), where \(i\) is the index. The proximity between the predicted boundary and the actual bounding box is determined by the _IOU_, which is set to 0.5.