diff --git a/README.md b/README.md index 0c9a6c0..ecc8fbc 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Paper "Neighborhood-aware Geometric Encoding Network for Point Cloud Registratio ``` # Compile - cd NgeNet/cpp_wrappers + cd GCNet/cpp_wrappers sh compile_wrappers.sh ``` @@ -81,7 +81,7 @@ Unzip it, then we should get the following directories structure: # exp_dir: your_saved_path for checkpoints and summary. # root: your_data_path for the 3dMatch dataset. -cd NgeNet +cd GCNet python train.py configs/threedmatch.yaml # note: The code `torch.cuda.empty_cache()` in `train.py` has some impact on the training speed. @@ -91,7 +91,7 @@ python train.py configs/threedmatch.yaml ### 1.3 evaluate and visualize ``` -cd NgeNet +cd GCNet python eval_3dmatch.py --benchmark 3DMatch --data_root your_path/indoor --checkpoint your_path/3dmatch.pth --saved_path work_dirs/3dmatch [--vis] [--no_cuda] @@ -123,14 +123,14 @@ Download odometry kitti [here](http://www.cvlibs.net/datasets/kitti/eval_odometr # exp_dir: your_saved_path for checkpoints and summary. # root: your_data_path for the Odometry KITTI. -cd NgeNet +cd GCNet python train.py configs/kitti.yaml ``` ### 2.3 evaluate and visualize ``` -cd NgeNet +cd GCNet python eval_kitti.py --data_root your_path/kitti --checkpoint your_path/kitti.pth [--vis] [--no_cuda] ``` diff --git a/demo.py b/demo.py index 0edc97e..3f3badb 100644 --- a/demo.py +++ b/demo.py @@ -8,7 +8,7 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__))) from data import collate_fn -from models import architectures, NgeNet, vote +from models import architectures, GCNet, vote from utils import decode_config, npy2pcd, pcd2npy, execute_global_registration, \ npy2feat, setup_seed, get_blue, get_yellow, voxel_ds, normal, \ read_cloud, vis_plys @@ -16,7 +16,7 @@ CUR = os.path.dirname(os.path.abspath(__file__)) -class NgeNet_pipeline(): +class GCNet_pipeline(): def __init__(self, ckpt_path, voxel_size, vote_flag, cuda=True): self.voxel_size_3dmatch = 0.025 self.voxel_size = voxel_size @@ -25,7 +25,7 @@ def __init__(self, ckpt_path, voxel_size, vote_flag, cuda=True): self.vote_flag = vote_flag config = self.prepare_config() self.neighborhood_limits = [38, 36, 35, 38] - model = NgeNet(config) + model = GCNet(config) if self.cuda: model = model.cuda() model.load_state_dict(torch.load(ckpt_path)) @@ -178,7 +178,7 @@ def pipeline(self, source, target, npts=20000): # loading model cuda = not args.no_cuda vote_flag = not args.no_vote - model = NgeNet_pipeline( + model = GCNet_pipeline( ckpt_path=args.checkpoint, voxel_size=args.voxel_size, vote_flag=vote_flag, diff --git a/eval_3dmatch.py b/eval_3dmatch.py index 5844035..6525d72 100644 --- a/eval_3dmatch.py +++ b/eval_3dmatch.py @@ -10,7 +10,7 @@ from tqdm import tqdm from data import ThreeDMatch, get_dataloader -from models import architectures, NgeNet, vote +from models import architectures, GCNet, vote from utils import decode_config, npy2pcd, pcd2npy, execute_global_registration, \ npy2feat, vis_plys, setup_seed, fmat, to_tensor, get_blue, \ get_yellow @@ -93,7 +93,7 @@ def main(args): shuffle=False, neighborhood_limits=None) - model = NgeNet(config) + model = GCNet(config) use_cuda = not args.no_cuda if use_cuda: model = model.cuda() diff --git a/eval_kitti.py b/eval_kitti.py index c99d663..a65e9d9 100644 --- a/eval_kitti.py +++ b/eval_kitti.py @@ -10,7 +10,7 @@ from tqdm import tqdm from data import Kitti, get_dataloader -from models import architectures, NgeNet, vote +from models import architectures, GCNet, vote from utils import decode_config, npy2pcd, pcd2npy, execute_global_registration, \ npy2feat, vis_plys, setup_seed, fmat, to_tensor, get_blue, get_yellow from metrics import Error_R, Error_t @@ -39,7 +39,7 @@ def main(args): neighborhood_limits=None) print(neighborhood_limits) - model = NgeNet(config) + model = GCNet(config) use_cuda = not args.no_cuda if use_cuda: model = model.cuda() diff --git a/eval_mvp_rg.py b/eval_mvp_rg.py index c05f576..d0b63da 100644 --- a/eval_mvp_rg.py +++ b/eval_mvp_rg.py @@ -10,7 +10,7 @@ from tqdm import tqdm from data import MVP_RG, get_dataloader -from models import architectures, NgeNet, vote +from models import architectures, GCNet, vote from utils import decode_config, npy2pcd, pcd2npy, execute_global_registration, \ npy2feat, vis_plys, setup_seed, fmat, to_tensor, get_blue, get_yellow from metrics import Error_R, Error_t, RMSE @@ -38,7 +38,7 @@ def main(args): neighborhood_limits=None) print(neighborhood_limits) - model = NgeNet(config) + model = GCNet(config) use_cuda = not args.no_cuda if use_cuda: model = model.cuda() diff --git a/misc/plot_fmr.py b/misc/plot_fmr.py index 879db34..8f343c2 100644 --- a/misc/plot_fmr.py +++ b/misc/plot_fmr.py @@ -125,7 +125,7 @@ plt.plot(x, dsn_, color='lightseagreen', linewidth=3, label='3DSN', linestyle=linestyle_tuple[4][-1]) plt.plot(x, ppffold_, color='royalblue', linewidth=3, label='PPF-FoldNet', linestyle=linestyle_tuple[5][-1]) plt.plot(x, cofinet_, color='tomato', linewidth=3, label='CoFiNet', linestyle='dashdot') -plt.plot(x, ngenet_, color='magenta', linewidth=3, label='NgeNet', linestyle='solid') +plt.plot(x, ngenet_, color='magenta', linewidth=3, label='GCNet', linestyle='solid') plt.vlines(0.05, 0, 100, colors="gray", linestyles="dashed") plt.xlim((0.01, 0.2)) plt.ylim((0, 100)) diff --git a/models/NgeNet.py b/models/GCNet.py similarity index 99% rename from models/NgeNet.py rename to models/GCNet.py index eaf0e34..a403602 100644 --- a/models/NgeNet.py +++ b/models/GCNet.py @@ -7,7 +7,7 @@ from models import InformationInteractive -class NgeNet(nn.Module): +class GCNet(nn.Module): def __init__(self, config): super().__init__() r = config.first_subsampling_dl * config.conv_radius @@ -218,4 +218,4 @@ def forward(self, inputs): batched_feats_l = batched_feats_l / torch.norm(batched_feats_l, dim=1, keepdim=True) batched_feats = torch.cat([batched_feats, overlap_scores, saliency_scores], dim=-1) - return batched_feats, batched_feats_m, batched_feats_l \ No newline at end of file + return batched_feats, batched_feats_m, batched_feats_l diff --git a/models/__init__.py b/models/__init__.py index 46f7810..c2761bf 100644 --- a/models/__init__.py +++ b/models/__init__.py @@ -1,4 +1,4 @@ from .architecures import architectures from .information_interactive import InformationInteractive from .vote import vote -from .NgeNet import NgeNet +from .GCNet import GCNet diff --git a/train.py b/train.py index 5c4d920..ca36745 100644 --- a/train.py +++ b/train.py @@ -8,7 +8,7 @@ from torch.utils.tensorboard import SummaryWriter from data import get_dataset, get_dataloader -from models import architectures, NgeNet +from models import architectures, GCNet from losses import Loss from utils import decode_config, setup_seed @@ -50,7 +50,7 @@ def main(): neighborhood_limits=neighborhood_limits) print(neighborhood_limits) - model = NgeNet(config).cuda() + model = GCNet(config).cuda() model_loss = Loss(config) if config.optimizer == 'SGD':