import os
import sys
import cv2
from tqdm import tqdm
from PIL import Image
from matplotlib import pyplot as plt
import argparse
import json
def vis_one_img(result_dict,target_dir):
img_position=result_dict["name"]
instances=result_dict["instances"]
image = cv2.imread(img_position, cv2.IMREAD_COLOR)
img = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
plt.ion()
img_h, img_w, img_c = img.shape
dpi = 200
fig = plt.figure(figsize=(img_w / dpi, img_h / dpi))
ax = fig.add_axes((0.05, 0.05, 0.85, 0.85))
ax.axis('off')
ax.set(aspect=1)
ax.imshow(img)
# plt.imshow(img)
currentAxis = plt.gca()
desk_text = ["including desk", "excluding desk"]
action_text = ["other", "lie down", "hold your head", "turn your back"]
pose_text = ["normal sitting", "