This program generates clusters, each depicting the same semantic for images with evolving content. The evolution of the content results in distinct appearance for images depicting the same semantic.
Keras 2.1.0
Tensoflow 1.15.2
opencv-python
donor_names file includes the id for all subjects(donors) that we are interested in generating the sequences for, and all_img_names file includes paths to all images.
bash sequence.sh donor_names all_img_names
This query results in multiple files stored in /usb/featuresANDsequences/ for each specific donor. These files include pkl files to save some of the computed features (preventing recalculating them each time we run the program), the resulted clusters/sequences, and the list of images that the algorithm detected as individual clusters.
- <donor_id>_donor2day2imgs.pkl
- <donor_id>_donors2img2embed.pkl
- <donor_id>_imgs: all images belonging to the donor
- <donor_id>_not_sequenced: images that were placed in a cluster by themselves by our algorithm (meaning: the cluster only had one images and therefore we don't consider them as a cluster)
- <donor_id>_pcaed_sequenced: clusters generated by our algorithm. the format is img_path: cluster_name
After the clusters/sequences are generated, there is a simple interface to visualize the results. There are 3 .sh files named 'make_classe_labeled_html.sh', 'make_cluster_html.sh', 'make_html.sh' for different way of visualizing the clusters. The basic version in 'make_html.sh'. To use this feature, the following steps needs to be done:
- cp /usb/featuresANDsequences/<donor_id>_pcaed_sequenced /da1_data/icputrd/visulizeClusters/static/Cluster-HTMLs/ClusterAll1Million
on a different terminal:
- ssh da1
- cd /data/icputrd/visulizeClusters/static/Cluster-HTMLs/ClusterAll1Million
- bash make_html.sh <donor_id>_pcaed_sequenced
It's better to run the following two steps in tmux so that the server is always running...
- cd /data/icputrd/visulizeClusters/static
- python -m SimpleHTTPServer 8000
Now you should be able to see the clusters at: http://localhost:8000/Cluster-HTMLs/ClusterAll1Million/
docker build . -t <docker_image_name>
bash docker_run.sh run