Comments (4)
Thanks for your note @Kesavadas , that's a good question!
The easiest way to find the number of images in each cluster is to make the following changes to utils/process_images.py
.
First, change line 16 to: from collections import defaultdict, Counter
Then, inside the function get_centroids
, right after the line that says
X = np.array(self.image_vectors)
add the following:
# find the number of observations in each cluster
cluster_indices = model.fit_predict(X)
print(Counter(cluster_indices))
That will print out a counter object that maps each cluster index to the number of observations in that cluster. E.g. here's the output for a 20 cluster model with ~1000 images:
Counter({14: 261, 16: 247, 4: 211, 8: 200, 2: 190, 0: 160, 9: 144, 12: 133, 11: 90, 6: 79, 7: 76, 15: 68, 13: 65, 18: 64, 17: 59, 3: 56, 10: 46, 19: 32, 1: 30, 5: 19})
That output says that cluster index 14 has 261 observations, cluster index 16 has 247 observations, and so forth.
If any of this is unclear or if you have trouble making those changes, please feel free to follow up!
from pix-plot.
@Kesavadas is it alright to close this issue? If so I'd be grateful if you could!
from pix-plot.
Sorry for the delay ... I couldn't test it yet
I will close it now
If I encounter any issues I will get back to you
Thanks for your help
from pix-plot.
No worries @Kesavadas, thanks for following up!
from pix-plot.
Related Issues (20)
- Metadata tag filter filename too long errors
- 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
- Could not build wheels for scipy, HOT 6
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.