76 image comparison
Comparing images with an interactive slider
Uncomment the following line to install leafmap if needed.
Note that the
image_comparison will only work with Jupyter Notebook or JupyterLab. It seems not working with Visual Studio Code.
# %pip install -U leafmap
img1 = 'https://open.gishub.org/data/images/berkeley.jpg' img2 = "https://open.gishub.org/data/images/berkeley_sam.jpg"
The labels might not show up the first time. Try running the code block again to show the labels.
leafmap.image_comparison( img1, img2, label1='Satellite Image', label2='Image Segmentation', starting_position=50, out_html='image_comparison.html', )