Commit 7dc54821 authored by Yuxin Wu's avatar Yuxin Wu

Fix visualization (fix #530)

parent 6d5ba6a9
......@@ -54,7 +54,7 @@ FASTRCNN_FG_RATIO = 0.25
# testing -----------------------
TEST_PRE_NMS_TOPK = 6000
TEST_POST_NMS_TOPK = 1000
TEST_POST_NMS_TOPK = 1000 # if you encounter OOM in inference, set this to a smaller number
FASTRCNN_NMS_THRESH = 0.5
RESULT_SCORE_THRESH = 0.05
RESULTS_PER_IM = 100
......@@ -262,7 +262,9 @@ def visualize(model_path, nr_visualize=50, output_dir='output'):
# draw the scores for the above proposals
score_viz = draw_predictions(img, rpn_boxes[good_proposals_ind], all_probs[good_proposals_ind])
results = [DetectionResult(*args) for args in zip(final_labels, final_boxes, final_probs)]
results = [DetectionResult(*args) for args in
zip(final_boxes, final_probs, final_labels,
[None] * len(final_labels))]
final_viz = draw_final_outputs(img, results)
viz = tpviz.stack_patches([
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment