1 of 96

Machine Learning

for Cultural Heritage

Alessandro Bombini, INFN-CHNet Firenze & ICSC

XX Seminar on Software

for Nuclear, Subnuclear and Applied Physics,

Porto Conte, June, 5th, 2023

2 of 96

Physics

AI, ML & DNN

Cultural Heritage

NOW

Nice reviews:

[1] Giuntini L, Taccetti F, et al.. Detectors and Cultural Heritage: The INFN-CHNet Experience. Applied Sciences. 2021; 11(8):3462. https://doi.org/10.3390/app11083462

This week

[2],

[2] M. Feickert, B. Nachman, A Living Review of Machine Learning for Particle Physics, https://github.com/iml-wg/HEPML-LivingReview

[3]

[3] M. Fiorucci, M. Khoroshiltseva, M. Pontil, A. Traviglia, A. Del Bue, S. James, Machine Learning for Cultural Heritage: A Survey,

Pattern Recognition Letters, Volume 133, 2020, https://doi.org/10.1016/j.patrec.2020.02.017

Nuclear Imaging

Raw Data

of

Pictorial Artworks

Colour

Digital restoration

Possible application:

2

3 of 96

Before ML:

Nuclear Vision

for Cultural Heritage

4 of 96

Before ML

Stratigraphy of Pictorial Artworks

support

glue (+ chalk) ground

white priming

preparatory drawing

wood, canvas, etc.

organic glues, etc.

Pb white, Ca white, etc.

graphite

painted layer 1

multi-elemental pigments

painted layer n

multi-elemental pigments

varnish

organic

4

5 of 96

VIS/NIR

Before ML: Stratigraphy of Pictorial Artworks

Physical Imaging techniques

support

glue (+ chalk) ground

X, γ

white priming

preparatory drawing

wood, canvas, etc.

IR

organic glues, etc.

Pb white, Ca white, etc.

graphite

painted layer 1

multi-elemental pigments

painted layer n

multi-elemental pigments

varnish

organic

5

6 of 96

X, γ

Before ML: Stratigraphy of Pictorial Artworks

Signals

6

7 of 96

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?

Raw data

7

8 of 96

Before ML: Stratigraphy of Pictorial Artworks

Creating the XRF datacube

(x,y)

8

9 of 96

Before ML: Stratigraphy of Pictorial Artworks

Creating the XRF datacube

(x,y)=(6,9)

(x,y)=(6,8)

(x,y)=(6,10)

motor movement

9

10 of 96

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

11 of 96

Fe

Hg

Pb

Ca

Fe

x

y

e

11

12 of 96

Why X-Ray Fluorescence?

  • It provides fast, sensitive, multi-elemental non-invasive, non-destructive analysis. It is perfect for Cultural Heritage applications;​
  • It can be performed with portable apparatus for in-situ analysis (e.g. in museums).​
  • Can produce macro-maps [~ O(meter)] (MA-XRF)​
  • It is able to detect signal coming from hidden pictorial layers, underneath the outermost one.​
  • IT IS AVAILABLE TO US.

Visible Layer, Ragazzo Triste, XVIII sec. Circa, ​Unknown author​

XRF Sb image​, Ragazzo Triste, XVIII sec. Circa, ​Unknown author​

12

13 of 96

  • It provides fast, sensitive, multi-elemental non-invasive, non-destructive analysis. It is perfect for Cultural Heritage applications;​
  • It can be performed with portable apparatus for in-situ analysis (e.g. in museums).​
  • Can produce macro-maps [~ O(meter)] (MA-XRF)​
  • It is able to detect signal coming from hidden pictorial layers, underneath the outermost one.​
  • IT IS AVAILABLE TO US.

Visible Layer, Ragazzo Triste, XVIII sec. Circa, ​Unknown author​

XRF Sb image​, Ragazzo Triste, XVIII sec. Circa, ​Unknown author​

14 of 96

INTRINSIC LIMITS OF X-RAY FLUORESCENCE

  • Slow pace dataset creation (~O(10) XRF raw data / year)
  • Noisy data ( e.g. calibration ADC-to-Energy changes)
  • Data engineering needed (e.g. alignment/resizing of RGB pixels to XRF pixels)
  • Low detection limits of light elements
  • Blind to organic properties of pigments (they are always C-O-H compounds)

