diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..9d06735 --- /dev/null +++ b/readme.md @@ -0,0 +1,15 @@ +# Orthographic Feature Transform for Monocular 3D Object Detection + +This is a PyTorch implementation of the OFTNet network from the paper [Orthographic Feature Transform for Monocular 3D Object Detection](https://arxiv.org/abs/1811.08188). The code currently supports training the network from scratch on the KITTI dataset - intermediate results can be visualised using Tensorboard. The current version of the code is intended primarily as a reference, and for now does not support decoding the network outputs into bounding boxes via non-maximum suppression. This will be added in a future update. Note also that there are some slight implementation differences from the original code used in the paper. Please see `train.py` for details of training options. + + +## Citation +If you find this work useful please cite the paper using the citation below. +``` +@article{roddick2018orthographic, + title={Orthographic feature transform for monocular 3d object detection}, + author={Roddick, Thomas and Kendall, Alex and Cipolla, Roberto}, + journal={British Machine Vision Conference}, + year={2019} +} +``` \ No newline at end of file diff --git a/train.py b/train.py index e9f309b..3dbb2a8 100644 --- a/train.py +++ b/train.py @@ -150,12 +150,7 @@ def compute_loss(pred_encoded, gt_encoded, loss_weights=[1., 1., 1., 1.]): score_weight, pos_weight, dim_weight, ang_weight = loss_weights # Compute losses - # score_loss = hard_neg_mining_loss(score, labels) - # score_loss = huber_loss(score, labels.float()) score_loss = oft.model.loss.balanced_cross_entropy_loss(score, labels) - # # score_loss = oft.model.loss.heatmap_loss(score, labels, pos_weight=100) - # score_loss = oft.model.loss.uncertainty_loss(score, sqr_dists) - # # score_loss = oft.model.loss.log_ap_loss(score, sqr_dists) pos_loss = huber_loss(pos_offsets, gt_pos_offsets, labels.unsqueeze(2)) dim_loss = huber_loss(dim_offsets, gt_dim_offsets, labels.unsqueeze(2))