From eedd38563526acbfd7f39a73ca7f2c0e31bc0576 Mon Sep 17 00:00:00 2001 From: TimNiklasWitte Date: Wed, 30 Mar 2022 17:34:22 +0200 Subject: [PATCH] Expand readme --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 75fa450..f8f37e3 100644 --- a/README.md +++ b/README.md @@ -51,4 +51,19 @@ The loss plot is presented right from `(3)`. python3 live_recolor_plot.py ``` -### Pretrainied Model \ No newline at end of file +### Pretrainied Model + +The model was runned for 13 epochs and its weights are stored in `./saved_models`. +Note that, the grey images must have a shape of `(256,256,1)`. +The following code will load the model and colorized an image: + +```python3 +autoencoder = Autoencoder() +autoencoder.build((1, 256, 256, 1)) # need a batch size +autoencoder.load_weights("./saved_models/trainied_weights_epoch_12") +autoencoder.summary() + +grey_img = ... # grey_img.shape = (256,256,1) +grey_img = np.expand_dims(grey_img, axis=0) # add batch dim +colorized_img = autoencoder(grey_img) +```