INTRINSIC LIMITS OF RGB

  • Non absolute color scale
  • Data engineering needed (e.g. alignment/resizing of RGB pixels to XRF pixels)
  • Color perception is subjective (it is a psychophysical phenomenon)
  • Pigments color is not absolute & changes in time (color degradation)

http://chemart.rice.edu/images/AnthraquinoneDyes.jpg

Are we doomed to fail?

(spoiler: no)

14

15 of 96

INTRINSIC LIMITS OF X-RAY FLUORESCENCE

  • Slow pace dataset creation (~O(10) XRF raw data / year)
  • Noisy data ( e.g. calibration ADC-to-Energy changes)
  • Data engineering needed (e.g. alignment/resizing of RGB pixels to XRF pixels)
  • Low detection limits of light elements
  • Blind to organic properties of pigments (they are always C-O-H compounds)

INTRINSIC LIMITS OF RGB

  • Non absolute color scale
  • Data engineering needed (e.g. alignment/resizing of RGB pixels to XRF pixels)
  • Color perception is subjective (it is a psychophysical phenomenon)
  • Pigments color is not absolute & changes in time (color degradation)

http://chemart.rice.edu/images/AnthraquinoneDyes.jpg

Are we doomed to fail?

(spoiler: no)

16 of 96

A NEW HOPE?

clustering MA-XRF raw data

16

17 of 96

A New Hope

clustering MA-XRF raw data

NOTE: NO DEEP LEARNING HERE

MA-XRF RAW DATA

ENCODER

DECODER

MA-XRF clustered DATA

*if possible

CLUSTERING

ALGORITHM

Latent space

17

18 of 96

A New Hope

clustering MA-XRF raw data

NOTE: NO DEEP LEARNING HERE

MA-XRF RAW DATA

PCA

PCA-1

MA-XRF clustered DATA

k-means clustering

Latent space

Dimensional reduction

linear

18

19 of 96

A New Hope

clustering MA-XRF raw data

NOTE: NO DEEP LEARNING HERE

MA-XRF RAW DATA

t-SNE, UMAP

k-means clustering

Latent space

Manifold Learning

highly nonlinear

19

20 of 96

A New Hope

clustering MA-XRF raw data

MA-XRF RAW DATA

PCA

Dimensional reduction

linear

Latent space

3D

2D

20

21 of 96

A New Hope

clustering MA-XRF raw data

MA-XRF RAW DATA

t-SNE

Manifold learning

highly nonlinear

Latent space

t-distributed Stochastic Neighbour Embedding

21

22 of 96

A New Hope

clustering MA-XRF raw data

MA-XRF RAW DATA

UMAP

Manifold learning

highly nonlinear

Latent space

https://pair-code.github.io/understanding-umap/

22

23 of 96

A New Hope

clustering MA-XRF raw data

k-means clustering

23

24 of 96

A New Hope: clustering MA-XRF raw data

real case application: detached fresco

Recently, in order to value the sensitivity of the system some tests were carried out with particular attention to the detection of residual material on degraded surfaces.

This is particularly relevant for example for the frescoes, in which degradation can be caused by several external agents involving physical, chemical and/or biological factors, like structure displacements, vibrations, temperature changes, humidity, pollution and mildew. This could bring to the discoloration of the upper painted layer of the fresco and, depending on the extent of the damages, it can bring the loss of the legibility of the artwork.

A mockup was prepared in the laboratory and it is a replica of an Etruscan wall painting from IV century BC from the "Tomba della Quadriga Infernale" (Tomb of the Infernal Quadriga) in Sarteano (Siena)

The fresco was obtained following the historical buon fresco technique, consisting of the application of a dry-powder pigment dispersed in water and drawn upon freshly "wet" lime plaster.

24

25 of 96

A New Hope: clustering MA-XRF raw data

real case application: detached fresco

In order to simulate the loss of pigment the intonachino was "detached" from the lime plaster support and re-collocated on a linen canvas, following the so-called technique of "strappo"

Therefore, the measurements of the residual pigment were carried out with the MA-XRF scanner both on the detachment and on the plaster background, containing the residual of the pigments.

detachment

residual

25

26 of 96

A New Hope: clustering MA-XRF raw data

real case application: detached fresco

In order to simulate the loss of pigment the intonachino was "detached" from the lime plaster support and re-collocated on a linen canvas, following the so-called technique of "strappo"

Therefore, the measurements of the residual pigment were carried out with the MA-XRF scanner both on the detachment and on the plaster background, containing the residual of the pigments.

detachment

residual

detachment

residual

S (Kα)

Ca (Kα)

Fe (Kα)

intrinsic limit

26

27 of 96

A New Hope: clustering MA-XRF raw data

real case application: detached fresco

It seems to be an insurmountable issue.

detachment

residual

Viz

Integrated XRF

27

28 of 96

A New Hope: clustering MA-XRF raw data

real case application: detached fresco

It seems to be an insurmountable issue.

detachment

residual

Viz

Integrated XRF

detachment

residual

UMAP

(latent space viz)

28

29 of 96

A New Hope: clustering MA-XRF raw data

real case application: detached fresco

It seems to be an insurmountable issue.

detachment

residual

Viz

Integrated XRF

clustering in latent space

detachment

residual

SIGNAL

29

30 of 96

A New Hope: clustering MA-XRF raw data

real case application: detached fresco

It is not an insurmountable issue.

detachment

residual

Viz

Integrated XRF

SIGNAL

30

31 of 96

A New Hope: clustering MA-XRF raw data

takeaway

  • MA-XRF raw data presents many hidden statistical relations we can exploit
  • We can either use peaks relations (i.e. 1D properties), or
  • We can use spatial segmentation (i.e. 2D properties)

A multidimensional neural network?

31

32 of 96

Artificial Intelligence for digital REStoration of Cultural Heritage

the AIRES-CH project

33 of 96

What is AIRES-CH?

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

33

34 of 96

What is AIRES-CH?

XRF

2D UNet-like

1D CNN

Refiner

Recolored Image

  • Learns from millions of pixels’ histograms
  • Learns how to associate RGB to peaks distributions
  • Loses spatial correlations

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.

1D Branch

34

35 of 96

What is AIRES-CH?

XRF

2D UNet-like

1D CNN

Refiner

Recolored Image

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.

  • Learns from few images
  • Learns how to associate RGB to regions AND peak distributions
  • Learns spatial correlations

2D Branch

35

36 of 96

What is AIRES-CH?

XRF

2D UNet-like

1D CNN

Refiner

Recolored Image

  • Learns from few images but millions of pixels’ histograms
  • Learns how to associate RGB to regions AND peak distributions
  • Learns spatial correlations
  • The refiner networks learns how to properly merge the two

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.

Joint branches

36

37 of 96

Training dataset

AIRES-CH

37

38 of 96

Training Dataset

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.

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

A huge thanks to the LABEC researchers for sharing their raw data to us:

Dr. Chiara Ruberto

Dr. Lisa Castelli

Dr. Anna Mazzinghi

38

39 of 96

Neural Network Architectures

1D & 2D branches

AIRES-CH

39

40 of 96

Neural Network Architectures

1D Branch

2D Branch

We have developed and trained few 1D - DNN models:

  1. Dense
  2. CNN
  3. ResNet-like
  4. Inception-like
  5. Custom Model
  6. FractalNet
  7. (Dilated)WaveNet

We have developed and trained fewer 2D-DNN models:

  • VGG-like
  • DilResNet-like

Due to the higher computational costs AND for the (relatively) small dataset size

What is a Neural network?

  • I know it (skip to next section)
  • I would like a gentle intro (go on)

.

40

41 of 96

Neural Network Architectures: a primer

Dense (Multi-layer perceptrons)

Input

Output

We actually can understand it

41

42 of 96

Neural Network Architectures: a primer

Dense (Multi-layer perceptrons)

Multi-layer Perceptron (a.k.a. first Deep Neural Network)

Perceptron

feed forward

