Skip to content

Commit f4112c9

Browse files
authored
[Fix]: Fix compatibility issue with MMCV 2.0.0rc4 on data transforms (#9703)
1 parent 83b8335 commit f4112c9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

mmdet/datasets/transforms/loading.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ def __init__(
525525
'panopticapi.git.')
526526
self.rgb2id = utils.rgb2id
527527

528+
self.file_client = FileClient(**file_client_args)
528529
super(LoadPanopticAnnotations, self).__init__(
529530
with_bbox=with_bbox,
530531
with_label=with_label,

tests/test_datasets/test_transforms/test_loading.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def test_repr(self):
122122
'with_label=False, with_mask=False, '
123123
'with_seg=False, poly2mask=True, '
124124
"imdecode_backend='cv2', "
125-
"file_client_args={'backend': 'disk'})"))
125+
'file_client_args=None)'))
126126

127127

128128
class TestFilterAnnotations(unittest.TestCase):
@@ -344,7 +344,7 @@ def test_repr(self):
344344
'to_float32=False, '
345345
"color_type='color', "
346346
"imdecode_backend='cv2', "
347-
"file_client_args={'backend': 'disk'})"))
347+
'backend_args=None)'))
348348

349349

350350
class TestLoadMultiChannelImageFromFiles(unittest.TestCase):

0 commit comments

Comments
 (0)