# Depth-Oriented Gray Image for Unseen Pig Detection in Real Time
## 2 Related Work  
Research on object detection and tracking in various environments has been actively conducted alongside advancements in deep learning technologies, which are increasingly applicable to video monitoring systems. Video monitoring enables real-time detection and analysis of object states, which is pivotal in optimizing management and automation across diverse fields such as agriculture, logistics, and security. However, complex environmental factors, lighting changes, and overlaps with structures remain significant challenges that can reduce object detection accuracy. These issues highlight the limitations of traditional deep learning models, which often fail to ensure generalization performance in environments different from those they were trained on. As a result, frequent object detection errors undermine the reliability and utility of video monitoring systems [17; 18; 19]. Existing studies have proposed various approaches to improve object detection accuracy to address these challenges. One prominent approach involves attention mechanisms that guide detection models to focus on relevant regions in an image. For instance, methods that define the Region of Interest (RoI) and Regions of Uninterest (RoUs) help detection models exclude irrelevant background information and focus on key objects [20; 21; 22]. By allowing models to concentrate on foreground areas during detection, RoI settings effectively enhance detection accuracy. Additionally, segmentation-based approaches that separate the foreground from the background further assist detection models in focusing on object features, offering another effective strategy [23; 24; 25]. These attention-based methods improve object detection performance in complex environments and demonstrate broad applicability across various domains. Nevertheless, external environmental factors, such as lighting-induced imbalances, continue to pose significant challenges even for these approaches. To overcome such issues, numerous experiments incorporating various preprocessing and postprocessing techniques have been proposed [26; 27; 28; 29; 30]. For example, image transformations emphasize the differences between the foreground and background, enhance image quality, or make key features more distinguishable. These techniques mitigate problems caused by lighting variations or noise in complex environments, contributing to improved detection accuracy. Enhancing contrast and emphasizing key features facilitates clear foreground-background separation, even under diverse lighting conditions or complex backgrounds. Finally, compared to optical cameras, depth cameras offer the advantage of more effectively distinguishing between the foreground and background [31; 32; 33; 34]. Depth cameras utilize the Time of Flight (ToF) principle, emitting signals and measuring the return time after interacting with objects to generate depth information [35]. This capability positions depth cameras as valuable tools for addressing challenges posed by lighting variations and complex backgrounds. However, despite their advantages, such as low cost, fast processing, and high reliability, depth cameras have limitations, including missing information due to installation location or environmental conditions and additional noise from indoor or outdoor variability. The accuracy of depth information collected by cameras can vary significantly depending on lighting conditions and structural factors in the environment. Therefore, optimizing installation locations is crucial to fully leverage the benefits of depth cameras while overcoming these environmental constraints [36]. Table 1 summarizes the results of a search using the keywords \"pig\", \"depth\", and \"detection\". This study represents the first research to improve object detection model  
performance by utilizing depth information to establish the RoI and generate generalized images in unseen environments.