free parameters

42

43 of 96

Neural Network Architectures: a primer

Training the network

  1. Initialise
  • Loop:
    1. Compute feed-forward prediction:
    • compare with real data:

Q: HOW?

A: Through the LOSS function

    • update params

43

44 of 96

Neural Network Architectures: a primer

Training the network: backprop

Gradient Descent

44

45 of 96

Neural Network Architectures: a primer

Convolutional neural networks

If we change the feed-forward process, we change the DNN architecture;

45

46 of 96

Neural Network Results

1D & 2D branches

AIRES-CH

46

47 of 96

Neural Network Architectures

1D Branch

2D Branch

We have developed and trained few 1D - DNN models:

  • Dense
  • CNN
  • ResNet-like
  • Inception-like
  • Custom Model
  • FractalNet
  • (Dilated)WaveNet

We have developed and trained fewer 2D-DNN models:

  • VGG-like
  • DilResNet-like

Due to the higher computational costs AND for the (relatively) small dataset size

All of them were (moderately) capable of inferring the RGB from the XRF histogram.

    • Structural Similarity Index Measure (SSIM)
    • Multi-Scale SSIM (MS-SSIM)
    • Peak Signal-to-Noise Ratio (PSNR)

We checked the

performances using:

    • Binary Cross-Entropy (BCE)
    • Mean Squared Error (MSE)

We trained the model

using:

47

48 of 96

Neural Network Architectures

1D Branch

2D Branch

We have developed and trained few 1D - DNN models:

  • Dense
  • CNN
  • ResNet-like
  • Inception-like
  • Custom Model
  • FractalNet
  • (Dilated)WaveNet

We have developed and trained fewer 2D-DNN models:

  • VGG-like
  • DilResNet-like

Due to the higher computational costs AND for the (relatively) small dataset size

All of them were (moderately) capable of inferring the RGB from the XRF histogram.

    • Structural Similarity Index Measure (SSIM)
    • Multi-Scale SSIM (MS-SSIM)
    • Peak Signal-to-Noise Ratio (PSNR)

We checked the

performances using:

    • Binary Cross-Entropy (BCE)
    • Mean Squared Error (MSE)

We trained the model

using:

48

49 of 96

Neural Network Architectures

1D Branch

We have developed and trained few 1D - DNN models:

  • Dense
  • CNN
  • ResNet-like
  • Inception-like
  • Custom Model
  • FractalNet
  • (Dilated)WaveNet

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

49

50 of 96

Neural Network Architectures

1D Branch

We have developed and trained few 1D - DNN models:

  • Dense
  • CNN
  • ResNet-like
  • Inception-like
  • Custom Model
  • FractalNet
  • (Dilated)WaveNet

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

Zhou Wang, A. C. Bovik, H. R. Sheikh and E. P. Simoncelli, "Image quality assessment: from error visibility to structural similarity," in IEEE Transactions on Image Processing, vol. 13, no. 4, pp. 600-612, April 2004, doi: 10.1109/TIP.2003.819861.

Luminance

Contrast

Structure

50

51 of 96

Example on validation raw data - multilayered painting

Good

1D branch

51

52 of 96

Example on validation raw data - multilayered painting

Good

1D branch

52

53 of 96

Example on validation raw data - illuminated manuscript

NOT Good

  • Pentagram drawn in the back page;

XRF sees behind outermost pictorial layer

  • too many layers are difficult to recolor

1D branch

53

54 of 96

Example on validation raw data - illuminated manuscript

NOT Good

2D branch

Here 2D outperforms 1D

2D

1D

(best model)

54

55 of 96

AIRES-CH web app

A cloud-native application for digital restoration of Cultural Heritage using nuclear imaging: AIRES-CH

AIRES-CH

DNN model

THESPIAN-XRF app

55

56 of 96

Conclusions & Outlook

  • We have shown that each MA-XRF datacube contains a huge amount of information
    • we can exploit it in many ways
  • We have shown that the goal of inferring an RGB image from an XRF raw data is feasible.
    • We have developed both 1D & 2D branches
  • We have started a new measurement campaign, jointly with Biblioteca Marucelliana, Firenze, on their drawings, to enlarge and standardise the training dataset.
  • We have embedded an alpha version on the network inside our XRF web tool

