From dcba584453486a4129a15804cf5880ab1b3401ed Mon Sep 17 00:00:00 2001 From: Nianchen Deng <dengnianchen@sjtu.edu.cn> Date: Tue, 4 May 2021 10:46:20 +0800 Subject: [PATCH] update run_spherical_view_syn.py --- notebook/gen_demo_mono.ipynb | 32 ++++++++++++-------------------- run_spherical_view_syn.py | 3 ++- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/notebook/gen_demo_mono.ipynb b/notebook/gen_demo_mono.ipynb index 15d8292..e1bde59 100644 --- a/notebook/gen_demo_mono.ipynb +++ b/notebook/gen_demo_mono.ipynb @@ -87,44 +87,35 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Change working directory to /home/dengnc/dvs/data/__new/lobby_all\n", - "Load net from fovea@snerffast4-rgb_e6_fc512x4_d2.00-50.00_s64_~p.pth ...\n", - "Load net from periph@snerffast4-rgb_e6_fc256x4_d2.00-50.00_s64_~p.pth ...\n" + "Change working directory to /home/dengnc/dvs/data/__new/barbershop_all\n", + "Load net from fovea@snerffast4-rgb_e6_fc512x4_d1.20-6.00_s64_~p.pth ...\n", + "Load net from periph@snerffast4-rgb_e6_fc256x4_d1.20-6.00_s64_~p.pth ...\n" ] } ], "source": [ - "scene = 'lobby'\n", + "scene = 'barbershop'\n", "os.chdir(f'{rootdir}/data/__new/{scenes[scene]}')\n", "print('Change working directory to ', os.getcwd())\n", "\n", "fovea_net = load_net(find_file('fovea'))\n", "periph_net = load_net(find_file('periph'))\n", "renderer = FoveatedNeuralRenderer(fov_list, res_list, nn.ModuleList([fovea_net, periph_net, periph_net]),\n", - " res_full, device=device.default())\n" + " res_full, using_mask=False, device=device.default())\n" ] }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/dengnc/miniconda3/lib/python3.8/site-packages/torch/nn/functional.py:3828: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details.\n", - " warnings.warn(\n" - ] - } - ], + "outputs": [], "source": [ "params = {\n", " 'classroom': [\n", @@ -137,9 +128,10 @@ " [0, 0, 0, 0, 10, 200, -50]\n", " ],\n", " 'barbershop': [\n", - " [0, 0, 0, 20, 0, -300, 50],\n", - " [0, 0, 0, -140, -30, 150, -250],\n", - " [0, 0, 0, -60, -30, 75, -125],\n", + " [0, 0, 0, 0, 0, 0, 0],\n", + " #[0, 0, 0, 20, 0, -300, 50],\n", + " #[0, 0, 0, -140, -30, 150, -250],\n", + " #[0, 0, 0, -60, -30, 75, -125],\n", " ],\n", " 'lobby': [\n", " #[0, 0, 0, 0, 0, 75, 0],\n", diff --git a/run_spherical_view_syn.py b/run_spherical_view_syn.py index 2b890b7..ab618ef 100644 --- a/run_spherical_view_syn.py +++ b/run_spherical_view_syn.py @@ -406,7 +406,8 @@ def test(): out[key][global_idx] = ret[key] if args.output_flags['perf']: perf_times[i] = perf.checkpoint() - progress_bar(i, n, 'Inferring...') + if not args.log_redirect: + progress_bar(i, n, 'Inferring...') i += 1 global_offset += n_rays -- GitLab