File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff 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 ]
Original file line number Diff line number Diff 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 = [
You can’t perform that action at this time.
0 commit comments