Sample size calculation is an important factor to evaluate the reliability of the diagnostic test. In this paper, a case study of the clinical diagnostic test of artificial intelligence for identification of liver contrast-enhanced ultrasound was performed to conduct two-category and multi-categories studies. Based on sensitivity and specificity, the sample size was then estimated in combination with the statistical characteristics of disease incidence, test level and one/two-sided test. Eventually, the sample size was corrected by integrating the factors of the proportion of training/test dataset and the dropout rate of cases in the medical image recognition system. Moreover, the application of Sample Size Calculator, MedCalc, PASS, and other software can accelerate sample size calculation and reduce the amount of labor.