poloclub / wizmap

Explore and interpret large embeddings in your browser with interactive visualization! 📍
https://poloclub.github.io/wizmap/
MIT License
422 stars 30 forks source link

Different colors for different points? #5

Open WhiteTeaDragon opened 1 year ago

WhiteTeaDragon commented 1 year ago

Hello!

Is there an opportunity to mark different points with different colors?

xiaohk commented 1 year ago

Currently we only support up to two groups. When I have more time, I will update the tool to support more groups. I will also update the Python function to make it easy for users to specify groups when generating their WizMap.

You can specify the group of each point in the JSON files. Take DiffusionDB as an example.

In the diffusiondb.json file, we specify the group names, contours associated with each group, etc.

# Keys of the the object
['grid',
 'xRange',
 'yRange',
 'sampleSize',
 'totalPointSize',
 'padded',
 'groupGrids',
 'groupTotalPointSizes',
 'embeddingName',
 'groupNames',
 'image',
 'topic']

In the diffusiondb.ndjson file, we give a group number to each point at the 5th item in the item array.

[0.6875,
  -1.3631,
  'a cinematic painting of ricky gervais as batman near a lake on a rainy day, beautiful lighting, high depth, ultra realistic, artistic, by annie leibovitz and greg rutowski ',
  '',
  0],
 [-3.4658,
  1.4771,
  'a hyper - detailed 3 d render of the hidden city of cloud caves, surrealism!!!!! surreal concept art, lifelike, photorealistic, digital painting, aesthetic, smooth, sharp focus, artstation hd, by greg rutkowski, klimt and nixeu and ian sprigger and wlop and krenz cushart, valentina remenar and asher duran, ',
  '',
  0],
[-4.7069817,
  4.4307537,
  '3f/3f72a44a-1b36-4de8-bd2a-68046e844429.webp',
  '',
  1],
 [-3.5961475,
  -3.2497282,
  '24/240c16c6-ab4d-4bd4-8519-7a153d59d137.webp',
  '',
  1]
Bdl-1989 commented 1 year ago

please provide a sample that will be appreciate!

Chao0511 commented 1 year ago

Hello,

I'm not sure if I understand correctly what is `group' in your answer.

e.g. I want to assign different color for different class in multi-class classification. Is there a way to do so?

Thanks.

botbw commented 1 year ago

Currently we only support up to two groups. When I have more time, I will update the tool to support more groups. I will also update the Python function to make it easy for users to specify groups when generating their WizMap.

You can specify the group of each point in the JSON files. Take DiffusionDB as an example.

In the diffusiondb.json file, we specify the group names, contours associated with each group, etc.

# Keys of the the object
['grid',
 'xRange',
 'yRange',
 'sampleSize',
 'totalPointSize',
 'padded',
 'groupGrids',
 'groupTotalPointSizes',
 'embeddingName',
 'groupNames',
 'image',
 'topic']

In the diffusiondb.ndjson file, we give a group number to each point at the 5th item in the item array.

[0.6875,
  -1.3631,
  'a cinematic painting of ricky gervais as batman near a lake on a rainy day, beautiful lighting, high depth, ultra realistic, artistic, by annie leibovitz and greg rutowski ',
  '',
  0],
 [-3.4658,
  1.4771,
  'a hyper - detailed 3 d render of the hidden city of cloud caves, surrealism!!!!! surreal concept art, lifelike, photorealistic, digital painting, aesthetic, smooth, sharp focus, artstation hd, by greg rutkowski, klimt and nixeu and ian sprigger and wlop and krenz cushart, valentina remenar and asher duran, ',
  '',
  0],
[-4.7069817,
  4.4307537,
  '3f/3f72a44a-1b36-4de8-bd2a-68046e844429.webp',
  '',
  1],
 [-3.5961475,
  -3.2497282,
  '24/240c16c6-ab4d-4bd4-8519-7a153d59d137.webp',
  '',
  1]

Hi, could you please explain where we can find the diffusiondb.json (since it doesn't appear in the repo)? Also will be appreciate it if there will be an example for custom dataset.