Visual Similarity Search of Cattle Brands Using Deep Learning on Binary Representations - Medeiros, Marcos Vinicius S.; Soares, Leandra A.; Hoyle, Edmundo; Díaz-Salazar, Aldo A. (Anais da Conference on Graphics, Patterns and Images (SIBGRAPI), 2025)
Identifying cattle brands is a challenging visual task due to variability in branding styles, degradation over time, and the absence of standardized, large-scale datasets. To address this, we propose a deep learning-based Content-Based Image Retrieval (CBIR) framework specifically designed for this problem. Our system matches hand-drawn or digitized query sketches of cattle brands against a reference database of binarized brand symbols using learned visual embeddings for similarity search. To support training and rigorous evaluation, we assembled the Apporteira Cattle Brand Dataset, comprising 5,233 clean binary brand templates, 1,454 hand-drawn sketches, and over 627,000 augmented images simulating real-world distortions via rotations, morphological operations, and homographic transformations. This dataset has been made publicly available to enable reproducible research and benchmarking. We evaluate classical feature descriptors, pretrained convolutional neural networks (ResNet-50, MobileNet, VGG), and a fine-tuned VGG-16 model adapted to this domain. Experiments are reported with standard CBIR metrics, including mean Average Precision (mAP) and Top-$k$ accuracy, together with retrieval efficiency using Facebook AI Similarity Search (FAISS) to assess scalability. Our fine-tuned model achieves 79.71% Top-1 and 97.18% Top-10 accuracy, substantially outperforming generic CNN baselines and handcrafted methods. The results highlight the effectiveness of task-specific fine-tuning, showing consistent gains even when baselines perform strongly at higher ranks, and demonstrate the system's robustness to symbol variation, offering a scalable solution for livestock identification, rural security enforcement, and brand registry automation.