Internal and external defect identification of pipelines using the PSO-SVM method