The elevator light curtain is constrained by technical limitations in its infrared detection mechanism; thus, it is difficult to effectively identify the transparent material and elongated form of the object, which has become one of the main causes of abnormal elevator jamming accidents. To mitigate elevator accidents, we propose a novel visual segmentation method, PKNet (Prior Knowledge Network), specifically designed for detecting transparent and slender objects. We observe that the majority of cameras used in elevators are stationary, resulting in an inherently static background, while vision tasks primarily focus on detecting foreground objects. To this end, PKNet enhances the segmentation of dynamic foreground objects by incorporating prior knowledge of the static background and the characteristics of foreground objects. We also introduce ETAS-D, the first dataset designed for the segmentation of transparent and slender anomalous objects in elevator environments. This dataset consists of 4797 image frames, each with meticulously annotated masks of transparent and slender objects, captured from multiple viewpoints of 10 elevators. Extensive experimental results demonstrate that PKNet significantly outperforms existing methods in this domain. Furthermore, we propose a synthetic data generation workflow specifically designed for slender objects to enhance the model’s generalization ability and reliability.