Сначала на поврежденной фотографии определяются зоны с царапинами. Построенная маска накладывается на фото и нейросеть заполняет области пустоты
Колоризацию проводит отдельная нейросеть обученная на старых цветных фотографиях (так что колоризация любой фотографии получается слегка в винтажном стиле)
Операция повышения разрешения происходит на стороннем сервисе через API запрос. На выхое получаете картинку разрешением х8.
https://deepai.org/machine-learning-model/torch-srgan