Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where is the meta file? #34

Open
HashmatShadab opened this issue Jul 14, 2024 · 0 comments
Open

Where is the meta file? #34

HashmatShadab opened this issue Jul 14, 2024 · 0 comments

Comments

@HashmatShadab
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant