Skip to content

Commit 1b4f399

Browse files
committed
download script and training
1 parent 6b315dc commit 1b4f399

File tree

6 files changed

+79
-20
lines changed

6 files changed

+79
-20
lines changed

README.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Fully Convolutional Geometric Features, ICCV, 2019
2+
3+
Extracting geometric features from 3D scans or point clouds is the first step in applications such as registration, reconstruction, and tracking. State-of-the-art methods require computing low-level features as input or extracting patch-based features with limited receptive field. In this work, we present fully-convolutional geometric features, computed in a single pass by a 3D fully-convolutional network. We also present new metric learning losses that dramatically improve performance. Fully-convolutional geometric features are compact, capture broad spatial context, and scale to large scenes. We experimentally validate our approach on both indoor and outdoor datasets. Fully-convolutional geometric features achieve state-of-the-art accuracy without requiring prepossessing, are compact (32 dimensions), and are 600 times faster than the most accurate prior method.
4+
5+
6+
## 3D Feature Accuracy vs. Speed
7+
8+
![Accuracy vs. Speed](images/fps_acc.png)
9+
*Feature-match recall and speed in log scale on the 3DMatch benchmark. Our approach is the most accurate and the fastest. The gray region shows the Pareto frontier of the prior methods.*
10+
11+
12+
## Installation & Dataset Download
13+
14+
15+
```
16+
./scripts/download_datasets.sh /path/to/dataset/download/dir
17+
```
18+
19+
Follow the instruction on [KITTI Odometry website](http://www.cvlibs.net/datasets/kitti/eval_odometry.php) to download the KITTI odometry training set.
20+
21+
22+
## Training
23+
24+
```
25+
python train.py --threed_match_dir /path/to/threedmatch/
26+
```

config.py

+4-9
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def str2bool(v):
1818
logging_arg.add_argument('--out_dir', type=str, default='outputs')
1919

2020
trainer_arg = add_argument_group('Trainer')
21-
trainer_arg.add_argument('--trainer', type=str, default='HardContrastiveLossTrainer')
21+
trainer_arg.add_argument('--trainer', type=str, default='HardestContrastiveLossTrainer')
2222
trainer_arg.add_argument('--save_freq_epoch', type=int, default=1)
2323
trainer_arg.add_argument('--batch_size', type=int, default=4)
2424
trainer_arg.add_argument('--val_batch_size', type=int, default=1)
@@ -64,9 +64,9 @@ def str2bool(v):
6464
# dNetwork specific configurations
6565
net_arg = add_argument_group('Network')
6666
net_arg.add_argument('--model', type=str, default='SimpleNetBN2C')
67-
net_arg.add_argument('--model_n_out', type=int, default=32, help='Feature dimension')
67+
net_arg.add_argument('--model_n_out', type=int, default=16, help='Feature dimension')
6868
net_arg.add_argument('--conv1_kernel_size', type=int, default=3)
69-
net_arg.add_argument('--normalize_feature', type=str2bool, default=False)
69+
net_arg.add_argument('--normalize_feature', type=str2bool, default=True)
7070
net_arg.add_argument('--dist_type', type=str, default='L2')
7171
net_arg.add_argument('--best_val_metric', type=str, default='feat_match_ratio')
7272

@@ -109,14 +109,9 @@ def str2bool(v):
109109
data_arg.add_argument('--dataset', type=str, default='ThreeDMatchPairDataset')
110110
data_arg.add_argument('--voxel_size', type=float, default=0.05)
111111
data_arg.add_argument(
112-
'--data_dir_25mm',
113-
type=str,
114-
default="/home/chrischoy/datasets/FCGF/dataset_full_25")
115-
data_arg.add_argument(
116-
'--data_dir_10mm', type=str, default="/home/chrischoy/datasets/FCGF/dataset_full")
112+
'--threed_match_dir', type=str, default="/home/chrischoy/datasets/FCGF/threedmatch")
117113
data_arg.add_argument(
118114
'--kitti_root', type=str, default="/home/chrischoy/datasets/FCGF/kitti/")
119-
data_arg.add_argument('--use_10mm', type=str2bool, default=False)
120115
data_arg.add_argument(
121116
'--kitti_max_time_diff',
122117
type=int,

config/kitti_problematic_gps.txt

-10
This file was deleted.

images/fps_acc.png

68.6 KB
Loading

lib/data_loaders.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def __init__(self,
147147
config=None):
148148
PairDataset.__init__(self, phase, transform, random_rotation, random_scale,
149149
manual_seed, config)
150-
self.root = root = config.data_dir_10mm if config.use_10mm else config.data_dir_25mm
150+
self.root = root = config.threed_match_dir
151151
logging.info(f"Loading the subset {phase} from {root}")
152152

153153
subset_names = open(self.DATA_FILES[phase]).read().split()

scripts/download_datasets.sh

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env bash
2+
3+
DATA_DIR=$1
4+
5+
function download() {
6+
TMP_PATH="$DATA_DIR/tmp"
7+
echo "#################################"
8+
echo "Data Root Dir: ${DATA_DIR}"
9+
echo "Download Path: ${TMP_PATH}"
10+
echo "#################################"
11+
urls=(
12+
'https://node1.chrischoy.org/data/datasets/threedmatch.tgz'
13+
)
14+
15+
if [ ! -d "$TMP_PATH" ]; then
16+
echo ">> Create temporary directory: ${TMP_PATH}"
17+
mkdir -p "$TMP_PATH"
18+
fi
19+
cd "$TMP_PATH"
20+
21+
echo ">> Start downloading"
22+
echo ${urls[@]} | xargs -n 1 -P 3 wget --no-check-certificate -q -c --show-progress $0
23+
24+
echo ">> Unpack .zip file"
25+
for filename in *.gz
26+
do
27+
tar -xvzf $filename -C ../
28+
done
29+
30+
echo ">> Clear tmp directory"
31+
cd ..
32+
rm -rf ./tmp
33+
34+
echo "#################################"
35+
echo "Done!"
36+
echo "#################################"
37+
}
38+
39+
function main() {
40+
echo $DATA_DIR
41+
if [ -z "$DATA_DIR" ]; then
42+
echo "DATA_DIR is required config!"
43+
else
44+
download
45+
fi
46+
}
47+
48+
main;

0 commit comments

Comments
 (0)