We developed a novel survival prediction model for images, called pix2surv, based on a conditional generative adversarial network (cGAN), and evaluated its performance based on chest CT images of patients with idiopathic pulmonary fibrosis (IPF). The architecture of the pix2surv model has a time-generator network that consists of an encoding convolutional network, a fully connected prediction network, and a discriminator network. The fully connected prediction network is trained to generate survival-time images from the chest CT images of each patient. The discriminator network is a patchbased convolutional network that is trained to differentiate the “fake pair” of a chest CT image and a generated survivaltime image from the “true pair” of an input CT image and the observed survival-time image of a patient. For evaluation, we retrospectively collected 75 IPF patients with high-resolution chest CT and pulmonary function tests. The survival predictions of the pix2surv model on these patients were compared with those of an established clinical prognostic biomarker known as the gender, age, and physiology (GAP) index by use of a two-sided t-test with bootstrapping. Concordance index (C-index) and relative absolute error (RAE) were used as measures of the prediction performance. Preliminary results showed that the survival prediction by the pix2surv model yielded more than 15% higher C-index value and more than 10% lower RAE values than those of the GAP index. The improvement in survival prediction by the pix2surv model was statistically significant (P < 0.0001). Also, the separation between the survival curves for the low- and high-risk groups was larger with pix2surv than that of the GAP index. These results show that the pix2surv model outperforms the GAP index in the prediction of the survival time and risk stratification of patients with IPF, indicating that the pix2surv model can be an effective predictor of the overall survival of patients with IPF.