Visualization
March 16, 2023 ยท View on GitHub
We provide all the visualization scripts under /path/to/MapTR/tools/maptr/
Visualize prediction
cd /path/to/MapTR/
export PYTHONPATH="/path/to/MapTR/"
python tools/maptr/vis_pred.py /path/to/experiment/config /path/to/experiment/ckpt
Notes:
- All the visualization samples will be saved in
/path/to/MapTR/work_dirs/experiment/vis_pred/automatically. If you want to customize the saving path, you can add--show-dir /customized_path. - The score threshold is set to 0.3 by default. For better visualization, you can adjust the threshold by adding
--score-thresh customized_thresh - The GT is visualized in fixed_num_pts format by default, we provide multiple formats to visualize GT at the same time by setting
--gt-format:se_ptsmeans the start and end points of GT,bboxmeans the bounding box envelops the GT,polyline_ptsmeans the original annotated GT (you can use Douglas-Peucker algorithm to simplify the redundant annotated points).
Merge them into video
We also provide the script to merge the input, output and GT into video to benchmark the performance qualitatively.
python tools/maptr/generate_video.py /path/to/visualization/directory
Notes:
- The video will be saved in
/path/to/MapTR/work_dirs/experiment/