The increasing packaging density of flip chips brings great challenges for micro defect detection. It is necessary to develop an efficient and automatic inspection system for electronic industrial application. In this paper, the scanning acoustic microscopy (SAM) technology and the optimized classifier were investigated for the automatic detection of solder joint defects of flip chips. Ultrasonic images of 1902 solder bumps from 6 chip samples were obtained using a SAM equipment. The decision tree model was improved by introducing the granularity decision entropy. The feature vectors were extracted from the images of solder bumps, and then used for classification. The results show that the decision tree model correctly detected 1812 solder bumps with the accuracy of 95.3%. It is verified that the ultrasonic defect detection system based on the improve decision tree model has high accuracy for micro defect inspection, which has potential and promising application in the electronic packaging industry.