Training and Validation PhấadÝỶ

Một phần của tài liệu Khóa luận tốt nghiệp: Facial recognition technology in gym management. (Trang 35 - 39)

The facial recognition system was trained using a supervised learning approach with the labeled dataset. The face detection algorithm localized facial regions in each image, and the facial landmarks were identified to align the facial images consistently.

The training data comprised facial images as input and their corresponding labels as output. Each label represented a unique identifier for each registered gym member. The LBPH (Local Binary Patterns Histograms) algorithm was employed to extract facial features and create a compact facial feature representation for each member.

To validate the trained model's performance, a portion of the dataset was reserved for validation. The validation dataset was used to assess the model's accuracy and identify potential overfitting issues. The hyperparameters of the model, such as the threshold for confidence in recognition, were tuned based on the validation results.

34

5.3. Testing and Recognition Performance

After training and validation, the facial recognition model was tested using a separate test dataset, which was distinct from both the training and validation datasets. The test dataset comprised facial images captured from the gym's entrance during the system's deployment phase.

Following the training and validation phases, the facial recognition model was put to the ultimate test using a distinct and independent test dataset. The test dataset was carefully curated to ensure that it did not overlap with either the training or validation datasets, thus providing an unbiased evaluation of the model's real-world recognition performance.

The test dataset consisted of facial images captured from the gym's entrance during the system's deployment phase. These images represented real-world scenarios, where gym members were arriving at the gym and being recognized by the facial recognition system in real-time. The diversity of lighting conditions, facial expressions, and head poses in the test dataset aimed to challenge the model's ability to generalize to new and previously unseen data.

The recognition performance of the facial recognition model was measured using the evaluation metrics discussed in Section 3.3.3. These metrics, including accuracy, precision, recall, and Fl-score, provided quantitative insights into the model's effectiveness in correctly identifying gym members and its robustness against potential false positives or false negatives.

Additionally, a confusion matrix was constructed based on the test results. The confusion matrix allowed a detailed analysis of the model's predictions, displaying true positive, true negative, false positive, and false negative counts. This visual representation of the model's performance offered a deeper understanding of the types of errors made by the

system.

The testing phase was crucial in assessing the real-world viability of the developed facial recognition system for gym member identification. By evaluating the system's

35

performance on unseen data, we could determine its practical applicability and identify any potential challenges or limitations.

To ensure the reliability of the testing results, measures were taken to prevent data leakage and maintain data separation between training, validation, and test datasets. Careful attention was given to data preprocessing, model training, and hyperparameter tuning to avoid overfitting and improve generalization capabilities.

The testing and recognition performance results provided valuable feedback on the model's strengths and weaknesses, enabling potential refinements to enhance its accuracy and overall performance in the gym management context. The insights gained from this evaluation phase played a crucial role in validating the effectiveness of the facial recognition system in real-world settings and guiding any necessary improvements or adjustments before full-scale deployment in the gym facility.

5.3.1. Recognition Accuracy

The testing phase aimed to evaluate the recognition accuracy of the system in real- world conditions. The system was assessed on its ability to correctly identify registered gym members and differentiate them from non-members.

During the testing phase, the system processed a diverse set of facial images captured

at the gym's entrance, which represented real-world scenarios of gym members arriving for their workouts. These images were acquired under varying lighting conditions, facial expressions, and head poses, mimicking the challenges encountered in practical gym management settings.

To measure recognition accuracy, the system compared the facial features extracted from the test images against the features stored in the database of registered gym members.

If the system correctly matched a test image with the corresponding identity in the database,

it was deemed a true positive recognition. Conversely, if the system identified a test image

as a registered gym member incorrectly, or if it failed to identify a gym member from the test images, it was categorized as a false positive or false negative recognition, respectively.

36

The recognition accuracy was then calculated as the percentage of correctly recognized gym members out of the total number of test images. Additionally, precision, recall, and the Fl-score were computed to provide a more comprehensive evaluation of the system's performance.

Precision represents the proportion of correctly identified gym members (true positives) out of all the positive predictions (both true positives and false positives). It measures the system's ability to avoid misclassifying non-members as gym members.

Recall, also known as sensitivity or true positive rate, is the proportion of correctly identified gym members (true positives) out of all the actual gym members in the test dataset.

It measures the system's capability to identify all the gym members present in the test images.

The Fl-score is the harmonic mean of precision and recall, providing a balanced measure that considers both false positives and false negatives. A high F1-score indicates a system that achieves a good balance between correctly identifying gym members and minimizing misclassifications.

By analyzing the recognition accuracy, precision, recall, and Fl-score, we gain valuable insights into the system's performance in identifying gym members accurately and reliably. The results of this evaluation form the basis for understanding the system's efficacy

in fulfilling its intended objectives and assist in making informed decisions about potential optimizations or enhancements.

The recognition accuracy is a critical aspect of the facial recognition system's overall performance, especially in the context of gym management, where the system's reliability and speed are of utmost importance in ensuring smooth and secure access for gym members. The testing phase provides essential feedback for fine-tuning and optimizing the system to achieve its highest recognition accuracy and fulfill its intended role in gym member identification.

The results demonstrated high recognition accuracy, with a significant majority of registered gym members successfully identified. The system accurately recognized members

37

Một phần của tài liệu Khóa luận tốt nghiệp: Facial recognition technology in gym management. (Trang 35 - 39)

Tải bản đầy đủ (PDF)

(54 trang)