This repository automatically generates an HTML (index.html
) page showcasing a 2D space of 1D convolution-based filters, a common technique employed in Deep Learning for Time Series Classification. Inspired by the techniques outlined in Deep Learning for Time Series Classification, this tool leverages the power of the Bokeh library and Aeon toolkit to visualize these filters in an interactive and intuitive manner. Explore the spatial arrangement of filters and gain insights into their distribution, aiding in model understanding and interpretation.
tensorflow
numpy
hydra-core
aeon
scikit-learn
bokeh
bs4
matplotlib
This code utilizes the hydra configuration setup, simply edit the parameters of the configuration file ('config/config_hydra.yaml`) and run the following:
python main.py
The different parameters include:
output_directory
: The output directory where the results are storedmodel_paths
: A list of model paths to use, make sure to use the absolute path. PS: make sure you use.keras
not.hdf5
files if you are tf >= 2.15layer_indices
: a list of layer indices in corresponding modelslist_labels
: a list of labels for each of the modelslist_colors
: a list of colors in HEX code, if None used colors are randomly generateddistance
: a distance to compare filters among available distances in Aeon (default: 'dtw')title
: title of the html page (default: 'Filter 2D Visualization')
We present below the generated figure of our code using the example models stored in example/
.
This generates this html file, visualizing filters from the last conv layer of two different Lite classifiers trained on Car dataset.
This work was supported by the ANR DELEGATION project (grant ANR-21-CE23-0014) of the French Agence Nationale de la Recherche.