import json import cv2 import os from tqdm import tqdm from PIL import Image def resize_label(resize_rate=0.5)