Abstract
Automatic and reliable urine sediment analysis is essential for timely diagnosis and management of renal and urinary disorders. However, manual methods are time-consuming, subjective, and limited by operator abilities. In this study, we propose a novel deep learning method based on a multi-head YOLOv12 architecture combined with self-supervised pretraining and advanced inference through Slicing Aided Hyper Inference (SAHI) to effectively address these challenges. Unlike prior methods that employed a single detection head, our architecture features six specialized and independent detection heads: Cells, Casts, Crystals, Microorganisms/Yeast, Artifact, and Others, enabling simultaneous and fine-grained classification of the full spectrum of urine sediment particles, including all relevant subclasses. To facilitate robust training, we created a large-scale dataset (OpenUrine) encompassing 790 labeled images with over 31,285 bounding boxes across 39 categories, and 5640 unlabeled images for self-supervised learning. Evaluated on this complex 39-class dataset, our model achieved a precision of 76.59% and a mean Average Precision (mAP) of 64.15%, demonstrating competitive performance in detection accuracy, especially of small and low-contrast objects.