Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Associating filenames and clusters #275

Open
Giuliagiorgi opened this issue Jul 18, 2023 · 1 comment
Open

Associating filenames and clusters #275

Giuliagiorgi opened this issue Jul 18, 2023 · 1 comment

Comments

@Giuliagiorgi
Copy link

Hi everyone and thank you for this amazing tool!

I'm trying to clusterize around 9k images through PixPlot to exclude non-pertinent clusters of images.
To do that, I wonder if there is a possibility to have a file with the filenames of the images associated with each cluster without using the lazo option (which would be less precise).

In the 'hotspot' JSON file, the images associated with each cluster have an integer number and then there is the filename of the centroid. Something along the line:

{
    "images": [
        20,
        23,
        118,
        177,
        221,
        222,
        223,
        224,
        ...
    ],
    "img": "B_E33VKIOek.jpg",
    "label": "Cluster 2"
}

This makes it difficult to filter out the images in the original folder, as I cannot link them to the one in the cluster. The output I'm looking for instead is something like:

{
    "images": [
        B_E33VKIOek.jpg,
        B_aaaaaaa.jpg,
        B_bbbbbb.jpg,
        B_fofofo.jpg,
        ...
    ],
    "img": "B_E33VKIOek.jpg",
    "label": "Cluster 2"
}

Am I missing something and this output already exists?
Or how can I link the integer numbers in the 'hotspot' JSON file to the filenames of the images?

Thank you very much,
Giulia

@duhaime
Copy link
Contributor

duhaime commented Jul 20, 2023

Hey Giulia! Those integers in the images key are just the index positions of images/files within imagelist in the output. If you wrote a little script it should be easy to convert the index positions to the filenames. I hope that helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants