Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion comparisons/DeepLabV3+/train_deeplabv3_res50.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def __len__(self):

def __getitem__(self, index):
img_name = os.path.basename(self.gt_path_files[index])
assert img_name == os.path.basename(self.gt_path_files[index]), 'img gt name error' + self.gt_path_files[index] + self.npy_files[index]
assert img_name == os.path.basename(self.gt_path_files[index]), 'img gt name error: img=' + join(self.img_path, img_name) + ' gt=' + self.gt_path_files[index]
img_3c = np.load(join(self.img_path, img_name), 'r', allow_pickle=True) # (H, W, 3)
resize_img_cv2 = cv2.resize(
img_3c,
Expand Down
2 changes: 1 addition & 1 deletion extensions/point_prompt/train_point_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def __len__(self):

def __getitem__(self, index):
img_name = os.path.basename(self.gt_path_files[index])
assert img_name == os.path.basename(self.gt_path_files[index]), 'img gt name error' + self.gt_path_files[index] + self.npy_files[index]
assert img_name == os.path.basename(self.gt_path_files[index]), 'img gt name error: img=' + join(self.img_path, img_name) + ' gt=' + self.gt_path_files[index]
img_1024 = np.load(join(self.img_path, img_name), 'r', allow_pickle=True) # (H, W, 3)
# convert the shape to (3, H, W)
img_1024 = np.transpose(img_1024, (2, 0, 1)) # (3, 256, 256)
Expand Down
2 changes: 1 addition & 1 deletion extensions/text_prompt/train_text_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def __len__(self):

def __getitem__(self, index):
img_name = basename(self.gt_path_files[index])
assert img_name == basename(self.gt_path_files[index]), 'img gt name error' + self.gt_path_files[index] + self.npy_files[index]
assert img_name == basename(self.gt_path_files[index]), 'img gt name error: img=' + join(self.img_path, img_name) + ' gt=' + self.gt_path_files[index]
img_1024 = np.load(join(self.img_path, img_name), 'r', allow_pickle=True) # (H, W, 3)
# convert the shape to (3, H, W)
img_1024 = np.transpose(img_1024, (2, 0, 1)) # (3, 256, 256)
Expand Down
2 changes: 1 addition & 1 deletion train_multi_gpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __getitem__(self, index):
self.gt_path_files[index], "r", allow_pickle=True
) # multiple labels [0, 1,4,5...], (256,256)
assert img_name == os.path.basename(self.gt_path_files[index]), (
"img gt name error" + self.gt_path_files[index] + self.npy_files[index]
"img gt name error: img=" + join(self.img_path, img_name) + " gt=" + self.gt_path_files[index]
)
label_ids = np.unique(gt)[1:]
gt2D = np.uint8(
Expand Down
2 changes: 1 addition & 1 deletion train_one_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def __getitem__(self, index):
self.gt_path_files[index], "r", allow_pickle=True
) # multiple labels [0, 1,4,5...], (256,256)
assert img_name == os.path.basename(self.gt_path_files[index]), (
"img gt name error" + self.gt_path_files[index] + self.npy_files[index]
"img gt name error: img=" + join(self.img_path, img_name) + " gt=" + self.gt_path_files[index]
)
label_ids = np.unique(gt)[1:]
gt2D = np.uint8(
Expand Down