## 2 Materials and Methods
In order to achieve this, the proposed model was applied to a helmet dataset. The principal objective of this model is to facilitate the automatic and highly accurate detection of helmets. The proposed model comprises four principal phases, which are outlined below:  
The model comprises the following stages:  
- Feature extraction;  
- Feature selection;  
- Classification;  
- Weighted voting. A block diagram of the proposed model is provided in Figure 2 for the purposes of clarity. Figure 2: Block diagram of the proposed helmet recognition model. The abbreviations in this figure are as follows: F: feature vectors obtained from pre-trained CNNs, INCA: iterative neighborhood component analysis, f: selected feature vectors, kNN: k-nearest neighbor, p: outputs obtained from classifiers, IMV: iterative majority voting, v: weighted voting outputs. In this model, nine feature vectors were extracted from pre-trained CNNs, and these pre-trained CNNs were trained on ImageNet1k, and the most informative features of these features have been extracted by deploying the INCA feature selector; this feature selector is a self-organized feature selector. In the classification phase, by deploying the kNN classifier, nine classification outcomes were generated, and the generated nine kNN-based classification outcomes were utilized as input for the IMV. IMV created more than seven classification outputs. In the last phase, the best out of the 16 created (=9 kNN-based + 7 voted) outcomes were selected by deploying a greedy algorithm. The greedy algorithm selects the outcome with the maximum classification accuracy. As shown in Figure 2, the proposed model generates nine feature vectors, each of length 1000, using nine pre-trained CNNs. The pre-trained CNNs used to create these feature vectors are the following: (1) MobileNetV2, (2) ResNet50, (3) DarkNet53, (4) AlexNet, (5) DarkNet19, (6) DenseNet201, (7) InceptionV3, (8) InceptionResNetV2, and (9) ResNet18. The iterative neighborhood component analysis (INCA) technique is applied to these feature vectors to select the most significant features. These selected features are then fed into the kNN classifier, producing nine classifier-based outputs. These nine outputs are input into the IMV method, resulting in seven weighted outputs. Thus, the proposed model produces a total of 16 (9 + 7) outputs, from which the one with the highest performance is selected. The steps of the model's operation are described in detail below. Step 1: The images from the dataset are loaded into the model. Step 2: The fully connected layer of each pre-trained network is applied to each image, creating nine feature vectors, each containing 1000 features. Step 3: INCA is applied to the extracted features to select the most meaningful ones, resulting in nine selected feature vectors. Step 4: Each feature vector is classified using kNN classifiers, yielding nine classifier-based outputs. Step 5: The outputs from Step 4 are input into the IMV method to obtain weighted outputs. In this phase, the reason for obtaining seven outputs from nine is that the iterative variable in the IMV method starts at three. Step 6: The accuracy of the 16 outputs is calculated, and the output with the highest accuracy is selected as the final result by a greedy algorithm. The proposed model was implemented using MATLAB (2023a). First, the deep networks used were loaded into the MATLAB environment. Then, the model was functionally coded using m-files to design and execute the model. Transfer learning models are renowned for their robust classification capabilities, as evidenced by their deployment in large language models (LLMs). In light of the aforementioned considerations, a deep feature architecture based on transfer learning has been put forth [42]. In contrast to end-to-end learning models, transfer learning models do not necessitate the use of dedicated hardware. This is because, in contrast to end-to-end learning models, transfer learning models do not necessitate the adjustment of millions of parameters.