Machine Learning Methods for Autonomous Object Recognition and Restoration in Images