Commit dbc9a9f4 authored by Rama Kovvuri's avatar Rama Kovvuri Committed by Facebook GitHub Bot
Browse files

Enable manifold based training for OCR d2go pipeline

Summary: As in title.

Reviewed By: SuperIRabbit

Differential Revision: D25349762

fbshipit-source-id: 69e21cc00a9dd5b70a479fd4383742593a62997e
parent 857195d8
......@@ -4,7 +4,6 @@
import json
import logging
import os
import shlex
import subprocess
from collections import defaultdict
......@@ -15,6 +14,13 @@ from detectron2.structures import BoxMode
from pycocotools.coco import COCO
from .cache_util import _cache_json_file
try:
# virtual_fs is used to support both local and manifold paths
# with syntax that is identical to the default python APIs
from virtual_fs import virtual_os as os
from virtual_fs.virtual_io import open
except ImportError:
import os
logger = logging.getLogger(__name__)
......@@ -48,7 +54,7 @@ def extract_archive_file(archive_fn, im_dir):
"Extracting datasets {} to local machine at {}".format(archive_fns, im_dir)
)
if not os.path.exists(im_dir):
os.makedirs(im_dir)
os.makedirs(im_dir, exist_ok=True)
for archive_fn in archive_fns:
# Extract the tgz file directly into the target directory,
......
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