Skip to content

Commit 380b11d

Browse files
authored
Update voc.py
Eliminate self.root which is duplicate.
1 parent 4b71ed4 commit 380b11d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libs/datasets/voc.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def _set_files(self):
4545
def _load_data(self, index):
4646
# Set paths
4747
image_id = self.files[index]
48-
image_path = osp.join(self.root, self.image_dir, image_id + ".jpg")
49-
label_path = osp.join(self.root, self.label_dir, image_id + ".png")
48+
image_path = osp.join(self.image_dir, image_id + ".jpg")
49+
label_path = osp.join(self.label_dir, image_id + ".png")
5050
# Load an image
5151
image = cv2.imread(image_path, cv2.IMREAD_COLOR).astype(np.float32)
5252
label = np.asarray(Image.open(label_path), dtype=np.int32)

0 commit comments

Comments
 (0)