56

57 of 96

Conclusions & Outlook

  • We have developed a way to generate a synthetic dataset, to overcome the small dataset issue, by means of our python package ganX - generate artificially new XRF [arXiv:2304.14078], by means of dictionary learning.
    • it creates a MA-XRF datacube out of an RGB image + a palette consisting of a set of couples (XRF signal, rgb color)
  • We are going to scrape the internet for appropriate RGB images (i.e., Italian Medieval Manuscripts), and we use the appropriate palette to generate a huge, standardised dataset.
  • This dataset will be used to train a generative model (such as a Variational Auto-Encoder), which eventually will be fine-tuned to real data, to furthermore refined the synthetic dataset.

  • We have shown that each MA-XRF datacube contains a huge amount of information
    • we can exploit it in many ways
  • We have shown that the goal of inferring an RGB image from an XRF raw data is feasible.
    • We have developed both 1D & 2D branches
  • We have started a new measurement campaign, jointly with Biblioteca Marucelliana, Firenze, on their drawings, to enlarge and standardise the training dataset.
  • We have embedded an alpha version on the network inside our XRF web tool

57

58 of 96

Alessandro Bombini

email: bombini@fi.infn.it

Thanks for your attention!

59 of 96

59

60 of 96

Alessandro Bombini

email: bombini@fi.infn.it

Thanks for your attention!

61 of 96

Alessandro Bombini

email: bombini@fi.infn.it

Extra slides

62 of 96

ganX

how to create a synthetic MA-XRF datacube out of RGB

more on…

62

63 of 96

ganX

One of the main issues encountered during AIRES-CH project was the limited size of the training dataset.

To address this issue, we starte the

generating artificially new Xrf (ganX)1

project (to be read as [gan-ex]).

ganX is a python library which allow for a synthetic MA-XRF datacube generation out of an RGB and a palette of [RGB color, XRF spectrogram] couples.

It performs a dictionary learning, where the coefficient of the linear combination is the similarity in the CIE2000 space between the pixel color and the palette RGB color.

how to create a synthetic MA-XRF datacube out of RGB

ganX logo artwork by Serena Barone

63

64 of 96

ganX

how to create a synthetic MA-XRF datacube out of RGB

64

65 of 96

Deep Neural Network Architectures

1D branch

more on…

65

66 of 96

66

  • We have developed and trained few DNN models:
    1. Dense
    2. CNN
    3. ResNet-like
    4. Inception-like
    5. Custom Model
    6. FractalNet
    7. (Dilated)WaveNet

1D BRANCH MODELS

the CHNet AIRES-CH project - Alessandro Bombini

ResNet50 (2015)

Residual connections address Vanishing Gradient problem

67 of 96

67

  • We have developed and trained few DNN models:
    • Dense
    • CNN
    • ResNet-like
    • Inception-like
    • Custom Model
    • FractalNet
    • (Dilated)WaveNet

1D BRANCH MODELS

the CHNet AIRES-CH project - Alessandro Bombini

Parallel, different-scale learning

Inception (2014)

Parallel, different-scale learning

68 of 96

68

  • We have developed and trained few DNN models:
    • Dense
    • CNN
    • ResNet-like
    • Inception-like
    • Custom Model
    • FractalNet
    • (Dilated)WaveNet
  • All of them were (moderately) capable of inferring the RGB from the XRF histogram.
    • Three of them were slightly more performing

1D BRANCH MODELS

the CHNet AIRES-CH project - Alessandro Bombini

69 of 96

69

  • We have developed and trained few DNN models:
    • Dense
    • CNN
    • ResNet-like
    • Inception-like
    • Custom Model
    • FractalNet
    • (Dilated)WaveNet

1D BRANCH MODELS

v7_DilatedWaveNet

Input

Causal

Cinv1D

MaxPool1D

Dilated

Conv1D

BatchNorm

Multiply

Conv1D

Add

Dense

Dropout

Dense

Dropout

Dense

Dropout

Output

Add

