class_docstr: EG1800 dataset `http://xiaoyongshen.me/webpage_portrait/index.html`.
  
  Args:
      common_transforms (list): A list of common image transformations for two inputs of portrait net.
      transforms1 (list): A list of image transformations for the first input of portrait net.
      transforms2 (list): A list of image transformations for the second input of portrait net.
      dataset_root (str, optional): The EG1800 dataset directory. Default: None.
      mode (str, optional): A subset of the entire dataset. It should be one of ('train', 'val'). Default: 'train'.
      edge (bool, optional): Whether to compute edge while training. Default: False
code: def __init__(
      self,
      common_transforms,
      transforms1,
      transforms2,
      dataset_root=None,
      mode="train",
      edge=False,
  ):
      self.dataset_root = dataset_root
      self.common_transforms = Compose(common_transforms)
      self.transforms = self.common_transforms
      if transforms1 is not None:
          self.transforms1 = Compose(transforms1, to_rgb=False)
      if transforms2 is not None:
          self.transforms2 = Compose(transforms2, to_rgb=False)
      mode = mode.lower()
      self.ignore_index = self.IGNORE_INDEX
      self.mode = mode
      self.num_classes = self.NUM_CLASSES
      self.input_width = 224
      self.input_height = 224
  
      if self.dataset_root is None:
          self.dataset_root = download_file_and_uncompress(
              url=URL,
              savepath=seg_env.DATA_HOME,
              extrapath=seg_env.DATA_HOME,
          )
      elif not os.path.exists(self.dataset_root):
          self.dataset_root = os.path.normpath(self.dataset_root)
          savepath, extraname = self.dataset_root.rsplit(
              sep=os.path.sep, maxsplit=1
          )
          self.dataset_root = download_file_and_uncompress(
              url=URL,
              savepath=savepath,
              extrapath=savepath,
              extraname=extraname,
          )
  
      if mode == "train":
          path = os.path.join(dataset_root, "eg1800_train.txt")
      else:
          path = os.path.join(dataset_root, "eg1800_test.txt")
      with open(path, "r") as f:
          files = f.readlines()
      img_files = [
          os.path.join(dataset_root, "Images", file).strip()
          for file in files
      ]
      label_files = [
          os.path.join(dataset_root, "Labels", file).strip()
          for file in files
      ]
  
      self.file_list = [
          [img_path, label_path]
          for img_path, label_path in zip(img_files, label_files)
      ]
      pass
  
file_path: PaddleSeg/paddleseg/datasets/eg1800.py
imports: import os
  import copy
  import cv2
  import numpy
  from paddleseg.datasets import Dataset
  from paddleseg.cvlibs import manager
  from paddleseg.transforms import Compose
  from paddleseg.utils.download import download_file_and_uncompress
  from paddleseg.utils import seg_env
  import paddleseg.transforms.functional
label_desc: Use image node_id 1 to create a new EG1800 object from inherited base classes: Dataset with example: obj = EG1800(common_transforms, transforms1, transforms2, dataset_root, mode, edge)