AI-Driven Digital Twin for Visual Defect Inspection in Railway Prognostics and Health Management