GlobalAveragePooling1D

  • Input Layer
  • CausalConv (kernel_size = 3)
  • MaxPool1D (2x2)
  • WaveNet Block
  • Conv1D (3)
  • DilatedConv1D (3, dil_rate = )
  • BatchNorm
  • Multiply

1 809 183 parameters

  • Add
  • GlobalAveragePooling1D
  • Sigmoid Activation
  • Tanh Activation
  • Dense
  • Dropout
  • Output

Oord, Aaron van den, et al. "Wavenet: A generative model for raw audio." arXiv preprint arXiv:1609.03499 (2016). https://doi.org/10.48550/arXiv.1609.03499

the CHNet AIRES-CH project - Alessandro Bombini

70 of 96

70

the CHNet AIRES-CH project - Alessandro Bombini

71 of 96

71

1D: v7_DilatedWaveNet

  • Input Layer
  • CausalConv (kernel_size = 3)
  • MaxPool1D (2x2)
  • WaveNet Block
  • Conv1D (3)
  • DilatedConv1D (3, dil_rate = )
  • BatchNorm
  • Multiply
  • Add
  • GlobalAveragePooling1D
  • Sigmoid Activation
  • Tanh Activation
  • Dense
  • Dropout
  • Output

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

72 of 96

72

1D BRANCH MODELS

  • Input Layer (full hist)
  • MaxPool1D (2)
  • Fractal Block
  • Conv1D (kernel_size = 3)
  • BatchNorm
  • Dense
  • Dropout
  • Output
  • Internal block
  • Flatten

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

  • We have developed and trained few DNN models:
    • Dense
    • CNN
    • ResNet-like
    • Inception-like
    • Custom Model
    • FractalNet
    • (Dilated)WaveNet

Larsson, G., Maire, M., & Shakhnarovich, G. (2016). Fractalnet: Ultra-deep neural networks without residuals. arXiv preprint arXiv:1605.07648. https://doi.org/10.48550/arXiv.1605.07648

the CHNet AIRES-CH project - Alessandro Bombini

73 of 96

73

the CHNet AIRES-CH project - Alessandro Bombini

74 of 96

74

1D: v6_FractalNet

  • Input Layer (full hist)
  • MaxPool1D (2)
  • Fractal Block
  • Conv1D (kernel_size = 3)
  • BatchNorm
  • Dense
  • Dropout
  • Output
  • Internal block
  • Flatten

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

75 of 96

75

1D BRANCH MODELS

why WaveNet & FractalNet?

Zabihi, M., Rad, A. B., Kiranyaz, S., Särkkä, S., & Gabbouj, M. (2019). 1d convolutional neural network models for sleep arousal detection. arXiv preprint arXiv:1903.01552.

https://doi.org/10.48550/arXiv.1903.01552

Overview of different 1D DNN for a completely different task

    • ResNet
    • FractalNet
    • WaveNet

the CHNet AIRES-CH project - Alessandro Bombini

76 of 96

76

  • We have developed and trained few DNN models:
    • Dense
    • CNN
    • ResNet-like
    • Inception-like
    • Custom Model
    • FractalNet
    • (Dilated)WaveNet

1D BRANCH MODELS

1D: v5_CustomMultInputs

  • Input Layer (full hist)
  • Input Layer with normalization (bands)
  • MaxPool1D (2)
  • Generate 2-Grams
  • Conv1D (kernel_size = 3)
  • Concatenate
  • BatchNorm
  • Dense
  • Dropout
  • Output
  • ResBlock (reduce=True)
  • ResBlock (reduce=False)

.

.

.

.

.

.

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

77 of 96

77

1D: v5_CustomMultInputs

  • Input Layer (full hist)
  • Input Layer with normalization (bands)
  • MaxPool1D (2)
  • Generate 2-Grams
  • Conv1D (kernel_size = 3)
  • Concatenate
  • BatchNorm
  • Dense
  • Dropout
  • Output
  • ResBlock (reduce=True)
  • ResBlock (reduce=False)

.

.

.

.

.

.

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

.

.

.

.

.

.

Relevant

subdominant

X lines

Sn (Kα)

