mirror of
https://github.com/open-mmlab/mmclassification.git
synced 2025-06-03 21:53:55 +08:00
[Fix] Fix bug loading IN1k dataset. (#1641)
This commit is contained in:
parent
7581b76233
commit
93e0f107c4
@ -117,7 +117,7 @@ class ImageNet(CustomDataset):
|
|||||||
if ann_file == '':
|
if ann_file == '':
|
||||||
_ann_path = fileio.join_path(data_root, 'meta', f'{split}.txt')
|
_ann_path = fileio.join_path(data_root, 'meta', f'{split}.txt')
|
||||||
if fileio.exists(_ann_path):
|
if fileio.exists(_ann_path):
|
||||||
ann_file = _ann_path
|
ann_file = fileio.join_path('meta', f'{split}.txt')
|
||||||
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
data_root=data_root,
|
data_root=data_root,
|
||||||
@ -210,7 +210,7 @@ class ImageNet21k(CustomDataset):
|
|||||||
if not ann_file:
|
if not ann_file:
|
||||||
_ann_path = fileio.join_path(data_root, 'meta', f'{split}.txt')
|
_ann_path = fileio.join_path(data_root, 'meta', f'{split}.txt')
|
||||||
if fileio.exists(_ann_path):
|
if fileio.exists(_ann_path):
|
||||||
ann_file = _ann_path
|
ann_file = fileio.join_path('meta', f'{split}.txt')
|
||||||
|
|
||||||
logger = MMLogger.get_current_instance()
|
logger = MMLogger.get_current_instance()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user