code: def read_img_from_bin(input_path):
      # the file can exist many key-vals, but it just save one in fact.
      with open(input_path, "rb") as fin:
          r = readkv(fin)
          assert r is not None
          _, value = r
          value = pickle.loads(value)
          value = np.frombuffer(value, dtype="uint8")
          img = cv2.imdecode(value, 1)
      return img
  
file_path: insightface/recognition/arcface_paddle/datasets/kv_helper.py
imports: import os
  import pickle
  import struct
  import random
  import multiprocessing
  import numpy
  import cv2
  import json
label_desc: Use image node_id 4 for calling a global function with example usage: read_img_from_bin(input_path) and returns: img