wizmap icon indicating copy to clipboard operation
wizmap copied to clipboard

How to add images?

Open nabsiddiqui opened this issue 1 year ago • 1 comments

Is there a notebook that shows how to add images with something like their captions? For instance, I have a csv file that contains "image_name" and "captions." I want to display the images and have the captions be used for topic modeling.

nabsiddiqui avatar Nov 21 '24 16:11 nabsiddiqui

I am looking for the same feature, got confused with image_url_prefix in generate_grid_dict.

lilila avatar Dec 18 '24 16:12 lilila

Hi! Sorry for the late response. You can check out this tutorial notebook to add images: https://github.com/poloclub/wizmap/blob/main/example/diffusiondb-images.ipynb

xiaohk avatar Jul 10 '25 23:07 xiaohk

Hello @xiaohk. I ran both the notebook you linked to and your DiffusionDB example (https://poloclub.github.io/wizmap/?dataset=diffusiondb) and am unable to see the images in both. I have images checked both under points and "contour."

Image

nabsiddiqui avatar Jul 17 '25 10:07 nabsiddiqui

I just tested https://poloclub.github.io/wizmap/?dataset=diffusiondb and I can see the images. For this one you need to wait until the image points are loaded (they are loaded after the text points).

Image

xiaohk avatar Jul 17 '25 16:07 xiaohk

The notebook will create a slightly different format: each data point includes a text and an image. The original diffusiondb wizmap has separate text-only data points and image-only data points.

You can see the new wizmap created by the notebook here: https://poloclub.github.io/wizmap/?dataURL=https%3A%2F%2Fhuggingface.co%2Fdatasets%2Fxiaohk%2Fembeddings%2Fresolve%2Fmain%2Fdiffusiondb%2Fdata.ndjson&gridURL=https%3A%2F%2Fhuggingface.co%2Fdatasets%2Fxiaohk%2Fembeddings%2Fresolve%2Fmain%2Fdiffusiondb%2Fgrid.json

Image

xiaohk avatar Jul 17 '25 16:07 xiaohk

Ah. I see. Thank you for the follow-up @xiaohk . I think it would be helpful to have a loading count that displays the total percentage of text and images loaded so far.

It may also be beneficial to load a small batch of images and text together and then load the next batch. This may be more than you have bandwidth for at the moment. Just wanted to put the suggestion out there. Really enjoy the software.

nabsiddiqui avatar Jul 17 '25 18:07 nabsiddiqui