Recently, there was a lot of researches on real-time detection and tracking algorithms, as the frequent use of surveillance cameras and the expansion of its applications, especially in security and surveillance. However, many challenges have emerged that hinder monitoring systems' work, whether in the detection or tracking stage. We propose a robust new algorithm to detect and track objects from natural scenes captured with real-time cameras to achieve this. This work aims to create a detection and tracking algorithm that is responsive to actual and fundamental changes. This algorithm is characterized by the detection of multiple moving creatures, limited resources, and different challenges. This algorithm combines principal component analysis and deep learning networks to make the most of these two approaches' advantages to achieve an intelligent detection and tracking system that works in real-time. It is done adaptively between the two approaches to enhance performance compared to the existing detection and tracking algorithms. The experimental results showed the new algorithm's effectiveness and efficiency by comparing it with other detection and tracking systems and obtaining good detection and classification accuracy.