From 6d4b63e87bfba7b4b085b8f9c7f9f554fb8bc6d5 Mon Sep 17 00:00:00 2001 From: YuAng Date: Wed, 16 Jun 2021 19:38:31 +0800 Subject: [PATCH] Fix indentation error. --- .gitignore | 1 + src/loftr/utils/coarse_matching.py | 1 + src/utils/dataset.py | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ceffb3d..3662ff6 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ tools/draw_QccDayNights.py scripts/slurm/ scripts/sbatch_submit.sh +src/utils/client.py diff --git a/src/loftr/utils/coarse_matching.py b/src/loftr/utils/coarse_matching.py index fc0fc4a..a972633 100644 --- a/src/loftr/utils/coarse_matching.py +++ b/src/loftr/utils/coarse_matching.py @@ -197,6 +197,7 @@ class CoarseMatching(nn.Module): # 4. Random sampling of training samples for fine-level LoFTR # (optional) pad samples with gt coarse-level matches + if self.training: # NOTE: # The sampling is performed across all pairs in a batch without manually balancing # #samples for fine-level increases w.r.t. batch_size diff --git a/src/utils/dataset.py b/src/utils/dataset.py index 247a2cd..cd33a11 100644 --- a/src/utils/dataset.py +++ b/src/utils/dataset.py @@ -8,7 +8,11 @@ import torch from numpy.linalg import inv -MEGADEPTH_CLIENT = SCANNET_CLIENT = None +try: + # for internel use only + from .client import MEGADEPTH_CLIENT, SCANNET_CLIENT +except Exception: + MEGADEPTH_CLIENT = SCANNET_CLIENT = None # --- DATA IO ---