Skip to content

Commit

Permalink
add content
Browse files Browse the repository at this point in the history
  • Loading branch information
MaverickPeter committed Dec 2, 2020
1 parent d13f2ae commit 5162799
Show file tree
Hide file tree
Showing 21 changed files with 3,526 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.ckpt

26 changes: 26 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 2.8.3)
project(disco_ros)

find_package(catkin REQUIRED COMPONENTS roscpp rospy message_generation std_msgs geometry_msgs sensor_msgs)

add_message_files(
FILES
DiSCO.msg
)

#catkin_python_setup()

generate_messages(
DEPENDENCIES
std_msgs
sensor_msgs
geometry_msgs
)

catkin_package(

CATKIN_DEPENDS message_runtime
)

#install(PROGRAMS detect
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
# DiSCO-pytorch
# DiSCO-Pytorch
Differentiable Scan Context with Orientation

### Pre-Requisites
* PyTorch 1.4.0
* tensorboardX

### Train
```
python train_DiSCO.py --dataset_folder $DATASET_FOLDER
```

### Evaluate
```
python evaluate.py --dataset_folder $DATASET_FOLDER
```

### Infer
```
python inference.py
```

Take a look at train_DiSCO.py and evaluate.py for more parameters
57 changes: 57 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# GLOBAL
NUM_POINTS = 4096
FEATURE_OUTPUT_DIM = 256
RESULTS_FOLDER = "results/"
OUTPUT_FILE = "results/results.txt"

LOG_DIR = 'log2/'
MODEL_FILENAME = "model.ckpt"

DATASET_FOLDER = '../data1/xxc/benchmark_datasets/'

# TRAIN
BATCH_NUM_QUERIES = 1
TRAIN_POSITIVES_PER_QUERY = 2
TRAIN_NEGATIVES_PER_QUERY = 4
DECAY_STEP = 200000
DECAY_RATE = 0.7
BASE_LEARNING_RATE = 0.0005
MOMENTUM = 0.9
OPTIMIZER = 'ADAM'
MAX_EPOCH = 20

MARGIN_1 = 0.5
MARGIN_2 = 0.2

BN_INIT_DECAY = 0.5
BN_DECAY_DECAY_RATE = 0.5
BN_DECAY_CLIP = 0.99

RESUME = False

TRAIN_FILE = 'generating_queries/training_queries_baseline.pickle'
TEST_FILE = 'generating_queries/test_queries_baseline.pickle'

# LOSS
LOSS_FUNCTION = 'quadruplet'
LOSS_LAZY = True
TRIPLET_USE_BEST_POSITIVES = False
LOSS_IGNORE_ZERO_BATCH = False

# EVAL6
EVAL_BATCH_SIZE = 1
EVAL_POSITIVES_PER_QUERY = 2
EVAL_NEGATIVES_PER_QUERY = 4

EVAL_DATABASE_FILE = '/home/xxc/data1/xxc/NCLT_kit/nclt_generating_queries/nclt_evaluation_database_sc_density.pickle'
EVAL_QUERY_FILE = '/home/xxc/data1/xxc/NCLT_kit/nclt_generating_queries/nclt_evaluation_query_sc_density.pickle'


def cfg_str():
out_string = ""
for name in globals():
if not name.startswith("__") and not name.__contains__("cfg_str"):
#print(name, "=", globals()[name])
out_string = out_string + "cfg." + name + \
"=" + str(globals()[name]) + "\n"
return out_string
Loading

0 comments on commit 5162799

Please sign in to comment.