Using X-ray technologies and deep neural networks for digital restoration of paintings: the CHNet AIRES-CH project
Alessandro Bombini, INFN Firenze
AI@INFN, Bologna, May 3rd, 2022
2
02-03 May 2022 AI@INFN
2D UNet-like
Refiner
Recolored Image
XRF
1D CNN
AIRES-CH
(Artificial Intelligence for digital REStoration of Cultural Heritage)
a.k.a. how to (try to) digitally restore damaged paintings using physics and AI
the CHNet AIRES-CH project - Alessandro Bombini
Bombini, A., Anderlini, L., dell’Agnello, L., Giacomini, F., Ruberto, C., Taccetti, F.: The AIRES-CH project: Artificial Intelligence for digital REStoration of Cultural Heritages using physical imaging and multidimensional adversarial neural networks, Accepted for publication on the ICIAP2021 conference proceedings, Springer Lecture Notes in Computer Science vol. 13231
…STARTING SOON…
3
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
Artificial Intelligence for digital REStoration of Cultural Heritage (AIRES-CH) aims at building a web-based app for the digital restoration of pictorial artworks through Computer Vision technologies applied to physical imaging raw data.
WHAT IS AIRES-CH?
The goal is to develop a DNN capable of inferring the RGB image from an XRF image (i.e. the 3D tensor [h,w,E]); this will be obtained by a multi-dimensional DNN, capable of exploiting features of 1D and 2D DNN.
4
02-03 May 2022 AI@INFN
XRF
2D UNet-like
1D CNN
Refiner
Recolored Image
the CHNet AIRES-CH project - Alessandro Bombini
Artificial Intelligence for digital REStoration of Cultural Heritage (AIRES-CH) aims at building a web-based app for the digital restoration of pictorial artworks through Computer Vision technologies applied to physical imaging raw data.
WHAT IS AIRES-CH?
The goal is to develop a DNN capable of inferring the RGB image from an XRF image (i.e. the 3D tensor [h,w,E]); this will be obtained by a multi-dimensional DNN, capable of exploiting features of 1D and 2D DNN.
5
02-03 May 2022 AI@INFN
XRF
2D UNet-like
1D CNN
Refiner
Recolored Image
the CHNet AIRES-CH project - Alessandro Bombini
Artificial Intelligence for digital REStoration of Cultural Heritage (AIRES-CH) aims at building a web-based app for the digital restoration of pictorial artworks through Computer Vision technologies applied to physical imaging raw data.
WHAT IS AIRES-CH?
The goal is to develop a DNN capable of inferring the RGB image from an XRF image (i.e. the 3D tensor [h,w,E]); this will be obtained by a multi-dimensional DNN, capable of exploiting features of 1D and 2D DNN.
6
02-03 May 2022 AI@INFN
XRF
2D UNet-like
1D CNN
Refiner
Recolored Image
the CHNet AIRES-CH project - Alessandro Bombini
Artificial Intelligence for digital REStoration of Cultural Heritage (AIRES-CH) aims at building a web-based app for the digital restoration of pictorial artworks through Computer Vision technologies applied to physical imaging raw data.
WHAT IS AIRES-CH?
The goal is to develop a DNN capable of inferring the RGB image from an XRF image (i.e. the 3D tensor [h,w,E]); this will be obtained by a multi-dimensional DNN, capable of exploiting features of 1D and 2D DNN.
7
02-03 May 2022 AI@INFN
WHY AIRES-CH?
the CHNet AIRES-CH project - Alessandro Bombini
It may be Lapis Lazuli Blue; probably it sees Ca in the Lazurite [(Na,Ca)8(AlSiO4)6(S,SO4,Cl)1–2] and K, sometimes substituting the Na. [https://www.mindat.org/min-2357.html]
Crocifissione di Viterbo, Unknown author, XVI sec. circa;
courtesy of Museum Polo Monumentale colle del Duomo, Viterbo & Archeoares srl.
8
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
Portable XRF
Taccetti, F., Castelli, L., Czelusniak, C. et al. A multipurpose X-ray fluorescence scanner developed for in situ analysis. Rend. Fis. Acc. Lincei 30, 307–322 (2019). https://doi.org/10.1007/s12210-018-0756-x
WHAT IS X-RAY FLUORESCENCE?
9
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
Portable XRF
Taccetti, F., Castelli, L., Czelusniak, C. et al. A multipurpose X-ray fluorescence scanner developed for in situ analysis. Rend. Fis. Acc. Lincei 30, 307–322 (2019). https://doi.org/10.1007/s12210-018-0756-x
Fe
Hg
PB
Ca
Fe
WHAT IS X-RAY FLUORESCENCE?
10
02-03 May 2022 AI@INFN
WHY X-RAY FLUORESCENCE?
Visible Layer, Ragazzo Triste, XVIII sec. Circa, Unknown author
XRF Sb image, Ragazzo Triste, XVIII sec. Circa, Unknown author
the CHNet AIRES-CH project - Alessandro Bombini
11
02-03 May 2022 AI@INFN
AIRES-CH
Training Dataset
the CHNet AIRES-CH project - Alessandro Bombini
12
02-03 May 2022 AI@INFN
The whole dataset is composed by 62 XRF raw data coming from several XRF analysis on multiple paintings performed both in the LABEC facility in Florence, as well as in situ analysis (the data comes not only from published works, and include some private artworks).
For training the 1D models, only a 50% of the pixels where used (being randomly chosen), giving a training dataset of around 2,059,780 [histogram, RGB] pairs, divided into training, test, and validation set.
For training the 2D models, 45 XRF scans are used, reserving the remaining as 9 for test, and 8 for validation.
The raw data are obtained by three different devices, all developed, built and assembled by CHNet.
The raw data comes from different artwork typologies: multi-layered paintings, drawings without preparatory layers, and illuminated manuscripts, all over different periods and epochs (from middle ages to contemporary art).
It is worth noticing that artworks from different epochs might have been realised using different pigments. Visually similar colour can therefore be associated to completely different XRF spectra depending on the painting’s epoch.
TRAINING DATASET
the CHNet AIRES-CH project - Alessandro Bombini
Bombini, A., Anderlini, L., dell’Agnello, L., Giacomini, F., Ruberto, C., Taccetti, F.: The AIRES-CH project: Artificial Intelligence for digital REStoration of Cultural Heritages using physical imaging and multidimensional adversarial neural networks, Accepted for publication on the ICIAP2021 conference proceedings, Springer Lecture Notes in Computer Science vol. 13231
13
02-03 May 2022 AI@INFN
AIRES-CH
Neural Network Architectures
1D Branch
the CHNet AIRES-CH project - Alessandro Bombini
14
02-03 May 2022 AI@INFN
1D BRANCH MODELS
the CHNet AIRES-CH project - Alessandro Bombini
15
02-03 May 2022 AI@INFN
1D BRANCH MODELS
the CHNet AIRES-CH project - Alessandro Bombini
16
02-03 May 2022 AI@INFN
1D BRANCH MODELS
v7_DilatedWaveNet
Input
Causal
Cinv1D
MaxPool1D
Dilated
Conv1D
BatchNorm
Multiply
Conv1D
Add
Dense
Dropout
Dense
Dropout
Dense
Dropout
Output
Add
GlobalAveragePooling1D
1 809 183 parameters
the CHNet AIRES-CH project - Alessandro Bombini
17
02-03 May 2022 AI@INFN
1D BRANCH MODELS
v6_FractalNet
2 117 195 parameters
Input
Input
Dense
Dropout
Dense
Dropout
Dense
Dropout
Output
Flatten
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
InternalBlock
Conv1D
BatchNorm
the CHNet AIRES-CH project - Alessandro Bombini
18
02-03 May 2022 AI@INFN
1D BRANCH MODELS
1D: v5_CustomMultInputs
.
.
.
.
.
.
Input
Conv1D
Conv1D
Input
Conv1D
Conv1D
Input
Conv1D
Conv1D
Generate 2-Grams
Conv1D
Conv1D
Conv1D
Conv1D
Conv1D
Conv1D
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
Concatenate
.
.
.
.
.
.
Input
MaxPool1D
ResBlock
ResBlock
ResBlock
Dense
Dropout
Output
Input
Conv1D
BatchNorm
Conv1D
Conv1D
MaxPool1D
BatchNorm
Conv1D
Conv1D
MaxPool1D
BatchNorm
Dense
Dropout
Dense
Dropout
Conv1D
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
2 482 731 parameters
Tin (Sn) Kα
Potassium (K) Kα
Manganese (Mn) Kα
Titanium (Ti) Kα
the CHNet AIRES-CH project - Alessandro Bombini
19
02-03 May 2022 AI@INFN
1D BRANCH MODELS
more on scores
the CHNet AIRES-CH project - Alessandro Bombini
| Binary Cross-Entropy | Mean Squared Error |
v5_CustomMultInputs | 0.636 | 0.0138 |
v6_FractalNet | 0.633 | 0.0141 |
v7_WaveNet | 0.629 | 0.0146 |
| SSIM | MS-SSIM | PSNR |
v5_CustomMultInputs | 0.388 | 0.680 | 20.104 |
v6_FractalNet | 0.372 | 0.677 | 20.076 |
v7_WaveNet | 0.356 | 0.673 | 19.980 |
20
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
EXAMPLE ON VALIDATION RAW DATA - multilayered painting
GOOD
21
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
EXAMPLE ON VALIDATION RAW DATA - multilayered painting
GOOD
22
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
EXAMPLE ON VALIDATION RAW DATA - illuminated manuscripts
NOT GOOD
XRF sees behind outermost pictorial layer
23
02-03 May 2022 AI@INFN
AIRES-CH
Neural Network Architectures
2D Branch
the CHNet AIRES-CH project - Alessandro Bombini
24
02-03 May 2022 AI@INFN
2D BRANCH MODELS
the CHNet AIRES-CH project - Alessandro Bombini
25
02-03 May 2022 AI@INFN
2D BRANCH MODELS
the CHNet AIRES-CH project - Alessandro Bombini
Encoder
VGG-19
Decoder
VGG-19T
2D: VGG UNet
15 246 659 parameters
26
02-03 May 2022 AI@INFN
2D BRANCH MODELS
the CHNet AIRES-CH project - Alessandro Bombini
Encoder
Decoder
DilResBlocks
2D: Dilated Residual UNet
2 179 779 parameters
27
02-03 May 2022 AI@INFN
2D BRANCH MODELS
the CHNet AIRES-CH project - Alessandro Bombini
| Binary Cross-Entropy | Mean Squared Error |
VGG | 0.480 | 0.0159 |
DilResNet | 0.460 | 0.0121 |
| SSIM | MS-SSIM | PSNR |
VGG | 0.733 | 0.626 | 19.691 |
DilResNet | 0.745 | 0.669 | 21.097 |
28
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
EXAMPLE ON VALIDATION RAW DATA - multilayered painting
GOOD
MS-SSIM best score
2D
1D
(best model)
29
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
EXAMPLE ON VALIDATION RAW DATA - illuminated manuscripts
NOT GOOD
Here 2D outperforms 1D
2D
1D
(best model)
30
02-03 May 2022 AI@INFN
AIRES-CH
Conclusions
Outlook
the CHNet AIRES-CH project - Alessandro Bombini
31
02-03 May 2022 AI@INFN
CONCLUSIONS & OUTLOOK
the CHNet AIRES-CH project - Alessandro Bombini
MACHINA
XRF
World Wide Web
raw data
Cloud
Bombini, A., Anderlini, L., dell’Agnello, L., Giacomini, F., Ruberto, C., Taccetti, F.: Hyperparameter optimisation of Artificial Intelligence for digital REStoration of Cultural Heritages (AIRES-CH) models, Under review Workshop on Advancements in Applied Machine-learning and Data Analytics (AAMDA), Springer Lecture Notes in Computer Science
Alessandro Bombini
email: bombini@fi.infn.it
Thank you for your attention!
Extra slides
Alessandro Bombini
email: bombini@fi.infn.it
34
02-03 May 2022 AI@INFN
INFN-CHNet
Cultural Heritage Network
how it is organised
the CHNet AIRES-CH project - Alessandro Bombini
35
35
1st level nodes:�Laboratories in INFN facilities
2nd level nodes:�Universities, Restoration Centres, Associations, with complementary competencies
3rd level nodes:�Foreign research centres/Universities outside Europe.
- Each 3rd level node is bound to a 1st level node
- Each 3rd level node is encouraged to create a �local network with different competencies in its own country
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
Research�(50%)
External Projects
INFN-CHNet
INFN
Education�(20%)
Third Mission�(30%)
Access to �Laboratories and� Instrumentation�(30%)
Public� Engagement�(40%)
Technology�Transfer�(30%)
The INFN
Cultural Heritage Network
Giuntini, L.; Castelli, L.; Massi, M.; Fedi, M.; Czelusniak, C.; Gelli, N.; Liccioli, L.; Giambi, F.; Ruberto, C.; Mazzinghi, A.; Barone, S.; Marchegiani, F.; Nisi, S.; Lubritto, C.; Altieri, S.; Tortora, L.; Branchini, P.; Fabbri, A.; Graziani, V.; Lins, S.B.; Guidorzi, L.; Lo Giudice, A.; Re, A.; Sottili, L.; Balerna, A.; Cestelli Guidi, M.; Pronti, L.; Romani, M.; Albertin, F.; Bettuzzi, M.; Brancaccio, R.; Morigi, M.P.; Alloni, D.; Salvini, A.; Smilgys, B.; Prata, M.; Altieri, S.; Bonesini, M.; Di Martino, D.; Clemenza, M.; Carpinelli, M.; Oliva, P.; Sipala, V.; Gueli, A.M.; Pasquale, S.; Stella, G.; Pepponi, G.; Grazzi, F.; Taccetti, F. Detectors and Cultural Heritage: The INFN-CHNet Experience. Appl. Sci. 2021, 11, 3462. https://doi.org/10.3390/app11083462
36
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
The INFN-CHNET
Digital Heritage Laboratory
INFN-CHNet is organised in three research domain:
The DHLab (Digital Heritage Laboratory) is in charge of developing software service for the INFN-CHNet researchers, (mostly of which) to be offered on the CHNet cloud,
mainly in the EU Projects Ariadne+, EOSC-Pillar and 4CH.
It currently offers cloud services developed within 2 european projects, EOSC-Pillar and Ariadne+.
In the near future, they will be integrated into the 4CH competence center on Cultural Heritage,
where INFN is task leader of the Tasks 3.3 (Cultural Heritage Cloud) and 3.5 (Big Data Services).
It is also involved in digital technology research.
CHNet cloud
Bombini, A., Castelli, L., dell’Agnello, L., Felicetti, A., Giacomini, F., Niccolucci, F., Taccetti, F.: CHNet cloud: an EOSC-based cloud for physical technologies applied
to cultural heritages. In: GARR (ed.) Conferenza GARR 2021 - Sostenibile/Digitale.
Dati e tecnologie per il futuro.
(2021). https://doi.org/10.26314/GARR-Conf21-proceedings-09,
37
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
MACHINA
(Movable Accelerator for Cultural Heritage In-situ Non-destructive Analysis)
S. Mathot, G. Anelli, S. Atieh, A. Bilton, B. Bulat, Th. Callamand, S. Calvo, G. Favre, J.-M. Geisser, A. Gerardin, A. Grudiev, A. Lombardi, E. Montesinos, F. Motschmann, H. Pommerenke, P. Richerot, K. Scibor, M. Timmins, M. Vretenar, F. Taccetti, F. Benetti, L. Castelli, M. Chiari, C. Czelusniak, S. Falciano, M. Fedi, P.A. Mandò, M. Manetti, C. Matacotta, E. Previtali, C. Ruberto, V. Virgili, L. Giuntini, The CERN PIXE-RFQ, a transportable proton accelerator for the machina project, Nuclear Instruments and Methods in Physics Research Section B, https://doi.org/10.1016/j.nimb.2019.08.025
Portable XRF
Taccetti, F., Castelli, L., Czelusniak, C. et al. A multipurpose X-ray fluorescence scanner developed for in situ analysis. Rend. Fis. Acc. Lincei 30, 307–322 (2019). https://doi.org/10.1007/s12210-018-0756-x
3MV Tandetron
14C AMS line
PIXE-PIGE line
Chiari, M., et al. LABEC, the INFN ion beam laboratory of nuclear techniques for environment and cultural heritage. Eur. Phys. J. Plus 136, 472 (2021). https://doi.org/10.1140/epjp/s13360-021-01411-1
The INFN-CHNet Florence node
LABEC
38
02-03 May 2022 AI@INFN
DHLAB tools
XRF visualizer
how it works
the CHNet AIRES-CH project - Alessandro Bombini
39
The XRF (X-Ray Fluorescence) is a physical imaging technology, which allows researchers to explore the elemental composition of a study object;
Applied to pictoric image, such a painting or a fresco, or to a document, such miniated manuscripts, allows us to understand the elemental composition of pigments.
The XRF Analyser service is designed to allow researchers to perform real-time in-browser elaborations and visualization of XRF raw data.
User may easily visualize the XRF image with few clicks.
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
40
The XRF Analyser service is designed to allow researchers to perform real-time in-browser elaborations and visualization of XRF raw data.
User may easily visualize the XRF image with few clicks.
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
The XRF (X-Ray Fluorescence) is a physical imaging technology, which allows researchers to explore the elemental composition of a study object;
Applied to pictoric image, such a painting or a fresco, or to a document, such miniated manuscripts, allows us to understand the elemental composition of pigments.
41
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
The XRF (X-Ray Fluorescence) is a physical imaging technology, which allows researchers to explore the elemental composition of a study object;
Applied to pictoric image, such a painting or a fresco, or to a document, such miniated manuscripts, allows us to understand the elemental composition of pigments.
The XRF Analyser service is designed to allow researchers to perform real-time in-browser elaborations and visualization of XRF raw data.
User may easily visualize the XRF image with few clicks.
42
Kα Fe
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
The XRF (X-Ray Fluorescence) is a physical imaging technology, which allows researchers to explore the elemental composition of a study object;
Applied to pictoric image, such a painting or a fresco, or to a document, such miniated manuscripts, allows us to understand the elemental composition of pigments.
The XRF Analyser service is designed to allow researchers to perform real-time in-browser elaborations and visualization of XRF raw data.
User may easily visualize the XRF image with few clicks.
43
Kα Pb
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
The XRF (X-Ray Fluorescence) is a physical imaging technology, which allows researchers to explore the elemental composition of a study object;
Applied to pictoric image, such a painting or a fresco, or to a document, such miniated manuscripts, allows us to understand the elemental composition of pigments.
The XRF Analyser service is designed to allow researchers to perform real-time in-browser elaborations and visualization of XRF raw data.
User may easily visualize the XRF image with few clicks.
44
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
45
02-03 May 2022 AI@INFN
AIRES-CH
Neural Network Architectures
1D Branch
MORE DETAILS
the CHNet AIRES-CH project - Alessandro Bombini
46
1D: v5_CustomMultInputs
.
.
.
.
.
.
Input
Conv1D
Conv1D
Input
Conv1D
Conv1D
Input
Conv1D
Conv1D
Generate 2-Grams
Conv1D
Conv1D
Conv1D
Conv1D
Conv1D
Conv1D
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
Concatenate
.
.
.
.
.
.
Input
MaxPool1D
ResBlock
ResBlock
ResBlock
Dense
Dropout
Output
Input
Conv1D
BatchNorm
Conv1D
Conv1D
MaxPool1D
BatchNorm
Conv1D
Conv1D
MaxPool1D
BatchNorm
Dense
Dropout
Dense
Dropout
Conv1D
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
2 482 731 parameters
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
47
1D: v5_CustomMultInputs
Conv1D
BatchNorm
Conv1D
BatchNorm
Conv1D
BatchNorm
Block Input
ResBlock
ResBlock
Conv1D
BatchNorm
Conv1D
BatchNorm
Conv1D
BatchNorm
Block Input
Conv1D
BatchNorm
Residual connections prevents Vanishing Gradient problem
Projection residual block
Identity residual block
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
48
1D: v5_CustomMultInputs
Conv1D
BatchNorm
Conv1D
BatchNorm
Conv1D
BatchNorm
Block Input
ResBlock
Conv1D
BatchNorm
Projection residual block
Most simplistic explanation would be that 1x1 convolution leads to dimension reductionality. For example, an image of 200 x 200 with 50 features on convolution with 20 filters of 1x1 would result in size of 200 x 200 x 20.
A 1x1xU convolution filter convolved across a V-channel image emulates a UxV matrix multiplied by each V-channel pixel, which is the same as running a single-layer neural network across every pixel of your input as if each pixel were an example vector in a training set.
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
49
1D: v5_CustomMultInputs
Conv1D
BatchNorm
Conv1D
BatchNorm
Conv1D
BatchNorm
Block Input
ResBlock
Conv1D
BatchNorm
Projection residual block
Most simplistic explanation would be that 1x1 convolution leads to dimension reductionality. For example, an image of 200 x 200 with 50 features on convolution with 20 filters of 1x1 would result in size of 200 x 200 x 20.
A 1x1xU convolution filter convolved across a V-channel image emulates a UxV matrix multiplied by each V-channel pixel, which is the same as running a single-layer neural network across every pixel of your input as if each pixel were an example vector in a training set.
Reduce size
(in filters’ number direction)
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
50
1D: v5_CustomMultInputs
ResBlock
Conv1D
BatchNorm
Conv1D
BatchNorm
Conv1D
BatchNorm
Block Input
Identity residual block
Most simplistic explanation would be that 1x1 convolution leads to dimension reductionality. For example, an image of 200 x 200 with 50 features on convolution with 20 filters of 1x1 would result in size of 200 x 200 x 20.
A 1x1xU convolution filter convolved across a V-channel image emulates a UxV matrix multiplied by each V-channel pixel, which is the same as running a single-layer neural network across every pixel of your input as if each pixel were an example vector in a training set.
Doesn’t reduce size
(in filters’ number direction)
= Pure identity
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
51
1D: v5_CustomMultInputs
RESULTS
.
.
.
.
.
.
Input
Conv1D
Conv1D
Input
Conv1D
Conv1D
Input
Conv1D
Conv1D
Generate 2-Grams
Conv1D
Conv1D
Conv1D
Conv1D
Conv1D
Conv1D
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
Concatenate
.
.
.
.
.
.
Input
MaxPool1D
ResBlock
ResBlock
ResBlock
Dense
Dropout
Output
Input
Conv1D
BatchNorm
Conv1D
Conv1D
MaxPool1D
BatchNorm
Conv1D
Conv1D
MaxPool1D
BatchNorm
Dense
Dropout
Dense
Dropout
Conv1D
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
SCORES
The higher, the better:
SSIM mean on 8 test images for model v5_CustomMultInputs test images: 0.38844215869903564
MS-SSIM mean on 8 test images for model v5_CustomMultInputs test images: 0.6803240776062012
PSNR mean on 8 test images for model v5_CustomMultInputs test images: 20.103897094726562
The lower, the better:
BCE mean on 8 test images for model v5_CustomMultInputs test images: 0.6364541140695413
MSE mean on 8 test images for model v5_CustomMultInputs test images: 0.013798782990003625
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
52
1D: v5_CustomMultInputs
RESULTS
.
.
.
.
.
.
Input
Conv1D
Conv1D
Input
Conv1D
Conv1D
Input
Conv1D
Conv1D
Generate 2-Grams
Conv1D
Conv1D
Conv1D
Conv1D
Conv1D
Conv1D
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
Concatenate
.
.
.
.
.
.
Input
MaxPool1D
ResBlock
ResBlock
ResBlock
Dense
Dropout
Output
Input
Conv1D
BatchNorm
Conv1D
Conv1D
MaxPool1D
BatchNorm
Conv1D
Conv1D
MaxPool1D
BatchNorm
Dense
Dropout
Dense
Dropout
Conv1D
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
GOOD
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
53
1D: v5_CustomMultInputs
RESULTS
.
.
.
.
.
.
Input
Conv1D
Conv1D
Input
Conv1D
Conv1D
Input
Conv1D
Conv1D
Generate 2-Grams
Conv1D
Conv1D
Conv1D
Conv1D
Conv1D
Conv1D
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
Concatenate
.
.
.
.
.
.
Input
MaxPool1D
ResBlock
ResBlock
ResBlock
Dense
Dropout
Output
Input
Conv1D
BatchNorm
Conv1D
Conv1D
MaxPool1D
BatchNorm
Conv1D
Conv1D
MaxPool1D
BatchNorm
Dense
Dropout
Dense
Dropout
Conv1D
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
GOOD
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
54
1D: v5_CustomMultInputs
RESULTS
.
.
.
.
.
.
Input
Conv1D
Conv1D
Input
Conv1D
Conv1D
Input
Conv1D
Conv1D
Generate 2-Grams
Conv1D
Conv1D
Conv1D
Conv1D
Conv1D
Conv1D
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
Concatenate
.
.
.
.
.
.
Input
MaxPool1D
ResBlock
ResBlock
ResBlock
Dense
Dropout
Output
Input
Conv1D
BatchNorm
Conv1D
Conv1D
MaxPool1D
BatchNorm
Conv1D
Conv1D
MaxPool1D
BatchNorm
Dense
Dropout
Dense
Dropout
Conv1D
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
NO GOOD
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
55
1D: v5_CustomMultInputs
RESULTS
.
.
.
.
.
.
Input
Conv1D
Conv1D
Input
Conv1D
Conv1D
Input
Conv1D
Conv1D
Generate 2-Grams
Conv1D
Conv1D
Conv1D
Conv1D
Conv1D
Conv1D
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
Concatenate
.
.
.
.
.
.
Input
MaxPool1D
ResBlock
ResBlock
ResBlock
Dense
Dropout
Output
Input
Conv1D
BatchNorm
Conv1D
Conv1D
MaxPool1D
BatchNorm
Conv1D
Conv1D
MaxPool1D
BatchNorm
Dense
Dropout
Dense
Dropout
Conv1D
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
ResBlock
NO GOOD
Pentagram drawn in the back page
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
56
1D: v6_FractalNet
2 117 195 parameters
Input
Input
Dense
Dropout
Dense
Dropout
Dense
Dropout
Output
Flatten
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
InternalBlock
Conv1D
BatchNorm
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
57
1D: v6_FractalNet
RESULTS
Input
Input
Dense
Dropout
Dense
Dropout
Dense
Dropout
Output
Flatten
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
SCORES
The higher, the better:
SSIM mean on 8 test images for model v6_FractalNet test images: 0.37207430601119995
MS-SSIM mean on 8 test images for model v6_FractalNet test images: 0.6766429543495178
PSNR mean on 8 test images for model v6_FractalNet test images: 20.075578689575195
The lower, the better:
BCE mean on 8 test images for model v6_FractalNet test images: 0.6330596869811416
MSE mean on 8 test images for model v6_FractalNet test images: 0.014069222259422531
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
58
1D: v6_FractalNet
RESULTS
Input
Input
Dense
Dropout
Dense
Dropout
Dense
Dropout
Output
Flatten
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
GOOD
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
59
1D: v6_FractalNet
RESULTS
Input
Input
Dense
Dropout
Dense
Dropout
Dense
Dropout
Output
Flatten
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
GOOD
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
60
1D: v6_FractalNet
RESULTS
Input
Input
Dense
Dropout
Dense
Dropout
Dense
Dropout
Output
Flatten
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
Add
InternalBlock
InternalBlock
InternalBlock
NO GOOD
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
61
1D: v7_DilatedWaveNet
Input
Causal
Cinv1D
MaxPool1D
Dilated
Conv1D
BatchNorm
Multiply
Conv1D
Add
Dense
Dropout
Dense
Dropout
Dense
Dropout
Output
Add
GlobalAveragePooling1D
1 809 183 parameters
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
62
1D: v7_DilatedWaveNet
RESULTS
SCORES
The higher, the better:
SSIM mean on 8 test images for model v7_WaveNet test images: 0.3563966155052185
MS-SSIM mean on 8 test images for model v7_WaveNet test images: 0.6734365820884705
PSNR mean on 8 test images for model v7_WaveNet test images: 19.979719161987305
The lower, the better:
BCE mean on 8 test images for model v7_WaveNet test images: 0.6287169173359871
MSE mean on 8 test images for model v7_WaveNet test images: 0.014554956532083451
Input
Causal
Cinv1D
MaxPool1D
Dilated
Conv1D
BatchNorm
Multiply
Conv1D
Add
Dense
Dropout
Dense
Dropout
Dense
Dropout
Output
Add
GlobalAveragePooling1D
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
63
1D: v7_DilatedWaveNet
RESULTS
GOOD
Input
Causal
Cinv1D
MaxPool1D
Dilated
Conv1D
BatchNorm
Multiply
Conv1D
Add
Dense
Dropout
Dense
Dropout
Dense
Dropout
Output
Add
GlobalAveragePooling1D
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
64
1D: v7_DilatedWaveNet
RESULTS
GOOD
Input
Causal
Cinv1D
MaxPool1D
Dilated
Conv1D
BatchNorm
Multiply
Conv1D
Add
Dense
Dropout
Dense
Dropout
Dense
Dropout
Output
Add
GlobalAveragePooling1D
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
65
1D: v7_DilatedWaveNet
RESULTS
NO GOOD
Input
Causal
Cinv1D
MaxPool1D
Dilated
Conv1D
BatchNorm
Multiply
Conv1D
Add
Dense
Dropout
Dense
Dropout
Dense
Dropout
Output
Add
GlobalAveragePooling1D
the CHNet AIRES-CH project - Alessandro Bombini
02-03 May 2022 AI@INFN
66
02-03 May 2022 AI@INFN
AIRES-CH
Neural Network Architectures
2D Branch
MORE DETAILS
the CHNet AIRES-CH project - Alessandro Bombini
67
2D: VGG UNet
15 246 659 parameters
Encoder
VGG-19
Decoder
VGG-19T
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
68
2D: VGG UNet
RESULTS
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
69
2D: VGG UNet
RESULTS
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
70
2D: VGG UNet
RESULTS
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
71
2D: VGG UNet
RESULTS
MS-SSIM most relevant metric
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
72
2D: VGG UNet
RESULTS
COMPLETE FAILURE
too many layers (?)
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
73
2D: VGG UNet
RESULTS
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
74
2D: VGG UNet
RESULTS
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
75
2D: VGG UNet
RESULTS
NOT SO BAD
why?
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
76
2D: Dilated Residual UNet
2 179 779 parameters
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
77
2D: Dilated Residual UNet
Dilated Residual Block
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
78
2D: Dilated Residual UNet
Dilated Residual Block
Conv2D
Dilated Conv2D
dilated convolutions are used to increase the receptive field of the higher layers, compensating for the reduction in receptive field induced by removing subsampling.
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
79
2D: Dilated Residual UNet
Dilated Residual Block
Conv2D
Dilated Conv2D
Skip connection
Residual connections prevents Vanishing Gradient problem
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
80
2D: Dilated Residual UNet
RESULTS
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
81
2D: Dilated Residual UNet
RESULTS
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
82
2D: Dilated Residual UNet
RESULTS
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
83
2D: Dilated Residual UNet
RESULTS
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
84
2D: Dilated Residual UNet
RESULTS
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
85
2D: Dilated Residual UNet
RESULTS
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
86
2D: Dilated Residual UNet
RESULTS
Here 2D outperforms 1D!
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
87
02-03 May 2022 AI@INFN
AIRES-CH
Conclusions
Analysis of Results
the CHNet AIRES-CH project - Alessandro Bombini
88
02-03 May 2022 AI@INFN
Artificial Intelligence for digital REStoration of Cultural Heritage (AIRES-CH) aims at building a web-based app for the digital restoration of pictorial artworks through Computer Vision technologies applied to physical imaging raw data.
The goal is to develop a DNN capable of inferring the RGB image from an XRF image (i.e. the 3D tensor [h,w,E]); this will be obtained by a multi-dimensional DNN, capable of exploiting features of 1D and 2D DNN.
XRF
2D UNet-like
1D CNN
Refiner
Recolored Image
Up to now, the two branches were developed and trained on a dataset formed by XRF images of various pictorial artworks (e.g.~paintings, drawings, illuminated manuscripts) of different geographical origins and historical periods, and the goal of this project is to show that the goal of inferring an RGB image from an XRF image is feasible.
The DNN is furnished in alpha version in the XRF web app.
the CHNet AIRES-CH project - Alessandro Bombini
89
Calcium
Iron
Example: Ottavio Leoni (late XVII sec. - early XVIII sec.)
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
90
Calcium
Iron
Iron
oxide
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
Example: Ottavio Leoni (late XVII sec. - early XVIII sec.)
91
Calcium
Iron
Meudon
white
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
Example: Ottavio Leoni (late XVII sec. - early XVIII sec.)
92
Ottavio Leoni, “Cardinale Antonio Maria Sauli”, 1621.
by courtesy of Accademia “La Colombaria”
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
Example: Ottavio Leoni (late XVII sec. - early XVIII sec.)
93
Van der Weyden, “Lamentation of Christ”, 1460
by courtesy of Galleria degli Uffizi
Ca
Pb
Fe
Hg
Another example: Van der Weyden
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
94
Van der Weyden, “Lamentation of Christ”, 1460
by courtesy of Galleria degli Uffizi
Ca
Pb
Fe
Hg
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
Another example: Van der Weyden
95
Van der Weyden, “Lamentation of Christ”, 1460
by courtesy of Galleria degli Uffizi
Ca
Pb
Fe
Hg
02-03 May 2022 AI@INFN
the CHNet AIRES-CH project - Alessandro Bombini
Another example: Van der Weyden
THE END
Alessandro Bombini
email: bombini@fi.infn.it