make import of nuscenes indipendent

This commit is contained in:
lorenzo 2019-07-26 12:04:17 +02:00
parent 5c695d3cea
commit 315f401c37
5 changed files with 6 additions and 8 deletions

View File

@ -109,7 +109,7 @@ with all the predictions without ground-truth matching.
Below an example with and without ground-truth matching. They have been created (adding or removing `--path_gt`) with:
`python3 -m monoloco.run predict --networks monoloco --glob docs/002282.png --output_types combined --scale 2
--model data/models/monoloco-190513-1437.pkl --n_dropout 100 --z_max 30`
--model data/models/monoloco-190513-1437.pkl --n_dropout 50 --z_max 30 instance-threshold 0.15`
With ground truth matching (only matching people):
![predict_ground_truth](docs/002282.png.combined_1.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 696 KiB

After

Width:  |  Height:  |  Size: 694 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 708 KiB

After

Width:  |  Height:  |  Size: 707 KiB

View File

@ -1,3 +1 @@
from .preprocess_nu import PreprocessNuscenes
from .preprocess_ki import PreprocessKitti

View File

@ -44,10 +44,10 @@ def cli():
# Monoloco
predict_parser.add_argument('--model', help='path of MonoLoco model to load',
default="data/models/monoloco-190513-1437.pkl")
predict_parser.add_argument('--hidden_size', type=int, help='Number of hidden units in the model', default=256)
default="data/models/monoloco-190719-0923.pkl")
predict_parser.add_argument('--hidden_size', type=int, help='Number of hidden units in the model', default=512)
predict_parser.add_argument('--path_gt', help='path of json file with gt 3d localization',
default='data/arrays/names-kitti-190710-1206.json')
default='data/arrays/names-kitti-190726-1141.json')
predict_parser.add_argument('--transform', help='transformation for the pose', default='None')
predict_parser.add_argument('--draw_box', help='to draw box in the images', action='store_true')
predict_parser.add_argument('--predict', help='whether to make prediction', action='store_true')
@ -105,11 +105,11 @@ def main():
elif args.command == 'prep':
if 'nuscenes' in args.dataset:
from .prep import PreprocessNuscenes
from .prep.preprocess_nu import PreprocessNuscenes
prep = PreprocessNuscenes(args.dir_ann, args.dir_nuscenes, args.dataset, args.iou_min)
prep.run()
if 'kitti' in args.dataset:
from .prep import PreprocessKitti
from .prep.preprocess_ki import PreprocessKitti
prep = PreprocessKitti(args.dir_ann, args.iou_min)
prep.run()