Skip to content

Commit 4823082

Browse files
generatedunixname89002005287564facebook-github-bot
generatedunixname89002005287564
authored andcommitted
removing base_module] fbcode/deeplearning/projects/cityscapesApi/TARGETS
Reviewed By: azad-meta Differential Revision: D67442902 fbshipit-source-id: 71e9da8b63cc5cbd7a68f51651ce0dcaece8b0db
1 parent c69939a commit 4823082

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

detectron2/data/datasets/cityscapes.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def load_cityscapes_instances(image_dir, gt_dir, from_json=True, to_polygons=Tru
8282
logger.info("Loaded {} images from {}".format(len(ret), image_dir))
8383

8484
# Map cityscape ids to contiguous ids
85-
from cityscapesscripts.helpers.labels import labels
85+
from deeplearning.projects.cityscapesApi.cityscapesscripts.helpers.labels import labels
8686

8787
labels = [l for l in labels if l.hasInstances and not l.ignoreInEval]
8888
dataset_id_to_contiguous_id = {l.id: idx for idx, l in enumerate(labels)}
@@ -138,7 +138,7 @@ def _cityscapes_files_to_dict(files, from_json, to_polygons):
138138
Returns:
139139
A dict in Detectron2 Dataset format.
140140
"""
141-
from cityscapesscripts.helpers.labels import id2label, name2label
141+
from deeplearning.projects.cityscapesApi.cityscapesscripts.helpers.labels import id2label, name2label
142142

143143
image_file, instance_id_file, _, json_file = files
144144

@@ -294,7 +294,7 @@ def main() -> None:
294294
parser.add_argument("gt_dir")
295295
parser.add_argument("--type", choices=["instance", "semantic"], default="instance")
296296
args = parser.parse_args()
297-
from cityscapesscripts.helpers.labels import labels
297+
from deeplearning.projects.cityscapesApi.cityscapesscripts.helpers.labels import labels
298298
from detectron2.data.catalog import Metadata
299299
from detectron2.utils.visualizer import Visualizer
300300

detectron2/evaluation/cityscapes_evaluation.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class CityscapesInstanceEvaluator(CityscapesEvaluator):
5858
"""
5959

6060
def process(self, inputs, outputs):
61-
from cityscapesscripts.helpers.labels import name2label
61+
from deeplearning.projects.cityscapesApi.cityscapesscripts.helpers.labels import name2label
6262

6363
for input, output in zip(inputs, outputs):
6464
file_name = input["file_name"]
@@ -96,7 +96,7 @@ def evaluate(self):
9696
comm.synchronize()
9797
if comm.get_rank() > 0:
9898
return
99-
import cityscapesscripts.evaluation.evalInstanceLevelSemanticLabeling as cityscapes_eval
99+
import deeplearning.projects.cityscapesApi.cityscapesscripts.evaluation.evalInstanceLevelSemanticLabeling as cityscapes_eval, deeplearning.projects.cityscapesApi.cityscapesscripts.evaluation.evalInstanceLevelSemanticLabeling
100100

101101
self._logger.info("Evaluating results under {} ...".format(self._temp_dir))
102102

@@ -140,7 +140,7 @@ class CityscapesSemSegEvaluator(CityscapesEvaluator):
140140
"""
141141

142142
def process(self, inputs, outputs):
143-
from cityscapesscripts.helpers.labels import trainId2label
143+
from deeplearning.projects.cityscapesApi.cityscapesscripts.helpers.labels import trainId2label
144144

145145
for input, output in zip(inputs, outputs):
146146
file_name = input["file_name"]
@@ -161,7 +161,7 @@ def evaluate(self):
161161
return
162162
# Load the Cityscapes eval script *after* setting the required env var,
163163
# since the script reads CITYSCAPES_DATASET into global variables at load time.
164-
import cityscapesscripts.evaluation.evalPixelLevelSemanticLabeling as cityscapes_eval
164+
import deeplearning.projects.cityscapesApi.cityscapesscripts.evaluation.evalPixelLevelSemanticLabeling as cityscapes_eval, deeplearning.projects.cityscapesApi.cityscapesscripts.evaluation.evalPixelLevelSemanticLabeling
165165

166166
self._logger.info("Evaluating results under {} ...".format(self._temp_dir))
167167

0 commit comments

Comments
 (0)