Tumour infiltrating lymphocytes (TIL) influence the prognosis of Ductal carcinoma in situ (DCIS). Currently, manual assessment of TIL by expert pathologists is considered a gold standard. However, there are issues with a shortage of expert pathologists and inter-observer variability. A reliable automated scoring method is yet to be developed due to the inherent complexity of DCIS duct morphology and the assessment strategy. We developed a new deep learning and spatial analysis pipeline to automatically score DCIS stromal TIL (AI-TIL) from 243 diagnostic haematoxylin and eosin-stained whole slide images from 127 patients. To automatically identify and segment DCIS ducts, we implemented a generative adversarial network. To identify lymphocytes, we used a pre-trained deep learning model. Our DCIS segmentation model achieved a dice overlap of 0.94 (± 0.01 ) and the cell classifier model achieved 92% accuracy compared to pathologists’ annotations. Subsequently, we automatically delineated a stromal boundary and computed the percentage of the boundary area occupied by lymphocytes for each DCIS duct. Finally, we computed TIL score as the average of all duct level scores within the slide. We observe a higher correlation between AI-TIL and pathologists (average) score for wider stomal boundaries (r = 0.66, p = 6.0 × 10 - 7, W = 0.3 mm) compared with smaller boundary (r = 0.23, p = 0.12, W = 0.03 mm). Using multivariate analysis, a low AI-TIL score was associated with an increased risk of recurrence independent of age, grade, estrogen receptor (ER) status, progesterone receptor (PR) status, and necrosis (hazard ratio = 0.14, 95% CI 0.038–0.51, p = 0.003, W = 0.03 mm). These results suggest that our pipeline could be used to automatically quantify stromal TIL in DCIS and integrating AI-TIL with pathologists’ visual assessment may improve DCIS recurrence risk estimation.