reuse registration code between open source and internal
@@ -218,6 +218,9 @@ def register_all_pascal_voc(root):
MetadataCatalog.get(name).evaluator_type = "pascal_voc"
+# True for open source;
+# Internally at fb, we register them elsewhere
+if __name__.endswith(".builtin"):
# Register them all under "./datasets"
_root = os.getenv("DETECTRON2_DATASETS", "datasets")
register_all_coco(_root)
