class_docstr: ImageNet Dataset for zero-shot evaluation of Image-text models.
  
  Args:
      opts: Command-line arguments
class_docstr_tok: ["ImageNet","Dataset","for","zero-shot","evaluation","of","Image-text","models",".","Args",":","opts",":","Command-line","arguments"]
code: def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None:
      BaseZeroShotDataset.__init__(self, opts=opts, *args, **kwargs)
      root = self.root
      ImageFolder.__init__(
          self,
          root=root,
          transform=None,
          target_transform=None,
          is_valid_file=None,
      )
  
      # TODO: Refactor BaseZeroShotDataset to inherit from
      # BaseImageClassificationDataset then inherit from ImageNetDataset instead of
      # ImageFolder. Rename the base class to BaseZeroShotClassificationDataset.
      assert len(list(self.class_to_idx.keys())) == len(
          self.class_names()
      ), (
          "Number of classes from ImageFolder do not match the number of ImageNet"
          " classes."
      )
  
file_path: ml-cvnets/data/datasets/multi_modal_img_text/zero_shot/imagenet.py
imports: import argparse
  from typing import List
  from torchvision.datasets import ImageFolder
  from data.datasets.multi_modal_img_text.zero_shot import ZERO_SHOT_DATASET_REGISTRY, BaseZeroShotDataset
  from data.datasets.multi_modal_img_text.zero_shot.imagenet_class_names import IMAGENET_CLASS_NAMES
  from data.datasets.multi_modal_img_text.zero_shot.templates import generate_text_prompts_clip
label_desc: Use image node_id 1 to create a new ImageNetDatasetZeroShot object from inherited base classes: BaseZeroShotDataset, ImageFolder with example: obj = ImageNetDatasetZeroShot(opts)