pavlin-policar / openTSNE

Extensible, parallel implementations of t-SNE
https://opentsne.rtfd.io
BSD 3-Clause "New" or "Revised" License
1.44k stars 158 forks source link

how can I use on my own image dataset? #203

Closed Tomlk closed 2 years ago

Tomlk commented 2 years ago

could you please provide a demo for local image dataset?

pavlin-policar commented 2 years ago

openTSNE is a general-purpose visualization library that can handle all kinds of data. By default, it supports any data you give it in a matrix format e.g. a numpy array or a scipy sparse matrix. What you're asking is to provide a demo on how to read image files from disk, which isn't a problem that openTSNE attempts to solve. It's up to you how you read in the data and turn it into usable matrix formats.

That said, there are plenty of tutorials on how to read in images from disk. PIL can do it, openCV can do it, scipy can do it. I'm sure you can find a myriad of tutorials online if you search for something like "scikit-learn image classification", then just instead of classification, you can use openTSNE to visualize the matrix.