Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Where is the meta file? #34

@HashmatShadab

Description

@HashmatShadab

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions