File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
official/vision/beta/tasks Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 28
28
from official .vision .beta .dataloaders import tf_example_label_map_decoder
29
29
from official .vision .beta .evaluation import coco_evaluator
30
30
from official .vision .beta .evaluation import coco_utils
31
- from official .vision .beta .evaluation import wod_detection_evaluator
32
31
from official .vision .beta .losses import maskrcnn_losses
33
32
from official .vision .beta .modeling import factory
34
33
@@ -301,6 +300,18 @@ def build_metrics(self, training: bool = True):
301
300
if self ._task_config .use_coco_metrics :
302
301
self ._build_coco_metrics ()
303
302
if self ._task_config .use_wod_metrics :
303
+ # To use Waymo open dataset metrics, please install one of the pip
304
+ # package `waymo-open-dataset-tf-*` from
305
+ # https://github.com/waymo-research/waymo-open-dataset/blob/master/docs/quick_start.md#use-pre-compiled-pippip3-packages-for-linux
306
+ # Note that the package is built with specific tensorflow version and
307
+ # will produce error if it does not match the tf version that is
308
+ # currently used.
309
+ try :
310
+ from official .vision .beta .evaluation import wod_detection_evaluator # pylint: disable=g-import-not-at-top
311
+ except ModuleNotFoundError :
312
+ logging .error ('waymo-open-dataset should be installed to enable Waymo'
313
+ ' evaluator.' )
314
+ raise
304
315
self .wod_metric = wod_detection_evaluator .WOD2dDetectionEvaluator ()
305
316
306
317
return metrics
You can’t perform that action at this time.
0 commit comments