Notebook cell 'For one merged image does' not work
Closed this issue · 1 comments
ComradeRomanov commented
When trying to generate single image out of heatmaps (very last cell in the notebooks), or boundary maps or highlight maps i get this error
Generating individual images via previous cell works fine.
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-20-75720bdb5cc8>](https://localhost:8080/#) in <module>()
1 heatmap_images = anodet.visualization.heatmap_images(test_images, score_maps, alpha=0.5)
----> 2 tot_img = anodet.visualization.merge_images(heatmap_images, margin=1)
3 fig, axs = plt.subplots(1, 1, figsize=(10, 6))
4 plt.imshow(tot_img)
5 plt.show()
[/usr/local/lib/python3.7/dist-packages/anodet/visualization/utils.py](https://localhost:8080/#) in merge_images(images, margin)
21 images = to_numpy(images).copy()
22
---> 23 amount, height, width, channels = images.shape
24 tot_image_height = height
25 tot_image_width = amount * width + (amount - 1) * margin
ValueError: not enough values to unpack (expected 4, got 1)
antonemanuel commented
Hi!
I cannot reproduce your error. Do you get this error when running through the original example notebook? I see you have changed parameter margin
in function call merge_images
. However this alone does not generate an error for me either.