Optimized 3D Reconstruction for Infrastructure Inspection with Automated Structure from Motion and Machine Learning Methods