Image analytics and machine learning for in-situ defects detection in Additive Manufacturing