class_docstr: PicReader
class_docstr_tok: ["PicReader"]
docstr: 缓存图片进行预resize, 减少内存占用
  
  Returns:
docstr_tok: ["\u7f13\u5b58\u56fe\u7247\u8fdb\u884c\u9884resize",",","\u51cf\u5c11\u5185\u5b58\u5360\u7528","Returns",":"]
code: def _get_all_img(self, **kwargs) -> None:
      """
      缓存图片进行预resize, 减少内存占用
  
      Returns:
  
      """
  
      scale_size = kwargs.get("scale_size", 256)
  
      for idx in range(len(self)):
          record = self.pic_list[idx]
          relative_path = record.sub_path
          if self.root_path is not None:
              image_path = os.path.join(self.root_path, relative_path)
          else:
              image_path = relative_path
          try:
              img = cv2.imread(image_path, cv2.IMREAD_COLOR)
              img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
              img = cv2.resize(img, (scale_size, scale_size))
              self.cache_img_buff[image_path] = img
          except BaseException:
              print(
                  "img_path:{} can not by cv2".format(
                      image_path
                  ).format(image_path)
              )
  
              pass
  
imports: import re
  import numpy
  from typing import Dict, List, Optional, Union, Tuple
  import six
  import cv2
  import os
  import paddle
  import paddlehub.vision.transforms
  from PIL import ImageFile
  from auto_augment.autoaug.transform.autoaug_transform import AutoAugTransform
label_desc: Use image node_id 2 for calling the PicReader obj's underlying member method code with example usage: obj._get_all_img() without return types