Retinal blood vessels provide information on the risk of cardiovascular disease (CVD). Here, we report the development and validation of deep-learning models for the automated measurement of retinal-vessel calibre in retinal photographs, using diverse multiethnic multicountry datasets that comprise more than 70,000 images. Retinal-vessel calibre measured by the models and by expert human graders showed high agreement, with overall intraclass correlation coefficients of between 0.82 and 0.95. The models performed comparably to or better than expert graders in associations between measurements of retinal-vessel calibre and CVD risk factors, including blood pressure, body-mass index, total cholesterol and glycated-haemoglobin levels. In retrospectively measured prospective datasets from a population-based study, baseline measurements performed by the deep-learning system were associated with incident CVD. Our findings motivate the development of clinically applicable explainable end-to-end deep-learning systems for the prediction of CVD on the basis of the features of retinal vessels in retinal photographs.