# An Intelligent Weighted Object Detector for Feature Extraction to Enrich Global Image Information
## 4 Our Proposed Intelligent Weighted Object Detector
### Internal Structure of the Model
The experiments were conducted mainly on PASCAL VOC, a commonly used dataset for object detection. Combined, the PASCAL VOC 2007 and PASCAL VOC 2012 datasets have 16,551 images, of which the training and validation sets are allocated in at 9:1 ratio. The images in the test set are all from a total of 4952 images in PASCAL VOC 2007. The PASCAL VOC dataset contains 20 category labels: people, bird, cat, cow, dog, horse, sheep, airplane, bicycle, boat, bus, car, motorcycle, train, bottle, seat, dining table, potted plant, sofa, and TV. Referring to the percentage of each object category in the PASCAL VOC dataset in [44], the pixel percentage size of each category in the image is plotted as shown \begin{table}
\begin{tabular}{c c} \hline \hline
**Category** & **Environmental Conditions** \\ \hline Operating System & CentOS 7.5 \\ \hline GPU & NVIDIA Tesla V100 \\ \hline Deep Learning Framework & PyTorch 1.7 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Experimental environment. Figure 7: YOLOXFPN. in Figure 8, where the average relative area is the median of the ratio of the area of the object's bounding box to the area of the image. By comparing the weight, size, and category accuracy of the YOLOX series models, the experiment selected the intermediate model YOLOX-S as the basis. Because the improved model structure did not conform to most of the pre-training model weights provided in baseline model YOLOX-S, the model was trained from scratch. After verifying the effectiveness of the improved model, comparative experiments were conducted on the same dataset with the well-established algorithm. In addition, the experiments were conducted on smaller-sized datasets in different scenarios, including the garbage dataset and the Steel Surface imperfections dataset, to verify the adaptability of the improved model to different situations. The TACO dataset is a growing spam dataset with woods, roads, and beaches as the shooting background, containing 1500 images, about 5000 annotations, and 60 categories. The Steel Surface NEU-CLS dataset was collected and published by Northeastern University. It includes 1800 images with six different categories of surface defects of hot-rolled steel strips, each of which contains 300 samples with the following defect categories: crazing, inclusion, patches, pitting surface, rolled in scale, and scratches. Similarly, the dataset assignment ratio is 9:1. ### Experimental Evaluation Indicators

The experiment uses evaluation metrics commonly used in object detection [7]. * Average Precision: Abbreviated as AP, this is used to measure the detection effectiveness of the model on each object class and is calculated as follows: \[AP=\frac{1}{\sum r}\sum_{ \begin{subarray}{c}\
u\in\{0,0.1,\ldots,1\} \end{subarray} }\rho_{interp(\
u)}\rho_{interp(\
u)}=\max_{ \begin{subarray}{c} \
u:\geq r\end{subarray} }\rho(\bar{\
u}).\] (8) Equation (8) represents the sum of the area enclosed between the PR curves and the horizontal coordinates of each category, where P is the accuracy of the object category \(Precision\), and \(Precision=TP/(TP+FP)\). R is the object category's recall rate \(Recall\), and \(Recall=TP/(TP+FN)\), where \(TP\) is the number of correctly predicted categories in a picture, \(FP\) is the number of incorrectly predicted categories, and \(FN\) is the number of categories not predicted. The average of the \(AP\) values of each category obtained in Equation (8) is the final \(mAP\). IOU (intersection over union) represents the ratio of intersection and merge between the prediction box and ground truth box, so \(mAP_{50}\) represents the accuracy of the model when the IOU ratio threshold is 50;

Figure 8: Average relative area of object categories in the PASCAL VOC dataset. * Frames per second: Abbreviated as FPS, this is used to measure the speed of model detection. The calculation in Equation (9) is shown below.