Created temporary directory: /tmp/pip-ephem-wheel-cache-codihgm0 Created temporary directory: /tmp/pip-req-tracker-g37mtvg9 Created requirements tracker '/tmp/pip-req-tracker-g37mtvg9' Created temporary directory: /tmp/pip-wheel-3ukhn142 Looking in indexes: https://pypi.python.org/simple Collecting density_forest==0.5 1 location(s) to search for versions of density-forest: * https://pypi.python.org/simple/density-forest/ Getting page https://pypi.python.org/simple/density-forest/ Analyzing links from page https://pypi.org/simple/density-forest/ Found link https://files.pythonhosted.org/packages/d4/5c/a84ea0027844b70f6dae8c1a5f26eeaa753b515be7808cef62b31beebde7/density_forest-0.1.tar.gz#sha256=099c951cbd9ceb1b57e46dbd5fbb9baf2e12c0cd7bcfcdafe364359a7de83b59 (from https://pypi.org/simple/density-forest/), version: 0.1 Found link https://files.pythonhosted.org/packages/af/af/ca09671e88a99f7938659a5c2ef3e86e9ef26a07ca0586c6ea0457a0ee87/density_forest-0.2.tar.gz#sha256=d74aec7437d3688cc190f70cb4eac04c3b2084e2f87a8af501dde53d92bdf96c (from https://pypi.org/simple/density-forest/), version: 0.2 Found link https://files.pythonhosted.org/packages/72/ff/c6141eea2a4ee843b4c3ee48d45f1afd75559bb0405e736d94f8e4eb0feb/density_forest-0.3.tar.gz#sha256=9c6431df7bcd442cf8629ea1b1a568509f5de5c11bc85f271f0629c1436bd87f (from https://pypi.org/simple/density-forest/), version: 0.3 Found link https://files.pythonhosted.org/packages/b1/67/65e1bb04984280d14895b2261b68e5220fc94aa0b49c6b0044970a672069/density_forest-0.3.0.1-py3-none-any.whl#sha256=c366783c4ca58acdf1fd8f25b43081a682b62ce4c51238693361c5d3570dbaad (from https://pypi.org/simple/density-forest/), version: 0.3.0.1 Found link https://files.pythonhosted.org/packages/5d/92/759c3dff2e84713ed2e4f7a83414944e7383183e4191414795c0381d4832/density_forest-0.3.0.1.tar.gz#sha256=08e20881b1db2e548414437fdf8c10e58df4c509df317e308727b8406ef4cb79 (from https://pypi.org/simple/density-forest/), version: 0.3.0.1 Found link https://files.pythonhosted.org/packages/07/5d/cdf24d62ebf0f757494d32dc340176d99bd2e99226b8a4e6a67221ec2f65/density_forest-0.3.1-py3-none-any.whl#sha256=f75c9db5a8ca26e06eef75cf1ff3354486c381670963741d399c996fa60a9982 (from https://pypi.org/simple/density-forest/), version: 0.3.1 Found link https://files.pythonhosted.org/packages/60/f7/952ce9000404114cb27cd4b5556930bb851e60d49221d005f1930b734a38/density_forest-0.3.1.tar.gz#sha256=646d54457f11f3da5ebd6643b40eed1fafb0dbf0563587d016dc7f7065db4c86 (from https://pypi.org/simple/density-forest/), version: 0.3.1 Found link https://files.pythonhosted.org/packages/1d/69/708c8ef11b78c243ebef89b908bb2e254d41a92de90d86a1d470068752ac/density_forest-0.4-py3-none-any.whl#sha256=975fd53efac567763385865e826655df58b72199967c9e76d23cb58c4d1daee4 (from https://pypi.org/simple/density-forest/), version: 0.4 Found link https://files.pythonhosted.org/packages/1a/17/f618ddcba0d5caa7f7a3951c3e294cff63ff79bd3ac0618d2b3f89a57687/density_forest-0.4.1-py3-none-any.whl#sha256=786c5e552595c31472cf600d124da85d865e3b552a5bca1a200674a9557be053 (from https://pypi.org/simple/density-forest/), version: 0.4.1 Found link https://files.pythonhosted.org/packages/5b/fd/d0c6eb31b0ae1479a4822e6b3e97c0f3e7466e1393456f8076a2ab0ee5d8/density_forest-0.4.1.tar.gz#sha256=f1b65c28ba089ef72c87b79c1eb655008804f20676c21424e2066fcaba802eb3 (from https://pypi.org/simple/density-forest/), version: 0.4.1 Found link https://files.pythonhosted.org/packages/12/ed/00593cc4c1f3328bcde56d7221142832bf3402e0edffbe831a5ff71fb59c/density_forest-0.4.2-py3-none-any.whl#sha256=9e084ab51edce8ce6b4d2124a0a07e9c9da0e89db8a57bfe15340e6159b16c87 (from https://pypi.org/simple/density-forest/), version: 0.4.2 Found link https://files.pythonhosted.org/packages/6a/f0/494777bac5b2ba74a8cf8f5c9706856da409096388ac42d6c1b531db518c/density_forest-0.4.2.tar.gz#sha256=4bc6694df243d3a1ecd847a625c060309dd6f007c4acadf2386be293b51e663a (from https://pypi.org/simple/density-forest/), version: 0.4.2 Found link https://files.pythonhosted.org/packages/54/36/7db51c19c46cffee5f112f394fc6259dea58da42c63fa704d37c6cd5c8e8/density_forest-0.5.tar.gz#sha256=d2bc7c5a416d9973e8537900fa5ae4a0d60b8250168ac59dd6eed22fca80a4d2 (from https://pypi.org/simple/density-forest/), version: 0.5 Using version 0.5 (newest of versions: 0.5) Created temporary directory: /tmp/pip-unpack-jfmbnm0w Downloading https://files.pythonhosted.org/packages/54/36/7db51c19c46cffee5f112f394fc6259dea58da42c63fa704d37c6cd5c8e8/density_forest-0.5.tar.gz Downloading from URL https://files.pythonhosted.org/packages/54/36/7db51c19c46cffee5f112f394fc6259dea58da42c63fa704d37c6cd5c8e8/density_forest-0.5.tar.gz#sha256=d2bc7c5a416d9973e8537900fa5ae4a0d60b8250168ac59dd6eed22fca80a4d2 (from https://pypi.org/simple/density-forest/) Added density_forest==0.5 from https://files.pythonhosted.org/packages/54/36/7db51c19c46cffee5f112f394fc6259dea58da42c63fa704d37c6cd5c8e8/density_forest-0.5.tar.gz#sha256=d2bc7c5a416d9973e8537900fa5ae4a0d60b8250168ac59dd6eed22fca80a4d2 to build tracker '/tmp/pip-req-tracker-g37mtvg9' Running setup.py (path:/tmp/pip-wheel-3ukhn142/density-forest/setup.py) egg_info for package density-forest Running command python setup.py egg_info # Density Forest This library was developed within an EPFL Master Project, Spring Semester 2018. GitHub repository: https://github.com/CyrilWendl/SIE-Master ## 📖 Usage of the `DensityForest` class: #### Fitting a Density Forest Suppose you have your training data `X_train` and test data `X_test`, in `[N, D]` with `N` data points in `D` dimensions: ```python from density_forest.density_forest import DensityForest clf_df = DensityForest(**params) # create new class instance, put hyperparameters here clf_df.fit(X_train) # fit to a training set conf = clf_df.predict(X_test) # get confidence values for test set ``` Hyperparameters are documented in the docstring. To find the optimal hyperparameters, consider the section below. #### Finding Hyperparameters To find the optimal hyperparameters, use the `ParameterSearch` from `helpers.cross_validator`, which allows CV, and hyperparameter search. ```python from helpers.cross_validator import ParameterSearch # define hyperparameters to test tuned_params = [{'max_depth':[2, 3, 4], 'n_trees': [10, 20]}] # optionally add non-default arguments as single-element arrays default_params = [{'verbose':0, ...}] # other default parameters # do parameter search ps = ParameterSearch(DensityForest, tuned_parameters, X_train, X_train_all, y_true_tr, f_scorer, n_iter=2, verbosity=0, n_jobs=1, default_params=default_params) ps.fit() # get model with the best parameters, as above clf_df = DensityForest(**ps.best_params, **default_params) # create new class instance with best hyperparameters ... # continue as above ``` Check the docstrings for more detailed documentation af the `ParameterSearch` class. ## 🗂 File Structure ### 👾 Code All libraries for density forests, helper libraries for semantic segmentation and for baselines. #### `density_forest/` Package for implementation of Decision Trees, Random Forests, Density Trees and Density Forests - `create_data.py`: functions for generating labelled and unlabelled data - `decision_tree.py`: data structure for decision tree nodes - `decision_tree_create.py`: functions for generating decision trees - `decision_tree_traverse.py`: functions for traversing a decision tree and predicting labels - `density_forest.py`: functions for creating density forests - `density_tree.py`: data struture for density tree nodes - `density_tree_create.py`: functions for generating a density tree - `density_tree_traverse.py`: functions for descending a density tree and retrieving its cluster parameters - `helper.py`: various helper functions - `random_forests.py`: functions for creating random forests #### `helpers/`: General helpers library for semantic segmentation - `data_augment.py`: custom data augmentation methods applied to both the image and the ground truth - `data_loader.py`: PyTorch data loader for Zurich dataset - `helpers.py`: functions for importing, cropping, padding images and other related image tranformations - `parameter_search.py`: functions for finding optimal hyperparameters for Density Forest, OC-SVM and GMM (explained above) - `plots.py`: Generic plotter functions for labelled and unlabelled 2D and 3D plots, used for t-SNE and PCA plots #### `baselines/`: Helper functions for confidence estimation baselines MSR, margin, entropy and MC-Dropout #### `keras_helpers/` Helper functions for Keras - `helpers.py`: get activations - `callbacks.py`: callbacks to be evaluated after each epoch - `unet.py`: UNET model for training of network on Zurich dataset ### 🗾 Visualizations #### `density_forest/`: Visualizations of basic decision tree and density tree - `Decision Forest.ipynb`: Decision Trees and Random Forest on randomly generated labelled data - `Density Forest.ipynb`: Density Trees on randomly generated unlabelled data ## 🎓 Supervisors: - Prof. Devis Tuia, University of Wageningen - Diego Marcos González, University of Wageningen - Prof. François Golay, EPFL Cyril Wendl, 2018 running egg_info creating pip-egg-info/density_forest.egg-info writing requirements to pip-egg-info/density_forest.egg-info/requires.txt writing top-level names to pip-egg-info/density_forest.egg-info/top_level.txt writing pip-egg-info/density_forest.egg-info/PKG-INFO writing dependency_links to pip-egg-info/density_forest.egg-info/dependency_links.txt writing manifest file 'pip-egg-info/density_forest.egg-info/SOURCES.txt' reading manifest file 'pip-egg-info/density_forest.egg-info/SOURCES.txt' writing manifest file 'pip-egg-info/density_forest.egg-info/SOURCES.txt' Source in /tmp/pip-wheel-3ukhn142/density-forest has version 0.5, which satisfies requirement density_forest==0.5 from https://files.pythonhosted.org/packages/54/36/7db51c19c46cffee5f112f394fc6259dea58da42c63fa704d37c6cd5c8e8/density_forest-0.5.tar.gz#sha256=d2bc7c5a416d9973e8537900fa5ae4a0d60b8250168ac59dd6eed22fca80a4d2 Removed density_forest==0.5 from https://files.pythonhosted.org/packages/54/36/7db51c19c46cffee5f112f394fc6259dea58da42c63fa704d37c6cd5c8e8/density_forest-0.5.tar.gz#sha256=d2bc7c5a416d9973e8537900fa5ae4a0d60b8250168ac59dd6eed22fca80a4d2 from build tracker '/tmp/pip-req-tracker-g37mtvg9' Building wheels for collected packages: density-forest Created temporary directory: /tmp/pip-wheel-a_v717x2 Running setup.py bdist_wheel for density-forest: started Destination directory: /tmp/pip-wheel-a_v717x2 Running command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-wheel-3ukhn142/density-forest/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-a_v717x2 # Density Forest This library was developed within an EPFL Master Project, Spring Semester 2018. GitHub repository: https://github.com/CyrilWendl/SIE-Master ## 📖 Usage of the `DensityForest` class: #### Fitting a Density Forest Suppose you have your training data `X_train` and test data `X_test`, in `[N, D]` with `N` data points in `D` dimensions: ```python from density_forest.density_forest import DensityForest clf_df = DensityForest(**params) # create new class instance, put hyperparameters here clf_df.fit(X_train) # fit to a training set conf = clf_df.predict(X_test) # get confidence values for test set ``` Hyperparameters are documented in the docstring. To find the optimal hyperparameters, consider the section below. #### Finding Hyperparameters To find the optimal hyperparameters, use the `ParameterSearch` from `helpers.cross_validator`, which allows CV, and hyperparameter search. ```python from helpers.cross_validator import ParameterSearch # define hyperparameters to test tuned_params = [{'max_depth':[2, 3, 4], 'n_trees': [10, 20]}] # optionally add non-default arguments as single-element arrays default_params = [{'verbose':0, ...}] # other default parameters # do parameter search ps = ParameterSearch(DensityForest, tuned_parameters, X_train, X_train_all, y_true_tr, f_scorer, n_iter=2, verbosity=0, n_jobs=1, default_params=default_params) ps.fit() # get model with the best parameters, as above clf_df = DensityForest(**ps.best_params, **default_params) # create new class instance with best hyperparameters ... # continue as above ``` Check the docstrings for more detailed documentation af the `ParameterSearch` class. ## 🗂 File Structure ### 👾 Code All libraries for density forests, helper libraries for semantic segmentation and for baselines. #### `density_forest/` Package for implementation of Decision Trees, Random Forests, Density Trees and Density Forests - `create_data.py`: functions for generating labelled and unlabelled data - `decision_tree.py`: data structure for decision tree nodes - `decision_tree_create.py`: functions for generating decision trees - `decision_tree_traverse.py`: functions for traversing a decision tree and predicting labels - `density_forest.py`: functions for creating density forests - `density_tree.py`: data struture for density tree nodes - `density_tree_create.py`: functions for generating a density tree - `density_tree_traverse.py`: functions for descending a density tree and retrieving its cluster parameters - `helper.py`: various helper functions - `random_forests.py`: functions for creating random forests #### `helpers/`: General helpers library for semantic segmentation - `data_augment.py`: custom data augmentation methods applied to both the image and the ground truth - `data_loader.py`: PyTorch data loader for Zurich dataset - `helpers.py`: functions for importing, cropping, padding images and other related image tranformations - `parameter_search.py`: functions for finding optimal hyperparameters for Density Forest, OC-SVM and GMM (explained above) - `plots.py`: Generic plotter functions for labelled and unlabelled 2D and 3D plots, used for t-SNE and PCA plots #### `baselines/`: Helper functions for confidence estimation baselines MSR, margin, entropy and MC-Dropout #### `keras_helpers/` Helper functions for Keras - `helpers.py`: get activations - `callbacks.py`: callbacks to be evaluated after each epoch - `unet.py`: UNET model for training of network on Zurich dataset ### 🗾 Visualizations #### `density_forest/`: Visualizations of basic decision tree and density tree - `Decision Forest.ipynb`: Decision Trees and Random Forest on randomly generated labelled data - `Density Forest.ipynb`: Density Trees on randomly generated unlabelled data ## 🎓 Supervisors: - Prof. Devis Tuia, University of Wageningen - Diego Marcos González, University of Wageningen - Prof. François Golay, EPFL Cyril Wendl, 2018 running bdist_wheel running build running build_py creating build creating build/lib creating build/lib/density_forest copying density_forest/density_forest.py -> build/lib/density_forest copying density_forest/decision_tree.py -> build/lib/density_forest copying density_forest/density_tree_create.py -> build/lib/density_forest copying density_forest/random_forest.py -> build/lib/density_forest copying density_forest/decision_tree_traverse.py -> build/lib/density_forest copying density_forest/density_tree.py -> build/lib/density_forest copying density_forest/__init__.py -> build/lib/density_forest copying density_forest/density_tree_traverse.py -> build/lib/density_forest copying density_forest/helpers.py -> build/lib/density_forest copying density_forest/decision_tree_create.py -> build/lib/density_forest creating build/lib/baselines copying baselines/plots.py -> build/lib/baselines copying baselines/__init__.py -> build/lib/baselines copying baselines/helpers.py -> build/lib/baselines creating build/lib/helpers copying helpers/create_data.py -> build/lib/helpers copying helpers/data_loader.py -> build/lib/helpers copying helpers/plots.py -> build/lib/helpers copying helpers/parameter_search.py -> build/lib/helpers copying helpers/__init__.py -> build/lib/helpers copying helpers/helpers.py -> build/lib/helpers copying helpers/data_augment.py -> build/lib/helpers creating build/lib/keras_helpers copying keras_helpers/unet.py -> build/lib/keras_helpers copying keras_helpers/callbacks.py -> build/lib/keras_helpers copying keras_helpers/__init__.py -> build/lib/keras_helpers installing to build/bdist.linux-armv7l/wheel running install running install_lib creating build/bdist.linux-armv7l creating build/bdist.linux-armv7l/wheel creating build/bdist.linux-armv7l/wheel/keras_helpers copying build/lib/keras_helpers/unet.py -> build/bdist.linux-armv7l/wheel/keras_helpers copying build/lib/keras_helpers/callbacks.py -> build/bdist.linux-armv7l/wheel/keras_helpers copying build/lib/keras_helpers/__init__.py -> build/bdist.linux-armv7l/wheel/keras_helpers creating build/bdist.linux-armv7l/wheel/density_forest copying build/lib/density_forest/density_forest.py -> build/bdist.linux-armv7l/wheel/density_forest copying build/lib/density_forest/decision_tree.py -> build/bdist.linux-armv7l/wheel/density_forest copying build/lib/density_forest/density_tree_create.py -> build/bdist.linux-armv7l/wheel/density_forest copying build/lib/density_forest/random_forest.py -> build/bdist.linux-armv7l/wheel/density_forest copying build/lib/density_forest/decision_tree_traverse.py -> build/bdist.linux-armv7l/wheel/density_forest copying build/lib/density_forest/density_tree.py -> build/bdist.linux-armv7l/wheel/density_forest copying build/lib/density_forest/__init__.py -> build/bdist.linux-armv7l/wheel/density_forest copying build/lib/density_forest/density_tree_traverse.py -> build/bdist.linux-armv7l/wheel/density_forest copying build/lib/density_forest/helpers.py -> build/bdist.linux-armv7l/wheel/density_forest copying build/lib/density_forest/decision_tree_create.py -> build/bdist.linux-armv7l/wheel/density_forest creating build/bdist.linux-armv7l/wheel/baselines copying build/lib/baselines/plots.py -> build/bdist.linux-armv7l/wheel/baselines copying build/lib/baselines/__init__.py -> build/bdist.linux-armv7l/wheel/baselines copying build/lib/baselines/helpers.py -> build/bdist.linux-armv7l/wheel/baselines creating build/bdist.linux-armv7l/wheel/helpers copying build/lib/helpers/create_data.py -> build/bdist.linux-armv7l/wheel/helpers copying build/lib/helpers/data_loader.py -> build/bdist.linux-armv7l/wheel/helpers copying build/lib/helpers/plots.py -> build/bdist.linux-armv7l/wheel/helpers copying build/lib/helpers/parameter_search.py -> build/bdist.linux-armv7l/wheel/helpers copying build/lib/helpers/__init__.py -> build/bdist.linux-armv7l/wheel/helpers copying build/lib/helpers/helpers.py -> build/bdist.linux-armv7l/wheel/helpers copying build/lib/helpers/data_augment.py -> build/bdist.linux-armv7l/wheel/helpers running install_egg_info running egg_info writing dependency_links to density_forest.egg-info/dependency_links.txt writing top-level names to density_forest.egg-info/top_level.txt writing requirements to density_forest.egg-info/requires.txt writing density_forest.egg-info/PKG-INFO reading manifest file 'density_forest.egg-info/SOURCES.txt' writing manifest file 'density_forest.egg-info/SOURCES.txt' Copying density_forest.egg-info to build/bdist.linux-armv7l/wheel/density_forest-0.5-py3.4.egg-info running install_scripts creating build/bdist.linux-armv7l/wheel/density_forest-0.5.dist-info/WHEEL creating '/tmp/pip-wheel-a_v717x2/density_forest-0.5-py3-none-any.whl' and adding '.' to it adding 'baselines/__init__.py' adding 'baselines/helpers.py' adding 'baselines/plots.py' adding 'density_forest/__init__.py' adding 'density_forest/decision_tree.py' adding 'density_forest/decision_tree_create.py' adding 'density_forest/decision_tree_traverse.py' adding 'density_forest/density_forest.py' adding 'density_forest/density_tree.py' adding 'density_forest/density_tree_create.py' adding 'density_forest/density_tree_traverse.py' adding 'density_forest/helpers.py' adding 'density_forest/random_forest.py' adding 'helpers/__init__.py' adding 'helpers/create_data.py' adding 'helpers/data_augment.py' adding 'helpers/data_loader.py' adding 'helpers/helpers.py' adding 'helpers/parameter_search.py' adding 'helpers/plots.py' adding 'keras_helpers/__init__.py' adding 'keras_helpers/callbacks.py' adding 'keras_helpers/unet.py' adding 'density_forest-0.5.dist-info/top_level.txt' adding 'density_forest-0.5.dist-info/WHEEL' adding 'density_forest-0.5.dist-info/METADATA' adding 'density_forest-0.5.dist-info/RECORD' removing build/bdist.linux-armv7l/wheel Running setup.py bdist_wheel for density-forest: finished with status 'done' Stored in directory: /tmp/tmp405ew_o9 Successfully built density-forest Cleaning up... Removing source in /tmp/pip-wheel-3ukhn142/density-forest Removed build tracker '/tmp/pip-req-tracker-g37mtvg9'