{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import sys\n", "import os\n", "import torch\n", "import matplotlib.pyplot as plt\n", "import torchvision.transforms.functional as trans_f\n", "\n", "sys.path.append(os.path.abspath(sys.path[0] + '/../../'))\n", "__package__ = \"deep_view_syn.notebook\"\n", "\n", "from ..my import util\n", "\n", "path_patts = [\n", " '/home/dengnc/deep_view_syn/data/gas_fovea_2020.12.31/upsampling_test/gt/view_%04d.png',\n", " '/home/dengnc/deep_view_syn/data/gas_fovea_2020.12.31/fovea_rgb@msl-rgb_e10_fc256x4_d1-50_s16/output/model-epoch_500/train/out_view_%04d.png',\n", " '/home/dengnc/deep_view_syn/data/gas_fovea_2020.12.31/upsampling_test/input/out_view_%04d.png',\n", " '/home/dengnc/deep_view_syn/data/gas_fovea_2020.12.31/upsampling_test/output/view_%04d.png'\n", "]\n", "titles = [ 'Ground truth', 'Normal', 'Low Res', 'Upsampling']\n", "show_range = range(5)\n", "\n", "#os.chdir('/home/dengnc/deep_view_syn/data/')\n", "image_seqs = [\n", " util.ReadImageTensor([path_patt % i for i in show_range])\n", " for path_patt in path_patts\n", "]\n", "\n", "for i in show_range:\n", " plt.figure(facecolor='white', figsize=(12, 4))\n", " plt.suptitle('View %d' % i)\n", " for j in range(len(image_seqs)):\n", " plt.subplot(1, len(image_seqs), j + 1)\n", " plt.title(titles[j])\n", " util.PlotImageTensor(image_seqs[j][i])\n", " \n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "name": "python3" }, "language_info": { "name": "python", "nbconvert_exporter": "python", "version": "3.7.9-final" }, "orig_nbformat": 2 }, "nbformat": 4, "nbformat_minor": 2 }