Commit
•
7085e9d
1
Parent(s):
e804901
TEST
Browse files- manual-window-detect.py +2 -2
manual-window-detect.py
CHANGED
@@ -81,7 +81,7 @@ class ManualWindowDetect (datasets.GeneratorBasedBuilder):
|
|
81 |
}
|
82 |
else:
|
83 |
image_id2cat = pd.read_csv(
|
84 |
-
os.path.join(data, "sceneCategories.
|
85 |
)
|
86 |
image_id2cat = image_id2cat.set_index("image_id")
|
87 |
images_dir = os.path.join(data, "images", split)
|
@@ -91,5 +91,5 @@ class ManualWindowDetect (datasets.GeneratorBasedBuilder):
|
|
91 |
yield idx, {
|
92 |
"image": os.path.join(images_dir, image_file),
|
93 |
"annotation": os.path.join(annotations_dir, image_id + ".png"),
|
94 |
-
"scene_category": image_id2cat.loc[image_id, "scene_category"]
|
95 |
}
|
|
|
81 |
}
|
82 |
else:
|
83 |
image_id2cat = pd.read_csv(
|
84 |
+
os.path.join(data, "sceneCategories.txt"), sep=" ", names=["image_id", "scene_category"]
|
85 |
)
|
86 |
image_id2cat = image_id2cat.set_index("image_id")
|
87 |
images_dir = os.path.join(data, "images", split)
|
|
|
91 |
yield idx, {
|
92 |
"image": os.path.join(images_dir, image_file),
|
93 |
"annotation": os.path.join(annotations_dir, image_id + ".png"),
|
94 |
+
"scene_category": 8 #image_id2cat.loc[image_id, "scene_category"]
|
95 |
}
|