Comments (2)
Thanks for reaching out @AGrosserHH ! As you noticed, we've moved to a python module setup, but it's easy enough to find and modify the module to get this information.
First things first, one should find where the pixplot module code is. To do that, you should be able to type python
and hit enter in a terminal. That will drop you into the Python interpreter (you'll know you're in the interpreter if you see >>>
as your terminal prompt).
Once you're in the interpreter, try typing:
import pixplot
print(pixplot.__file__)
That should tell you the path like:
.../pixplot-{version}/pixplot/__init__.py
If you navigate to the folder that contains that init.py file, you should see another file pixplot.py
; that's the file we'll want to change to display the info you discuss above.
Once you open up that file, you'll see a function get_centroids()
. In that function, there's a variable z
with an attributelabels_
that contains the cluster assignments of each input image in order (so the ith value in z.labels_
is the cluster id for the ith image in kwargs['image_paths']
). To get the number of images in each cluster and the names of the images in each cluster, one can therefore add (somewhere after z
is fully populated):
cluster_map = defaultdict(list)
for idx, i in enumerate(z.labels_):
cluster_map[i].append(kwargs['image_paths'][idx])
for i in cluster_map:
print(' * cluster {} has {} images: {}'.format(i, len(cluster_map[i]), cluster_map[i]), '\n')
I hope that helps! I'm happy to follow up if you try to add this and get stuck...
from pix-plot.
@AGrosserHH I'm going to close this issue for now, but please feel free to follow up if you have any troubles!
from pix-plot.
Related Issues (20)
- Dependency Requirements Issue HOT 1
- Image not displayed on iPad
- Download metadata for additional metadata fields HOT 1
- Add option to download metadata file for UMAP clusters like that for manually created clusters
- Best way to make a smaller "PixPlot" HOT 2
- metadata / custom fields HOT 1
- Bug with get_heightmap and umap layouts HOT 3
- HDBSCAN not available HOT 5
- Non-OK status: "platform is already registered with name: "METAL"
- Non-OK status: "platform is already registered with name: 'METAL'"
- Improper duplicate name validation in filter_images() HOT 5
- gbk code issue
- How would YaleDH like PixPlot to be ited?
- How would YaleDH like Pixplot to be cited?
- Associating filenames and clusters HOT 1
- Demo websites are down
- ThreeJS error when selecting lat/long view
- Sample data downloads are broken HOT 3
- Could not build wheels for scipy, HOT 6
- Tensorflow Issue? terminating due to uncaught exception of type google::protobuf::FatalException: HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pix-plot.