code: def __init__(self, cfg, is_train=True, is_test=False, local_rank=0):
      super(FaceDataset, self).__init__()
  
      self.data_root = Path(cfg.root_dir)
      self.input_size = cfg.input_size
      self.transform = get_aug_transform(cfg)
      self.local_rank = local_rank
      self.is_test = is_test
      txt_path = self.data_root / "resources/projection_matrix.txt"
      self.M_proj = np.loadtxt(txt_path, dtype=np.float32)
      if is_test:
          data_root = Path(cfg.root_dir)
          csv_path = data_root / "list/WCPA_track2_test.csv"
          self.df = pd.read_csv(
              csv_path,
              dtype={
                  "subject_id": str,
                  "facial_action": str,
                  "img_id": str,
              },
          )
      else:
          if is_train:
              self.df = pd.read_csv(
                  osp.join(cfg.cache_dir, "train_list.csv"),
                  dtype={
                      "subject_id": str,
                      "facial_action": str,
                      "img_id": str,
                  },
              )
          else:
              self.df = pd.read_csv(
                  osp.join(cfg.cache_dir, "val_list.csv"),
                  dtype={
                      "subject_id": str,
                      "facial_action": str,
                      "img_id": str,
                  },
              )
      self.label_6dof_mean = [
          -0.018197,
          -0.017891,
          0.025348,
          -0.005368,
          0.001176,
          -0.532206,
      ]  # mean of pitch, yaw, roll, tx, ty, tz
      self.label_6dof_std = [
          0.314015,
          0.271809,
          0.081881,
          0.022173,
          0.048839,
          0.065444,
      ]  # std of pitch, yaw, roll, tx, ty, tz
      self.align_face = cfg.align_face
      if not self.align_face:
          self.dst_pts = np.float32(
              [[0, 0], [0, cfg.input_size - 1], [cfg.input_size - 1, 0]]
          )
      else:
          dst_pts = np.array(
              [
                  [38.2946, 51.6963],
                  [73.5318, 51.5014],
                  [56.0252, 71.7366],
                  [41.5493, 92.3655],
                  [70.7299, 92.2041],
              ],
              dtype=np.float32,
          )
  
          new_size = 144
          dst_pts[:, 0] += (new_size - 112) // 2
          dst_pts[:, 1] += 8
          dst_pts[:, :] *= self.input_size / float(new_size)
          self.dst_pts = dst_pts
  
      if local_rank == 0:
          logging.info("data_transform_list:%s" % self.transform)
          logging.info("len:%d" % len(self.df))
      self.is_test_aug = False
      self.eye_dataset = None
      if cfg.eyes is not None:
          from eye_dataset import EyeDataset
  
          self.eye_dataset = EyeDataset(cfg.eyes["root"])
  
imports: import numbers
  import os
  import os.path
  import pickle
  import queue
  import threading
  import logging
  import numbers
  import math
  import pandas
  from scipy.spatial.transform import Rotation
  import mxnet
  from pathlib import Path
  import numpy
  import torch
  from torch.utils.data import DataLoader, Dataset
  from skimage import transform
  import cv2
  import albumentations
  from albumentations.pytorch import ToTensorV2
  from augs import *
label_desc: Use image node_id 1 to create a new FaceDataset object from inherited base classes: Dataset with example: obj = FaceDataset(cfg, is_train, is_test, local_rank)