In this paper, combine a Euclidian distance restricted auto encoder foreground extraction techniques to develop a real-time object detection algorithm. The pixels in the initial frames are used to model a zero mean unit variance Gaussian distribution. The new pixels are tested against these models and classified as foreground and background based on their variance ranges. The extracted foreground is then recognized with help of a multilayered auto encoder which gives better efficiency with lesser training data because of the Euclidian distance based restriction and dropout step to avoid over fitting. The efficiency of the method and the neural network are tabulated. © 2006-2019 Asian Research Publishing Network (ARPN).