Skip to content

Commit afaa67a

Browse files
committed
[fix] ruff lint
1 parent d04de2a commit afaa67a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compressai_vision/datasets/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ def __call__(self, dataset_dict):
334334
org_img = cv2.imread(dataset_dict["file_name"]) # return img in BGR by default
335335
dataset_dict["height"], dataset_dict["width"], _ = org_img.shape
336336

337-
h = dataset_dict["height"]
338-
w = dataset_dict["width"]
337+
# h = dataset_dict["height"]
338+
# w = dataset_dict["width"]
339339

340340
# BGR --> RGB (SAM requires RGB input)
341341
org_img = org_img[..., ::-1]

compressai_vision/model_wrappers/sam.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ def mask_to_bbx(mask):
5757
rows, cols = np.where(mask)
5858

5959
# Calculate the bounding box
60-
min_row, max_row = rows.min(), rows.max()
61-
min_col, max_col = cols.min(), cols.max()
60+
# min_row, max_row = rows.min(), rows.max()
61+
# min_col, max_col = cols.min(), cols.max()
6262

6363
# Bounding box as (top-left corner, bottom-right corner)
6464
bounding_box = [

0 commit comments

Comments
 (0)