You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The critic-value is a probability that serves as a prediction about whether a tree trunk is present in the image. This VAE-model is trained on the minerl-images and corresponding critic-predictions and yields a decoder that can (to a certain degree) enhance or remove tree trunks in an image.
Setup:
1. Clone this repository.
2. Create a conda environment with the necessary packages:
5.4. Replace your PATH with MINERL_DATA_ROOT_PATH in vae_parameters.py.
How to run this model:
1. To train the model (results can be found in 'saved-networks/'), run:
python vae.py -train
2. To evaluate the model on the source-images (results can be found in 'images/'), run:
python vae.py
3. To create the mask-video shown above (results can be found in 'videos/'), run:
python vae.py -video
The original minerl-episode is minerl-episode/X.npy and the ground-truth masks are minerl-episode/Y.npy, which are np.arrays containing the 1200 episode images.
Apart from the video, additional information is saved in a bin_info.txt file that is created.
Other functions of the model:
1. To create a dataset of the reconstructions of the Critic-VAE, run:
python vae.py -dataset
The dataset is saved as recon-dataset.pickle and is quite large (~5GB).
This reconstruction-dataset was unsuccessful so far. To improve it, changes have to be made to the load_minerl_data() function in vae_utility.py.
2. To see the differences of the injected critic-values (results can be found in 'inject/'), run:
python vae.py -inject
3. To test out different thresholds for the thresholded-masks in the video, run:
python vae.py -video -thresh
The Intersection over Union (IoU) values of the masks will be printed in the terminal.
4. To train a second Critic-VAE on the reconstruction-dataset (recon-dataset.pickle), run:
python vae.py -second
To evaluate it (like above): python vae.py -evalsecond
The second Critic-VAE idea was unsuccessful so far as well. Code might be unstable but should be easily fixed with some small changes.
About
Variational Autoencoder that leverages the Critic-Model (linked below).