tree: e7cbc4ef2ba3cb78caaeb26b6b97596dba1f2c25 [path history] [tgz]
  1. convert_view_hierarchy_format.py
  2. create_ae_inputs.py
  3. create_ui_representation.py
  4. create_uv_map.py
  5. README.md
  6. run_kmeans.py
  7. train_ae.py
  8. visualize_ae_reconstruction.py
  9. visualize_clusters.py
rico/post_processing/clustering/README.md

This is a collection of scripts to cluster UI layouts produced by Rico.

Requirements

  • Keras
  • PIL
  • Theano
  • scikit-learn

Usage

Convert the view hierarchies from XML to the JSON format used by Rico.

python convert_view_hierarchy_format.py <absolute_path_to_data_folder>

Represent each UI with an image with three separate segments for text elements, icons and images.

python create_ui_representation.py <absolute_path_to_data_folder>

Combine these images into one numpy array that can be used for training an autoencoder.

python create_ae_inputs.py

Train the autoencoder.

python train_ae.py

Reconstruct the input images from the compressed representation produced by the autoencoder. Output images will be located in the reconstructed_imgs folder for inspection.

python visualize_ae_reconstruction.py

Run k-means clustering on the encoded images for the images.

python run_kmeans.py

Produce HTML files to visualize the UI clusters. HTML files will be located in cluster_viz folder for inspection.

python create_uv_map.py
python visualize_clusters.py <absolute_path_to_data_folder>