hYOLO Model: Enhancing Object Classification with Hierarchical Context in YOLOv8
Veska Tsenkova, Peter Stanchev, Daniel Petrov, Deyan Lazarov
TL;DR
This work introduces hYOLO, a hierarchical end-to-end model built on YOLOv8 to exploit multi-level class taxonomies and visual similarity. It contributes a hierarchical architecture integrated into the YOLO detection head, a hierarchy-aware loss that penalizes non-child predictions, and a hierarchical evaluation metric that favors semantically closer mistakes. The authors evaluate two hierarchical structures—one taxonomy-based and one visually informed—on grocery-item datasets, demonstrating improved hierarchical accuracy, better calibration of predictions, and meaningful reductions in semantically distant misclassifications compared with flat YOLOv8. The approach offers practical benefits for real-world systems in retail, healthcare, and automated surveillance by enabling context-aware recognition and controlled error severity, with potential for deeper hierarchies and broader domain adoption in future work.
Abstract
Current convolution neural network (CNN) classification methods are predominantly focused on flat classification which aims solely to identify a specified object within an image. However, real-world objects often possess a natural hierarchical organization that can significantly help classification tasks. Capturing the presence of relations between objects enables better contextual understanding as well as control over the severity of mistakes. Considering these aspects, this paper proposes an end-to-end hierarchical model for image detection and classification built upon the YOLO model family. A novel hierarchical architecture, a modified loss function, and a performance metric tailored to the hierarchical nature of the model are introduced. The proposed model is trained and evaluated on two different hierarchical categorizations of the same dataset: a systematic categorization that disregards visual similarities between objects and a categorization accounting for common visual characteristics across classes. The results illustrate how the suggested methodology addresses the inherent hierarchical structure present in real-world objects, which conventional flat classification algorithms often overlook.
