Python script for classification. Some utility functions. Heatmap generation and background subtraction (unfinished)