A computer-implemented method for generating synthetic mammographic images using a modified
diffusion model has as novelty three training phases in which modified
diffusion is performed, namely: in a second stage 200 of local context generations, over an image representing a third channel, in a step 208 of adding
noise to the image patch, and in a step 209 of training the neural network to remove the
noise, and also modified
diffusion is performed in a
third phase 300 of generating full-resolution patches, in a step 308 of denoising the image patch, and in a step 310 of training a neural network to remove
noise. Also, the method includes working with patches in the image in the second phase 200 in steps 204-210 and in a
third phase 300 in steps 304-311. The method includes training in phase 100 on an image representing a single channel, a global context, with steps 101-106, then training over the images representing the first, second, and third channel: in phase 200 with steps 201-210 and in phase 300 with steps 301-311 and finally phase 400 of generating a full-resolution mammogram image. Phase 400 includes: subphase 401 where noise is programmatically generated and in step 403 the neural network removes it and provides an output image at a resolution of 256x256; subphase 405 with step 406 where the input image from the first phase is loaded and steps 407 are then performed-411; step 412 of integrating patches with local context in a way that ensures smooth transitions during integration, which is an innovative step; then subphase 413 where, in step 414, the medium-resolution image obtained by integrating the patches from the second phase 200 is loaded, after which steps 415-420 are performed. then step 421 of integrating the patches in the image follows, and finally, the full-resolution output image is obtained in step 422. The patch integration in step 412 is innovative and ensures smooth transitions in the image.