code: def make_gt_score(self, index):
      img_path = os.path.join(self.data_dir, self.img_names[index][0])
      image = cv2.imread(img_path, cv2.IMREAD_COLOR)
      image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
      all_char_bbox = self.char_bbox[index].transpose(
          (2, 1, 0)
      )  # shape : (Number of characters in image, 4, 2)
  
      img_h, img_w, _ = image.shape
  
      confidence_mask = np.ones((img_h, img_w), dtype=np.float32)
  
      words = [
          re.split(" \n|\n |\n| ", word.strip())
          for word in self.img_words[index]
      ]
      words = list(itertools.chain(*words))
      words = [word for word in words if len(word) > 0]
  
      word_level_char_bbox = []
      char_idx = 0
  
      for i in range(len(words)):
          length_of_word = len(words[i])
          word_bbox = all_char_bbox[
              char_idx : char_idx + length_of_word
          ]
          assert len(word_bbox) == length_of_word
          char_idx += length_of_word
          word_bbox = np.array(word_bbox)
          word_level_char_bbox.append(word_bbox)
  
      region_score = self.gaussian_builder.generate_region(
          img_h,
          img_w,
          word_level_char_bbox,
          horizontal_text_bools=[True for _ in range(len(words))],
      )
      (
          affinity_score,
          all_affinity_bbox,
      ) = self.gaussian_builder.generate_affinity(
          img_h,
          img_w,
          word_level_char_bbox,
          horizontal_text_bools=[True for _ in range(len(words))],
      )
  
      return (
          image,
          region_score,
          affinity_score,
          confidence_mask,
          word_level_char_bbox,
          all_affinity_bbox,
          words,
      )
  
imports: import os
  import re
  import itertools
  import random
  import numpy
  import scipy.io
  from PIL import Image
  import cv2
  from torch.utils.data import Dataset
  import torchvision.transforms
  from data import imgproc
  from data.gaussian import GaussianBuilder
  from data.imgaug import rescale, random_resize_crop_synth, random_resize_crop, random_horizontal_flip, random_rotate, random_scale, random_crop
  from data.pseudo_label.make_charbox import PseudoCharBoxBuilder
  from utils.util import saveInput, saveImage
label_desc: Use image node_id 4 for calling the SynthTextDataSet obj's underlying member method code with example usage: obj.make_gt_score(index) and returns: image,  region_score,  affinity_score,  confidence_mask,  word_level_char_bbox,  all_affinity_bbox,  words