Skip to content

Commit 2a420ed

Browse files
dougianfacebook-github-bot
authored andcommitted
Distill vton inference
Summary: - Add support for running inference with the distilled model Differential Revision: D59805791 fbshipit-source-id: 5c97fd736013946ae32197c3e7b582f4077bd20e
1 parent 70f4543 commit 2a420ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

detectron2/data/datasets/coco.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,8 @@ def register_coco_instances(name, metadata, json_file, image_root):
507507
assert isinstance(json_file, (str, os.PathLike)), json_file
508508
assert isinstance(image_root, (str, os.PathLike)), image_root
509509
# 1. register a function which returns dicts
510-
DatasetCatalog.register(name, lambda: load_coco_json(json_file, image_root, name))
510+
if name not in DatasetCatalog:
511+
DatasetCatalog.register(name, lambda: load_coco_json(json_file, image_root, name))
511512

512513
# 2. Optionally, add metadata about this dataset,
513514
# since they might be useful in evaluation, visualization or logging

0 commit comments

Comments
 (0)