I had the same issue. You can see that problem is with canny.
Just change image reading part to this and it should work:
reference_I = io.imread("./images/template.png").astype('float32')
target_I = io.imread("./images/image.png").astype('float32')
(basically just convert image arrays to float)
Just change image reading part to this and it should work:
reference_I = io.imread("./images/template.png").astype('float32')
target_I = io.imread("./images/image.png").astype('float32')
(basically just convert image arrays to float)