diff --git a/README.md b/README.md index 6c409b7..86b590d 100644 --- a/README.md +++ b/README.md @@ -120,11 +120,11 @@ Below an example on a generic image from the web, created with: Download KITTI ground truth files and camera calibration matrices for training from [here](http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d) and save them respectively into `data/kitti/gt` and `data/kitti/calib`. -To extract pifpaf joints, you also need to download training images, put it in any folder and soft link in ` +To extract pifpaf joints, you also need to download training images soft link the folder in ` data/kitti/images` #### 2) nuScenes dataset -Download nuScenes dataset from [nuScenes](https://www.nuscenes.org/download) (either Mini or Full), +Download nuScenes dataset from [nuScenes](https://www.nuscenes.org/download) (either Mini or TrainVal), save it anywhere and soft link it in `data/nuscenes` @@ -135,7 +135,7 @@ You can create them running the predict script and using `--networks pifpaf`. ### Inputs joints for training MonoLoco is trained using 2D human pose joints matched with the ground truth location provided by nuScenes or KITTI Dataset. To create the joints run: `python src/main.py prep` specifying: -1. `--dir_ann` annotation directory containing pifpaf joints of kitti or nuScenes. +1. `--dir_ann` annotation directory containing Pifpaf joints of KITTI or nuScenes. 2. `--dataset` Which dataset to preprocess. For nuscenes, all three versions of the dataset are supported: nuscenes_mini, nuscenes, nuscenes_teaser. @@ -185,11 +185,13 @@ and save them into `data/kitti/monodepth` The best average value for comparison can be created running `python src/main.py eval --geometric` #### Evaluation -First the model preprocess the joints starting from json annotations predicted from pifpaf, runs the model and save the results +First the model preprocess the joints starting from json annotations predicted from pifpaf, +runs the model and save the results in txt file with format comparable to other baseline. Then the model performs evaluation. The following graph is obtained running: -`python3 src/main.py eval --dataset kitti --model data/models/base_model.pickle` +`python3 src/main.py eval --dataset kitti --run_kitti --model data/models/monoloco-190513-1437.pkl +--dir_ann ` ![kitti_evaluation](docs/results.png) diff --git a/docs/002282.png.combined.png b/docs/002282.png.combined.png deleted file mode 100644 index 33b893d..0000000 Binary files a/docs/002282.png.combined.png and /dev/null differ diff --git a/docs/results.png b/docs/results.png deleted file mode 100644 index 83c2a09..0000000 Binary files a/docs/results.png and /dev/null differ diff --git a/src/eval/kitti_eval.py b/src/eval/kitti_eval.py index 788997d..9436787 100644 --- a/src/eval/kitti_eval.py +++ b/src/eval/kitti_eval.py @@ -119,7 +119,7 @@ class KittiEval: print("\n Number of matched annotations: {:.1f} %".format(self.errors[key]['matched'])) print("-"*100) - def print(self, show): + def printer(self, show): print_results(self.dic_stats, show) def _parse_txts(self, path, method): diff --git a/src/eval/run_kitti.py b/src/eval/run_kitti.py index e17fb59..d7b249d 100644 --- a/src/eval/run_kitti.py +++ b/src/eval/run_kitti.py @@ -17,6 +17,7 @@ class RunKitti: self.logger = logging.getLogger(__name__) # Set directories + assert dir_ann, "Annotations folder is required" self.dir_ann = dir_ann self.average_y = 0.48 self.n_dropout = n_dropout diff --git a/src/main.py b/src/main.py index 9da7f57..e5c8640 100644 --- a/src/main.py +++ b/src/main.py @@ -145,7 +145,7 @@ def main(): if args.dataset == 'kitti': kitti_eval = KittiEval() kitti_eval.run() - kitti_eval.print(show=args.show) + kitti_eval.printer(show=args.show) if 'nuscenes' in args.dataset: training = Trainer(joints=args.joints) diff --git a/src/visuals/results.py b/src/visuals/results.py index d29b9a5..0e618ef 100644 --- a/src/visuals/results.py +++ b/src/visuals/results.py @@ -31,7 +31,7 @@ def print_results(dic_stats, show=False, save=False): plt.xlabel("Distance [meters]") plt.ylabel("Average localization error [m]") plt.xlim(x_min, x_max) - labels = ['Mono3D', 'Geometric Baseline', 'MonoDepth', 'Our MonoLoco', '3DOP'] + labels = ['Mono3D', 'Geometric Baseline', 'MonoDepth', 'Our MonoLoco', '3DOP (stereo)'] mks = ['*', '^', 'p', 's', 'o'] mksizes = [6, 6, 6, 6, 6] lws = [1.5, 1.5, 1.5, 2.2, 1.6]