K (Kα)

Mn (Kα)

Ti (Kα)

78 of 96

Deep Neural Network Architectures

2D branch

more on…

78

79 of 96

79

  • Due to the higher computational costs, we have developed and trained 2 DNN UNet-like models:
    • VGG-like
    • DilResNet-like

2D BRANCH MODELS

Encoder

VGG-19

Decoder

VGG-19T

  • Input Layer
  • Conv2D (3x3)
  • MaxPool2D (2x2)
  • Dilated Residual Block
  • Conv2DT (2x2)
  • Concatenate+Conv2D (3x3)
  • Output Layer

2D: VGG UNet

15 246 659 parameters

the CHNet AIRES-CH project - Alessandro Bombini

80 of 96

80

  • Due to the higher computational costs, we have developed and trained 2 DNN UNet-like models:
    • VGG-like
    • DilResNet-like

2D BRANCH MODELS

Encoder

Decoder

DilResBlocks

  • Input Layer
  • Conv2D (3x3)
  • MaxPool2D (2x2)
  • Dilated Residual Block
  • Conv2DT (2x2)
  • Concatenate+Conv2D (3x3)
  • Output Layer

2D: Dilated Residual UNet

2 179 779 parameters

the CHNet AIRES-CH project - Alessandro Bombini

81 of 96

Visual Scores

.

more on…

81

82 of 96

82

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

more on Visual Scores

the CHNet AIRES-CH project - Alessandro Bombini

83 of 96

83

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

dynamic range

Structural Similarity (SSIM):

Zhou Wang, A. C. Bovik, H. R. Sheikh and E. P. Simoncelli, "Image quality assessment: from error visibility to structural similarity," in IEEE Transactions on Image Processing, vol. 13, no. 4, pp. 600-612, April 2004, doi: 10.1109/TIP.2003.819861.

more on Visual Scores

84 of 96

84

Structural Similarity (SSIM):

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

Luminance

Contrast

Structure

more on Visual Scores

the CHNet AIRES-CH project - Alessandro Bombini

85 of 96

85

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

Multiscale Structural Similarity (MS-SSIM):

more on Visual Scores

Z. Wang, E. P. Simoncelli and A. C. Bovik, "Multiscale structural similarity for image quality assessment," The Thrity-Seventh Asilomar Conference on Signals, Systems & Computers, 2003, 2003, pp. 1398-1402 Vol.2, doi: 10.1109/ACSSC.2003.1292216.

the CHNet AIRES-CH project - Alessandro Bombini

86 of 96

86

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

Peak Signal-to-Noise Ratio (PSNR):

more on Visual Scores

the CHNet AIRES-CH project - Alessandro Bombini

87 of 96

87

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

Peak Signal-to-Noise Ratio (PSNR):

True Image

more on Visual Scores

the CHNet AIRES-CH project - Alessandro Bombini

88 of 96

88

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

Peak Signal-to-Noise Ratio (PSNR):

Signal

more on Visual Scores

the CHNet AIRES-CH project - Alessandro Bombini

89 of 96

89

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

Peak Signal-to-Noise Ratio (PSNR):

Noise

more on Visual Scores

the CHNet AIRES-CH project - Alessandro Bombini

90 of 96

90

more on Visual Scores

Damon M. Chandler, "Seven Challenges in Image Quality Assessment: Past, Present, and Future Research", International Scholarly Research Notices, vol. 2013, Article ID 905685, 53 pages, 2013. https://doi.org/10.1155/2013/905685

the CHNet AIRES-CH project - Alessandro Bombini

91 of 96

UMAP

.

more on…

91

92 of 96

more on…

UMAP

https://arxiv.org/pdf/1802.03426.pdf

Part I

Part II

92

93 of 96

more on… UMAP

Part I

https://arxiv.org/pdf/1802.03426.pdf

Part I

93

94 of 96

more on… UMAP

Part II

https://arxiv.org/pdf/1802.03426.pdf

Part II

94

95 of 96

Alessandro Bombini

email: bombini@fi.infn.it

Extra slides

96 of 96

SIGNAL

SIGNAL

DATA

ANALYSIS