Smart Computer Vision System Based on Multi-class Informed Object Detection Using YOLOv7 and ResNet-18
摘要
Object detection is a fundamental task in computer vision that involves identifying and localizing objects within images or videos. In the growth of object detection techniques, object detection needs to classify each detected object into multiple classes. This study investigates a hybrid approach for object detection and multi-classification by integrating a You Only Look Once (YOLOv7) algorithm for localization and a ResNet-18 architecture for fine-grained classification. The YOLOv7 algorithm was trained using a dataset of bounding box annotations, while the ResNet-18 architecture was trained on the same images formatted for multi-classification. The dataset consists of 2,500 images with 11416 annotations, covering six classes: adult, male, female, child, boy, and girl. The output provides one bounding box with two class labels for each detected object, resulting in functionally viable multi-classification outcomes. The performance metrics for YOLOv7 included a mean Average Precision of 0.58 (mAP@0.5), precision of 0.55, and recall of 0.66. In contrast, ResNet-18 achieved an accuracy of 0.85 with a loss of 0.273 during standalone training. The results indicate strong detection capabilities for the adult category (both male and female), while classifying children (either boy or girl) proved challenging due to limitations in the child data. This work can be used to design practical systems for identifying the gender of both adults and children.