class_docstr: Face data set for model training and validating
  
  Examples:
  
      ./CelebAMask
          |---test
          |---train
              |---images
                  |---0.jpg
                  |---1.jpg
              |---labels
                  |---0.png
                  |---1.png
              |---edges
                  |---0.png
                  |---1.png
          |---valid
          |---label_names.txt
          |---test_list.txt
          |---train_list.txt
              |---images/0.jpg labels/0.png
              |---images/1.jpg labels/1.png
          |---valid_list.txt
  
  Args:
    root: A string, training/validating dataset path, e.g. "./CelebAMask"
    dataset: A string, one of `"train"`, `"test"`, `"valid"`.
    crop_size: A list of two intergers.
    scale_factor: A float number.
    rotation_factor: An integer number.
    ignore_label: An integer number, default is 255.
    transformer: A function of torchvision.transforms.Compose([])
class_docstr_tok: ["Face","data","set","for","model","training","and","validating","Examples",":",".\/CelebAMask","|","--","-test","|","--","-train","|","--","-images","|","--","-0.jpg","|","--","-1.jpg","|","--","-labels","|","--","-0.png","|","--","-1.png","|","--","-edges","|","--","-0.png","|","--","-1.png","|","--","-valid","|","--","-label_names.txt","|","--","-test_list.txt","|","--","-train_list.txt","|","--","-images\/0.jpg","labels\/0.png","|","--","-images\/1.jpg","labels\/1.png","|","--","-valid_list.txt","Args",":","root",":","A","string",",","training\/validating","dataset","path",",","e.g",".","``",".\/CelebAMask","''","dataset",":","A","string",",","one","of","`","``","train","''","`",",","`","``","test","''","`",",","`","``","valid","''","`",".","crop_size",":","A","list","of","two","intergers",".","scale_factor",":","A","float","number",".","rotation_factor",":","An","integer","number",".","ignore_label",":","An","integer","number",",","default","is","255.","transformer",":","A","function","of","torchvision.transforms.Compose","(","[","]",")"]
code: def _box2cs(self, box: list) -> tuple:
      x, y, w, h = box[:4]
      return self._xywh2cs(x, y, w, h)
  
file_path: insightface/parsing/dml_csr/dataset/datasets.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import cv2
  import numpy
  import os.path
  import pickle
  import random
  import torch
  import torchvision.transforms.functional
  from glob import glob
  from typing import Tuple
  from utils import transforms
label_desc: Use image node_id 3 for calling the FaceDataSet obj's underlying member method code with example usage: obj._box2cs(box) and returns: self