{"id":19162790,"url":"https://github.com/centre-for-humanities-computing/pixplot","last_synced_at":"2025-07-04T19:03:00.868Z","repository":{"id":35235590,"uuid":"214445994","full_name":"centre-for-humanities-computing/pixplot","owner":"centre-for-humanities-computing","description":"docker container for pixplot","archived":false,"fork":false,"pushed_at":"2023-03-25T00:04:44.000Z","size":2665,"stargazers_count":6,"open_issues_count":5,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T21:25:29.259Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/centre-for-humanities-computing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-10-11T13:39:09.000Z","updated_at":"2024-08-10T21:10:21.000Z","dependencies_parsed_at":"2025-04-20T15:15:18.993Z","dependency_job_id":null,"html_url":"https://github.com/centre-for-humanities-computing/pixplot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centre-for-humanities-computing%2Fpixplot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centre-for-humanities-computing%2Fpixplot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centre-for-humanities-computing%2Fpixplot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centre-for-humanities-computing%2Fpixplot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/centre-for-humanities-computing","download_url":"https://codeload.github.com/centre-for-humanities-computing/pixplot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252866122,"owners_count":21816397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T09:13:10.042Z","updated_at":"2025-05-07T11:21:39.231Z","avatar_url":"https://github.com/centre-for-humanities-computing.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CHC Pix plot docker container\nA fork of [DHLab's pix plot repository](https://github.com/YaleDHLab/pix-plot) for demonstrations with custom image collections\n\n## About PixPlot\n\nThis repository contains code that can be used to visualize tens of thousands of images in a two-dimensional projection within which similar images are clustered together. The image analysis uses Tensorflow's Inception bindings, and the visualization layer uses a custom WebGL viewer.\n\n![App preview](./assets/images/preview.png?raw=true)\n\n## Dependencies\n\nYou need to [install Docker](https://docs.docker.com/install/). If you are on Windows 7 or earlier, you may need to install [Docker Toolbox](https://docs.docker.com/toolbox/toolbox_install_windows/) instead.\n\nThe html viewer requires a WebGL-enabled browser.\n\n## Setup\n\n 1) set a title in the index.html file\n 1) copy jpg files into \n \n ```\n ./data/images\n ```\n\n## How To Generate the Pixplot\n\nDownload this repository by clicking the green \"Clone or download\" button and then \"Download ZIP\".\n\nUnpack the zip file. \n\nStart a terminal, cd into the folder that contains this README file.\n\n*Below steps each have numbered commands for later reference.*\n\nGenerate the environment for your pixplot within a docker container (command 1):\n\n```bash\n# command 1: \n# build the docker container\ndocker build --tag pixplot --file Dockerfile .\n```\n\nProcess your collection into a pix plot (command 2). \n\n*Depending on the size of your image collection, this can take several hours. In our hackathon it took Max around 3.5 hours.*\n\n```\n# command 2:\n# process images from the VM collection\n# use the `-v` flag to mount directories from outside\n#   the container into the container\ndocker run \\\n  -v \"$(pwd)/output:/pixplot/output\" \\\n  -v \"$(pwd)/data/images:/pixplot/images\" \\\n  pixplot \\\n  bash -c \"cd pixplot \u0026\u0026 python3.6 utils/process_images.py images/*\"\n```\n\nYou now have generated your pixplot. The next step will start a web server to host your plot on http://localhost:5000\n\n```\n# command3:\n# run the web server\ndocker run \\\n  -v \"$(pwd)/output:/pixplot/output\" \\\n  -p 5000:5000 \\\n  pixplot \\\n  bash -c \"cd pixplot \u0026\u0026 python3.6 -m http.server 5000\"\n```\n\n## Curating Automatic Hotspots\n\nBy default, PixPlot uses [*k*-means clustering](https://en.wikipedia.org/wiki/K-means_clustering) to find twenty hotspots in the visualization.  You can adjust the number of discovered hotspots by changing the `n_clusters` value in `utils/process_images.py` and re-running the script.\n\nAfter processing, you can curate the discovered hotspots by editing the resulting `output/plot_data.json` file. (This file can be unwieldy in large datasets -- you may wish to disable syntax highlighting and automatic wordwrap in your text editor.) The hotspots will be listed at the very end of the JSON data, each containing a label (by default 'Cluster *N*') and the name of an image that represents the centroid of the discovered hotspot.\n\nYou can add, remove or re-order these, change the labels to make them more meaningful, and/or adjust the image that symbolizes each hotspot in the left-hand **Hotspots** menu.  *Hint: to get the name of an image that you feel better reflects the cluster, click on it in the visualization and it will appear suffixed to the URL.*\n\n## Project Adaptations ##\n\n1. SMK 2020\n2. Artistic Exchange 21-24\n\n## Acknowledgements\n\nThe DHLab would like to thank [Cyril Diagne](http://cyrildiagne.com/), a lead developer on the spectacular [Google Arts Experiments TSNE viewer](https://artsexperiments.withgoogle.com/tsnemap/), for generously sharing ideas on optimization techniques used in this viewer.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentre-for-humanities-computing%2Fpixplot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcentre-for-humanities-computing%2Fpixplot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentre-for-humanities-computing%2Fpixplot/lists"}