The functions change the original images, so when you run the same function multiple times they "stack". Create a copy of the parameter images instead of referencing the same object.
Remove frame from framed_boundary_images (boundary_images()). The functions should be able to run separately.
Create a function framed_images() that also takes image_scores as a parameter.
Add min_v, max_v as parameters to heatmap_image. And finish the docstring in heatmap_images.
The framed images should be red if they are anomalous and green if they are okay. (Fixed in framed_boundary_images)
Some things that should be fixed: