From a393cccf6ae95f7510371c1dafe42d403a2b1d24 Mon Sep 17 00:00:00 2001 From: Roman Shapovalov Date: Mon, 8 Aug 2022 04:43:21 -0700 Subject: [PATCH] Make multisequence evaluator use only cameras within a batch (fixes OOM in v2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: In a multisequence (fewview) scenario, it does not make sense to use all cameras for evaluating the difficulty as they come from different scenes. Using only this batch’s source (known) cameras instead. Reviewed By: bottler Differential Revision: D38491070 fbshipit-source-id: d6312d8fbb125b28a33db9f53d4215bcd1ca28a8 --- pytorch3d/implicitron/evaluation/evaluator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pytorch3d/implicitron/evaluation/evaluator.py b/pytorch3d/implicitron/evaluation/evaluator.py index c9ca239b..0fd51554 100644 --- a/pytorch3d/implicitron/evaluation/evaluator.py +++ b/pytorch3d/implicitron/evaluation/evaluator.py @@ -115,7 +115,9 @@ class ImplicitronEvaluator(EvaluatorBase): implicitron_render, bg_color="black", lpips_model=lpips_model, - source_cameras=all_train_cameras, + source_cameras=( # None will make it use batch’s known cameras + None if self.is_multisequence else all_train_cameras + ), ) )