Assessment of Geometrical Features of Internal Flaws with Artificial Neural Network Optimized by a Thermodynamic Equilibrium Algorithm