Skip to content

Commit

Permalink
Hardcode the number of line candidates during evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou13 committed Jul 24, 2019
1 parent 4c74116 commit 51e9378
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion lcnn/models/line_vectorizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ def sample_lines(self, meta, jmap, joff, do_evaluation):
jmap = non_maximum_suppression(jmap).reshape(n_type, -1)
joff = joff.reshape(n_type, 2, -1)
N = len(junc)
K = min(int(N * 2 + 2), M.n_dyn_junc // n_type)
if do_evaluation:
K = 440
else:
K = min(int(N * 2 + 2), M.n_dyn_junc // n_type)
device = jmap.device

# index: [N_TYPE, K]
Expand Down
4 changes: 2 additions & 2 deletions process.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python3
"""Process a dataset with the trained neural network
Usage:
train.py [options] <yaml-config> <checkpoint> <image-dir> <output-dir>
train.py (-h | --help )
process.py [options] <yaml-config> <checkpoint> <image-dir> <output-dir>
process.py (-h | --help )
Arguments:
<yaml-config> Path to the yaml hyper-parameter file
Expand Down

0 comments on commit 51e9378

Please sign in to comment.