Segmentation of intricate and dynamic visual patterns is still a major challenge in computer vision, especially when temporal continuity, texture variation, and noise robustness are essential. This paper presents ST-HybridSeg, a new hybrid deep learning architecture that combines Spatio-Temporal Transformer Networks (STFormer), attention-guided feature fusion, and Quantum-Inspired Particle Swarm Optimization (QPSO) to realize robust, efficient, and adaptive image segmentation. Standard descriptors—local binary pattern, local weighting pattern, and RGB intensities—are combined with high-level semantic features derived through a pre-trained convolutional neural network (CNN) and strengthened with a cross-attention block. STFormer modules are used in place of convolutional long short-term memory to ensure temporal coherence while capturing long-distance spatiotemporal relationships throughout changing sequences. Clustering is carried out with an adaptive K-region-based clustering algorithm, whose centers are optimized through QPSO to guarantee convergence to global optima in the presence of noise and variability. Comprehensive tests on the diverse image and video dataset confirm the better performance of ST-HybridSeg with a segmentation accuracy of 98.5%, intersection over union of 97.9%, and 30% less inference time compared to traditional baselines. This framework represents a major step forward for real-world use in medical diagnostics, real-time monitoring, and environmental sensing.
R et al. (Sun,) studied this question.