Objectives To automatically measure the Cobb angle and diagnose scoliosis on chest X-rays, a computer-aided method was proposed and the reliability and accuracy were evaluated. Methods Two Mask R-CNN models as the core of a computer-aided method were used to separately detect and segment the spine and all vertebral bodies on chest X-rays, and the Cobb angle of the spinal curve was measured from the output of the Mask R-CNN models. To evaluate the reliability and accuracy of the computer-aided method, the Cobb angles on 248 chest X-rays from lung cancer screening were measured automatically using a computer-aided method, and two experienced radiologists used a manual method to separately measure Cobb angles on the aforementioned chest X-rays. Results For manual measurement of the Cobb angle on chest X-rays, the intraclass correlation coefficients (ICC) of intra-and inter-observer reliability analysis was 0.941 and 0.887, respectively, and the mean absolute differences were < 3.5°. The ICC between the computer-aided and manual methods for Cobb angle measurement was 0.854, and the mean absolute difference was 3.32°. These results indicated that the computer-aided method had good reliability for Cobb angle measurement on chest X-rays. Using the mean value of Cobb angles in manual measurements > 10° as a reference standard for scoliosis, the computer-aided method achieved a high level of sensitivity (89.59%) and a relatively low level of specificity (70.37%) for diagnosing scoliosis on chest X-rays. Conclusion The computer-aided method has potential for automatic Cobb angle measurement and scoliosis diagnosis on chest X-rays.