Commit 3b23dd39 authored by Tao Xu's avatar Tao Xu Committed by Facebook GitHub Bot
Browse files

fix real data driving generation in _generate()

Summary: Fix a failure bug in real image driving generating

Reviewed By: yc-fb

Differential Revision: D31362721

fbshipit-source-id: b222745aada1bd6680ca931d49a70d8b428828a6
parent d99428a1
...@@ -226,7 +226,10 @@ def inject_gan_datasets(cfg): ...@@ -226,7 +226,10 @@ def inject_gan_datasets(cfg):
json_path = cfg.D2GO_DATA.DATASETS.GAN_INJECTION.JSON_PATH json_path = cfg.D2GO_DATA.DATASETS.GAN_INJECTION.JSON_PATH
assert PathManager.isfile(json_path), "{} is not valid!".format(json_path) assert PathManager.isfile(json_path), "{} is not valid!".format(json_path)
image_dir = Path(tempfile.mkdtemp()) if len(cfg.D2GO_DATA.DATASETS.GAN_INJECTION.LOCAL_DIR) > 0:
image_dir = cfg.D2GO_DATA.DATASETS.GAN_INJECTION.LOCAL_DIR
else:
image_dir = Path(tempfile.mkdtemp())
input_src_path = cfg.D2GO_DATA.DATASETS.GAN_INJECTION.INPUT_SRC_DIR input_src_path = cfg.D2GO_DATA.DATASETS.GAN_INJECTION.INPUT_SRC_DIR
assert PathManager.isfile(input_src_path), "{} is not valid!".format( assert PathManager.isfile(input_src_path), "{} is not valid!".format(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment