|
def __init__(self, data_dir, meta_file, transform=None): |
|
"""The function to initialize ImageNet class. |
|
|
|
Args: |
|
data_dir (str): The path to the dataset. |
|
meta_file (str): The path to the file containing image directories and labels. |
|
transform (torchvision.transforms): The transform for input image. |
|
""" |
|
|
|
self.data_dir = data_dir |
|
self.meta_file = meta_file |
|
self.transform = transform |
|
self._indices = [] |
|
for line in open(os.path.join(os.path.dirname(__file__), meta_file), encoding="utf-8"): |
|
img_path, label, target_label = line.strip().split(' ') |
|
self._indices.append((os.path.join(self.data_dir, img_path), label, target_label)) |
Hi, Can you please provide the meta_file used to load the dataset?
ares/ares/dataset/imagenet_dataset.py
Lines 8 to 23 in 306e35f
Hi, Can you please provide the meta_file used to load the dataset?