8 Commits
12 changed files with 146 additions and 4980 deletions
-1
View File
@@ -1 +0,0 @@
CLIPDROP_API_KEY=
-1
View File
@@ -5,6 +5,5 @@ venv
.DS_Store
checkpoints/
checkpoint/
.env
dwpose/keypoints/
+144 -577
View File
@@ -1,5 +1,5 @@
# v1.1.0
import cv2, json, os, math, pathlib, requests, io
import cv2, json, os, math
import numpy as np
import torch
import hashlib
@@ -8,51 +8,6 @@ import folder_paths
from PIL import Image, ImageOps
def from_torch_image(image):
image = image.squeeze().cpu().numpy() * 255.0
image = np.clip(image, 0, 255).astype(np.uint8)
return image
def to_torch_image(image):
image = image.astype(dtype=np.float32)
image /= 255.0
image = torch.from_numpy(image)[
None,
]
image = image.unsqueeze(0)
return image
def get_bounding_box(mask_input):
rows = np.any(mask_input, axis=1)
cols = np.any(mask_input, axis=0)
rmin, rmax = np.where(rows)[0][[0, -1]]
cmin, cmax = np.where(cols)[0][[0, -1]]
return rmin, cmin, rmax, cmax
def extract_box_from_image(image, mask):
y_min, x_min, y_max, x_max = get_bounding_box(mask_input=mask)
return image[y_min:y_max + 1, x_min:x_max + 1, :]
def stitch_back_box_to_image(image_original, mask_original, image_patch):
y_min, x_min, y_max, x_max = get_bounding_box(mask_input=mask_original)
image_original[y_min:y_max + 1, x_min:x_max + 1] = image_patch
return image_original
def do_work(image, external_file_name):
exec(open(external_file_name, 'r').read())
return image
def do_work_with_mask(image, mask, external_file_name):
exec(open(external_file_name, 'r').read())
return image
class TRI3DATRParseBatch:
def __init__(self):
@@ -1063,7 +1018,7 @@ class TRI3DDWPose_Preprocessor:
CATEGORY = "TRI3D"
def estimate_pose(self, images, detect_hand, detect_body, detect_face,
filename_path):
**kwargs):
from .dwpose import DwposeDetector
detect_hand = detect_hand == "enable"
@@ -1089,7 +1044,8 @@ class TRI3DDWPose_Preprocessor:
include_face=detect_face,
include_body=detect_body)
cur_file_dir = os.path.dirname(os.path.realpath(__file__))
save_file_path = os.path.join(cur_file_dir, filename_path)
save_file_path = os.path.join(cur_file_dir,
kwargs['filename_path'])
json.dump(pose_dict, open(save_file_path, 'w'))
np_result = cv2.resize(np_result, (W, H),
interpolation=cv2.INTER_AREA)
@@ -1148,19 +1104,21 @@ class TRI3DPoseAdaption:
def INPUT_TYPES(s):
return {
"required": {
"input_pose_json_file": ("STRING",{"default" : "dwpose/keypoints/input.json"}),
"ref_pose_json_file": ("STRING",{"default" : "dwpose/keypoints/ref-pose.json"}),
"image_angle": (["front", "back","back_fixed_kid","back_fixed","back_fixed_left","back_fixed_right"], {"default": "front"}),
"input_pose_json_file": ("STRING", {
"default": "dwpose/keypoints"
}),
"ref_pose_json_file": ("STRING", {
"default": "dwpose/keypoints"
}),
"image_angle": (["front", "side", "back"], {
"default": "front"
}),
"rotation_threshold": ("FLOAT", {
"default": 5.0,
"min": 0.0,
"max": 15.0,
"step": 0.01
}),
"garment_category":(["no_sleeve_garment", "half_sleeve_garment", "full_sleeve_garment", \
"shorts", "trouser"], {"default": "no_sleeve_garment"})
})
}
}
@@ -1169,10 +1127,7 @@ class TRI3DPoseAdaption:
CATEGORY = "TRI3D"
def main(self, input_pose_json_file, ref_pose_json_file, image_angle,
rotation_threshold, garment_category):
print(image_angle, "image_angle")
print(garment_category, "garment_category")
rotation_threshold):
from .dwpose import comfy_utils
if image_angle == "front":
@@ -1188,30 +1143,26 @@ class TRI3DPoseAdaption:
ref_height = ref_pose['height']
ref_width = ref_pose['width']
ref_keypoints = ref_pose['keypoints']
similar_torso = None
#check torso similarity
if garment_category not in ["shorts", "trouser"]:
ls_angle_1, rs_angle_1, torso_angle_1 = comfy_utils.get_torso_angles(
input_keypoints)
ls_angle_2, rs_angle_2, torso_angle_2 = comfy_utils.get_torso_angles(
ref_keypoints)
ls_angle_1, rs_angle_1, torso_angle_1 = comfy_utils.get_torso_angles(
input_keypoints)
ls_angle_2, rs_angle_2, torso_angle_2 = comfy_utils.get_torso_angles(
ref_keypoints)
ls_angle_diff = abs(ls_angle_2 - ls_angle_1)
rs_angle_diff = abs(rs_angle_2 - rs_angle_1)
torso_angle_diff = abs(torso_angle_2 - torso_angle_1)
ls_angle_diff = abs(ls_angle_2 - ls_angle_1)
rs_angle_diff = abs(rs_angle_2 - rs_angle_1)
torso_angle_diff = abs(torso_angle_2 - torso_angle_1)
similar_torso = False if (
ls_angle_diff >= rotation_threshold) | (
rs_angle_diff >= rotation_threshold) | (
torso_angle_diff >= rotation_threshold) else True
similar_torso = False if (ls_angle_diff >= rotation_threshold) | (
rs_angle_diff >= rotation_threshold) | (
torso_angle_diff >= rotation_threshold) else True
if similar_torso == False:
canvas = torch.from_numpy(
canvas.astype(np.float32) / 255.0)[
None,
]
return (canvas, similar_torso)
if similar_torso == False:
canvas = torch.from_numpy(canvas.astype(np.float32) / 255.0)[
None,
]
return (canvas, similar_torso)
#Hands
if input_keypoints[4] == [-1, -1]:
@@ -1222,21 +1173,17 @@ class TRI3DPoseAdaption:
input_keypoints[88:] = ref_keypoints[
88:] #replace hands with reference hands
if garment_category not in [
"half_sleeve_garment", "full_sleeve_garment"
]:
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 2,
3) # rotate left elbow
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 2,
3) # rotate left elbow
input_keypoints = comfy_utils.scale(
ref_keypoints, input_keypoints, 2, 5, 2,
ref_keypoints, input_keypoints, 1, 2, 2,
3) #scaling w.r.t to shoulder to elbow ratio of ref pose
prev_lw = input_keypoints[4]
if garment_category != "full_sleeve_garment":
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 3,
4) #rotate left wrist
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 3,
4) #rotate left wrist
input_keypoints = comfy_utils.scale(
ref_keypoints, input_keypoints, 2, 3, 3,
4) #scaling w.r.t to elbow to wrist ratio of ref pose
@@ -1254,21 +1201,17 @@ class TRI3DPoseAdaption:
ref_keypoints, input_keypoints, 3, 4,
109) #scaling left hand w.r.t left wrist
if garment_category not in [
"half_sleeve_garment", "full_sleeve_garment"
]:
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 5,
6) #rotate right elbow
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 5,
6) #rotate right elbow
input_keypoints = comfy_utils.scale(
ref_keypoints, input_keypoints, 2, 5, 5,
ref_keypoints, input_keypoints, 1, 5, 5,
6) #scaling w.r.t to shoulder to elbow ratio of ref pose
prev_rw = input_keypoints[7]
if garment_category != "full_sleeve_garment":
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 6,
7) #rotate right wrist
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 6,
7) #rotate right wrist
input_keypoints = comfy_utils.scale(
ref_keypoints, input_keypoints, 5, 6, 6,
7) #scaling w.r.t to elbow to wrist ratio of ref pose
@@ -1287,33 +1230,26 @@ class TRI3DPoseAdaption:
88) #scaling right hand w.r.t right wrist
#legs
if garment_category not in ["trouser", "shorts"]:
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 8,
9) #rotate left knee
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 8,
9) #rotate left knee
input_keypoints = comfy_utils.scale(ref_keypoints, input_keypoints,
1, 8, 8, 9) #scale left knee
if garment_category != "trouser":
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 9,
10) #rotate left foot
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 9,
10) #rotate left foot
input_keypoints = comfy_utils.scale(
ref_keypoints, input_keypoints, 8, 9, 9,
10) #scaling w.r.t to knee to foot ratio of ref pose
if garment_category not in ["trouser", "shorts"]:
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 11,
12) #rotate right knee
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 11,
12) #rotate right knee
input_keypoints = comfy_utils.scale(ref_keypoints, input_keypoints,
1, 11, 11,
12) #scale right knee
if garment_category != "trouser":
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 12,
13) #rotate right foot
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 12,
13) #rotate right foot
input_keypoints = comfy_utils.scale(
ref_keypoints, input_keypoints, 11, 12, 12,
13) #scaling w.r.t to knee to foot ratio of ref pose
@@ -1370,7 +1306,7 @@ class TRI3DPoseAdaption:
]
return (canvas, similar_torso)
if 'back' in image_angle:
if image_angle == "back":
input_pose = json.load(open(input_pose_json_file))
input_height = input_pose['height']
@@ -1381,47 +1317,28 @@ class TRI3DPoseAdaption:
canvas = np.zeros(shape=(input_height, input_width, 3),
dtype=np.uint8)
if 'back_fixed' in image_angle:
back_pose_dir = pathlib.Path().resolve(
) / 'custom_nodes/tri3d-comfyui-nodes/samples/back_poses/'
back_pose_dictionary = {
'back_fixed_kid': 'backpose_kid.json',
'back_fixed': 'backpose.json',
'back_fixed_left': 'left_backpose.json',
'back_fixed_right': 'right_backpose.json'
}
ref_pose_json_file = back_pose_dir / back_pose_dictionary[
image_angle]
# /home/ubuntu/GITHUB/comfyanonymous/ComfyUI/custom_nodes/tri3d-comfyui-nodes
print(ref_pose_json_file)
ref_pose = json.load(open(ref_pose_json_file))
ref_keypoints = ref_pose['keypoints']
similar_torso = None
#check torso similarity
if garment_category not in ["shorts", "trouser"]:
ls_angle_1, rs_angle_1, torso_angle_1 = comfy_utils.get_torso_angles(
input_keypoints)
ls_angle_2, rs_angle_2, torso_angle_2 = comfy_utils.get_torso_angles(
ref_keypoints)
ls_angle_1, rs_angle_1, torso_angle_1 = comfy_utils.get_torso_angles(
input_keypoints)
ls_angle_2, rs_angle_2, torso_angle_2 = comfy_utils.get_torso_angles(
ref_keypoints)
ls_angle_diff = abs(ls_angle_2 - ls_angle_1)
rs_angle_diff = abs(rs_angle_2 - rs_angle_1)
torso_angle_diff = abs(torso_angle_2 - torso_angle_1)
ls_angle_diff = abs(ls_angle_2 - ls_angle_1)
rs_angle_diff = abs(rs_angle_2 - rs_angle_1)
torso_angle_diff = abs(torso_angle_2 - torso_angle_1)
similar_torso = False if (ls_angle_diff >= 5) | (
rs_angle_diff >= 5) | (torso_angle_diff >= 5) else True
similar_torso = False if (ls_angle_diff >= 5) | (
rs_angle_diff >= 5) | (torso_angle_diff >= 5) else True
if similar_torso == False:
canvas = torch.from_numpy(
canvas.astype(np.float32) / 255.0)[
None,
]
return (canvas, similar_torso)
if similar_torso == False:
canvas = torch.from_numpy(canvas.astype(np.float32) / 255.0)[
None,
]
return (canvas, similar_torso)
#Removing the face points if existed
null_indices = [
@@ -1431,16 +1348,12 @@ class TRI3DPoseAdaption:
for i in null_indices:
input_keypoints[i] = [-1, -1]
all_x = [i[0] for i in input_keypoints if i[0] != -1]
min_width = min(all_x)
max_width = max(all_x)
if input_pose_type == "front_pose":
#flip horizontally
for i in range(len(input_keypoints)):
x, y = input_keypoints[i]
if input_keypoints[i] == [-1, -1]: continue
input_keypoints[i] = [(max_width - x) + min_width, y]
input_keypoints[i] = [input_width - x, y]
#Hands
if input_keypoints[4] == [-1, -1]:
@@ -1450,21 +1363,17 @@ class TRI3DPoseAdaption:
input_keypoints[88:] = ref_keypoints[
88:] #replace hands with reference hands
if garment_category not in [
"half_sleeve_garment", "full_sleeve_garment"
]:
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 2,
3) # rotate left elbow
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 2,
3) # rotate left elbow
input_keypoints = comfy_utils.scale(
ref_keypoints, input_keypoints, 2, 5, 2,
ref_keypoints, input_keypoints, 1, 2, 2,
3) #scaling w.r.t to shoulder to elbow ratio of ref pose
prev_lw = input_keypoints[4]
if garment_category != "full_sleeve_garment":
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 3,
4) #rotate left wrist
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 3,
4) #rotate left wrist
input_keypoints = comfy_utils.scale(
ref_keypoints, input_keypoints, 2, 3, 3,
4) #scaling w.r.t to elbow to wrist ratio of ref pose
@@ -1482,21 +1391,17 @@ class TRI3DPoseAdaption:
ref_keypoints, input_keypoints, 3, 4,
109) #scaling left hand w.r.t left wrist
if garment_category not in [
"half_sleeve_garment", "full_sleeve_garment"
]:
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 5,
6) #rotate right elbow
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 5,
6) #rotate right elbow
input_keypoints = comfy_utils.scale(
ref_keypoints, input_keypoints, 2, 5, 5,
ref_keypoints, input_keypoints, 1, 5, 5,
6) #scaling w.r.t to shoulder to elbow ratio of ref pose
prev_rw = input_keypoints[7]
if garment_category != "full_sleeve_garment":
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 6,
7) #rotate right wrist
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 6,
7) #rotate right wrist
input_keypoints = comfy_utils.scale(
ref_keypoints, input_keypoints, 5, 6, 6,
7) #scaling w.r.t to elbow to wrist ratio of ref pose
@@ -1515,35 +1420,26 @@ class TRI3DPoseAdaption:
88) #scaling right hand w.r.t right wrist
#legs
if garment_category not in ["trouser", "shorts"]:
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 8,
9) #rotate left knee
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 8,
9) #rotate left knee
input_keypoints = comfy_utils.scale(ref_keypoints, input_keypoints,
1, 8, 8, 9) #scale left knee
if garment_category != "trouser":
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 9,
10) #rotate left foot
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 9,
10) #rotate left foot
input_keypoints = comfy_utils.scale(
ref_keypoints, input_keypoints, 8, 9, 9,
10) #scaling w.r.t to knee to foot ratio of ref pose
if garment_category not in [
"half_sleeve_garment", "full_sleeve_garment"
]:
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 11,
12) #rotate right knee
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 11,
12) #rotate right knee
input_keypoints = comfy_utils.scale(ref_keypoints, input_keypoints,
1, 11, 11,
12) #scale right knee
if garment_category != "trouser":
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 12,
13) #rotate right foot
input_keypoints = comfy_utils.rotate(ref_keypoints,
input_keypoints, 12,
13) #rotate right foot
input_keypoints = comfy_utils.scale(
ref_keypoints, input_keypoints, 11, 12, 12,
13) #scaling w.r.t to knee to foot ratio of ref pose
@@ -1715,194 +1611,6 @@ class TRI3DFaceRecognise:
return ({"overlap (float)": s}, )
class FloatToImage:
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"value": ("FLOAT", {
"default": 0.0,
"min": 0.0,
"max": 1.0,
"step": 0.01
})
}
}
CATEGORY = "TRI3D"
RETURN_TYPES = ("IMAGE", )
FUNCTION = "load_image"
def load_image(self, value):
def render_float(float_input):
latex_expression = '$' + str(float_input) + '$'
import matplotlib.pyplot as plt
fig = plt.figure(
figsize=(10, 4)) # Dimensions of figsize are in inches
text = fig.text(
x=0.5, # x-coordinate to place the text
y=0.5, # y-coordinate to place the text
s=latex_expression,
horizontalalignment="center",
verticalalignment="center",
fontsize=32,
)
import tempfile
path_file_image_output = tempfile.NamedTemporaryFile(
).name + '.png'
plt.savefig(path_file_image_output)
import cv2
image = cv2.imread(path_file_image_output, cv2.IMREAD_COLOR)
import os
# os.unlink(path_file_image_output)
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
return image
def to_torch_image(image):
import numpy as np
import torch
image = image.astype(dtype=np.float32)
image /= 255.0
image = torch.from_numpy(image)[
None,
]
image = image.unsqueeze(0)
return image
image = render_float(float_input=value)
image = to_torch_image(image)
return image
class TRI3D_recolor_LAB_manual:
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"image_input": ("IMAGE", ),
"mask_input": ("IMAGE", ),
"factor_mean": ("FLOAT", {
"default": 1.0,
"min": 0.0,
"max": 10.0,
"step": 0.01
}),
"factor_sigma": ("FLOAT", {
"default": 1.0,
"min": 0.0,
"max": 10.0,
"step": 0.01
}),
}
}
RETURN_TYPES = ("IMAGE", )
FUNCTION = "recolor"
CATEGORY = "TRI3D"
def recolor(self, image_input, mask_input, factor_mean, factor_sigma):
def get_mu_sigma(array_input, mask_input):
import numpy as np
import math
array_input = array_input.astype(dtype=np.float32).flatten()
mask_input = mask_input.flatten()
sum = np.sum(mask_input)
mean = np.sum(array_input * mask_input) / sum
array_input -= mean
array_input *= mask_input
sigma = math.sqrt(np.sum(np.square(array_input)) / sum)
return mean, sigma
def do_recolor(image, mask, mean, sigma):
import cv2
import numpy as np
import math
image_original = image.copy()
mask = (mask > 127).astype(dtype=np.uint8)
sum = np.sum(mask.flatten())
for i in range(3):
image[:, :, i] *= mask
image = cv2.cvtColor(image, cv2.COLOR_BGR2LAB)
image = image.astype(dtype=np.float32)
for i in range(1):
mu_1, sigma_1 = get_mu_sigma(array_input=image[:, :, i],
mask_input=mask)
image[:, :, i] = (((image[:, :, i] - mu_1) / sigma_1) *
(sigma * sigma_1)) + (mean * mu_1)
image = np.clip(image, 0, 255)
image = image.astype(dtype=np.uint8)
image = cv2.cvtColor(image, cv2.COLOR_LAB2BGR)
for i in range(3):
image_original[:, :,
i] = (image_original[:, :, i] *
(1 - mask)) + (image[:, :, i] * mask)
return image_original
def from_torch_image(image):
image = image.squeeze().cpu().numpy() * 255.0
image = np.clip(image, 0, 255).astype(np.uint8)
return image
def to_torch_image(image):
import numpy as np
import torch
image = image.astype(dtype=np.float32)
image /= 255.0
image = torch.from_numpy(image)[
None,
]
image = image.unsqueeze(0)
return image
image = from_torch_image(image=image_input)
mask = from_torch_image(image=mask_input)[:, :, 0]
image_output = do_recolor(image=image,
mask=mask,
mean=factor_mean,
sigma=factor_sigma)
image_output = to_torch_image(image=image_output)
return image_output
class TRI3D_recolor_LAB:
@classmethod
@@ -2273,205 +1981,74 @@ class TRI3D_recolor:
return image_output
class TRI3D_image_mask_2_box:
def __init__(self):
pass
class FloatToImage:
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"image": ("IMAGE", ),
"mask": ("MASK", ),
},
}
FUNCTION = "run"
RETURN_TYPES = ("IMAGE", )
CATEGORY = "HackNode"
def run(self, image, mask):
image = from_torch_image(image)
mask = from_torch_image(mask)
image = extract_box_from_image(image, mask)
image = to_torch_image(image)
return image
class TRI3D_image_mask_box_2_image:
def __init__(self):
pass
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"image": ("IMAGE", ),
"mask": ("MASK", ),
"box": ("IMAGE", ),
},
}
FUNCTION = "run"
RETURN_TYPES = ("IMAGE", )
CATEGORY = "HackNode"
def run(self, image, mask, box):
image = from_torch_image(image)
mask = from_torch_image(mask)
box = from_torch_image(box)
image = stitch_back_box_to_image(image, mask, box)
image = to_torch_image(image)
return image
class TRI3D_clipdrop_bgremove_api:
def __init__(self):
pass
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"image": ("IMAGE", )
},
}
FUNCTION = "run"
RETURN_TYPES = ("IMAGE", )
CATEGORY = "TRI3D"
def run(self, image):
image = from_torch_image(image)
print(image.shape)
_, enc_image = cv2.imencode('.jpg', image)
from dotenv import load_dotenv
load_dotenv()
CLIPDROP_API_KEY = os.getenv('CLIPDROP_API_KEY')
# CLIPDROP_API_KEY = os.environ.get('CLIPDROP_API_KEY')
r = requests.post('https://clipdrop-api.co/remove-background/v1',
files={
'image_file':
("mannequin.jpg", enc_image.tobytes(),
'image/jpeg'),
},
headers={'x-api-key': CLIPDROP_API_KEY})
if (r.ok):
pass
else:
r.raise_for_status()
output = np.array(Image.open(io.BytesIO(r.content)))
output = cv2.cvtColor(output, cv2.COLOR_BGRA2RGBA)
# print("decoded output",output.shape)
# mask = output[:,:,3]
# output = output[:,:,0:3]
output = torch.from_numpy(output.astype(np.float32) / 255.0)[
None,
]
# print("converted image to torch")
# print(output.shape)
# mask = torch.from_numpy(mask.astype(np.float32)/255.0)[None,]
# print("converted mask to torch")
# print(mask.shape)
return output,
class TRI3DAdjustNeck:
def __init__(self):
pass
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"posemap_json_file_path": ("STRING", {
"default":
"dwpose/keypoints/input.json"
}),
# "age_group" :(["10-12 yrs"],{"default":"10-12 yrs"}),
"neck_shoulder_ratio": ("FLOAT", {
"default": 0.7,
"value": ("FLOAT", {
"default": 0.0,
"min": 0.0,
"max": 1.0,
"step": 0.01
}),
"save_json_file_path": ("STRING", {
"default":
"dwpose/keypoints/output.json"
})
},
}
}
FUNCTION = "run"
RETURN_TYPES = ("IMAGE", "STRING")
CATEGORY = "TRI3D"
RETURN_TYPES = ("IMAGE", )
FUNCTION = "load_image"
def run(self, posemap_json_file_path, neck_shoulder_ratio,
save_json_file_path):
from .dwpose import comfy_utils
def load_image(self, value):
# age_to_ratio = {"10-12 yrs": 0.65}
def render_float(float_input):
latex_expression = '$' + str(float_input) + '$'
import matplotlib.pyplot as plt
input_pose = json.load(open(posemap_json_file_path))
input_height = input_pose['height']
input_width = input_pose['width']
input_keypoints = input_pose['keypoints']
fig = plt.figure(
figsize=(10, 4)) # Dimensions of figsize are in inches
ref_x1, ref_y1 = input_keypoints[2] #left shoulder
ref_x2, ref_y2 = input_keypoints[5] #right_shoulder
text = fig.text(
x=0.5, # x-coordinate to place the text
y=0.5, # y-coordinate to place the text
s=latex_expression,
horizontalalignment="center",
verticalalignment="center",
fontsize=32,
)
x1, y1 = input_keypoints[1] #neck
x2, y2 = input_keypoints[0] #nose
prev_nose = input_keypoints[0]
import tempfile
path_file_image_output = tempfile.NamedTemporaryFile(
).name + '.png'
ref_len = np.linalg.norm(
np.array([ref_x1, ref_y1]) - np.array(
[ref_x2, ref_y2])) #ref body part length i.e. shoulder length
targ_len = np.linalg.norm(np.array([x1, y1]) - np.array([
x2, y2
])) #targ body part length i.e. neck length - neck to nose length
plt.savefig(path_file_image_output)
input_targ_ref_len = targ_len / ref_len #neck to shoulder ratio
print("neck to shoulder ratio found", input_targ_ref_len)
print("neck to shoulder ratio target", neck_shoulder_ratio)
#scale the coords
# scale = age_to_ratio[age_group] / input_targ_ref_len
scale = neck_shoulder_ratio / input_targ_ref_len
import cv2
image = cv2.imread(path_file_image_output, cv2.IMREAD_COLOR)
x2_scaled = x1 + (x2 - x1) * scale
y2_scaled = y1 + (y2 - y1) * scale
input_keypoints[0] = [x2_scaled, y2_scaled]
import os
# os.unlink(path_file_image_output)
#changing face points to w.r.t to new nose point after rotation
input_keypoints[14:18] = comfy_utils.move(prev_nose,
input_keypoints[0],
input_keypoints[14:18])
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
return image
canvas = np.zeros(shape=(input_height, input_width, 3), dtype=np.uint8)
canvas = comfy_utils.draw_bodypose(canvas, input_keypoints)
canvas = comfy_utils.draw_handpose(
canvas, input_keypoints[88:109]) #right hand
canvas = comfy_utils.draw_handpose(canvas,
input_keypoints[109:]) #left hand
canvas = torch.from_numpy(canvas.astype(np.float32) / 255.0)[
None,
]
def to_torch_image(image):
output_pose = {
"height": input_height,
"width": input_width,
"keypoints": input_keypoints
}
cur_file_dir = os.path.dirname(os.path.realpath(__file__))
save_json_file_path = os.path.join(cur_file_dir, save_json_file_path)
json.dump(output_pose, open(save_json_file_path, 'w'))
return (canvas, save_json_file_path)
import numpy as np
import torch
image = image.astype(dtype=np.float32)
image /= 255.0
image = torch.from_numpy(image)[
None,
]
image = image.unsqueeze(0)
return image
image = render_float(float_input=value)
image = to_torch_image(image)
return image
# A dictionary that contains all nodes you want to export with their names
@@ -2493,14 +2070,9 @@ NODE_CLASS_MAPPINGS = {
"tri3d-recolor-mask": TRI3D_recolor,
"tri3d-recolor-mask-LAB_space": TRI3D_recolor_LAB,
"tri3d-recolor-mask-RGB_space": TRI3D_recolor_RGB,
"tri3d-image-mask-2-box": TRI3D_image_mask_2_box,
"tri3d-image-mask-box-2-image": TRI3D_image_mask_box_2_image,
"tri3d-clipdrop-bgremove-api": TRI3D_clipdrop_bgremove_api,
"tri3d-adjust-neck": TRI3DAdjustNeck,
"tri3d_recolor_lab_manual": TRI3D_recolor_LAB_manual,
}
VERSION = "2.4.2"
VERSION = "1.7.0"
# A dictionary that contains the friendly/humanly readable titles for the nodes
NODE_DISPLAY_NAME_MAPPINGS = {
"tri3d-atr-parse-batch": "ATR Parse Batch" + " v" + VERSION,
@@ -2521,9 +2093,4 @@ NODE_DISPLAY_NAME_MAPPINGS = {
"tri3d-recolor-mask": "Recolor mask HSV space" + " v" + VERSION,
"tri3d-recolor-mask-LAB_space": "Recolor mask LAB space" + " v" + VERSION,
"tri3d-recolor-mask-RGB_space": "Recolor mask RGB space" + " v" + VERSION,
"tri3d--image-mask-2-box": "Extract box from image" + " v" + VERSION,
"tri3d-image-mask-box-2-image": "Stitch box to image" + " v" + VERSION,
"tri3d-clipdrop-bgremove-api": "RemBG ClipDrop" + " v" + VERSION,
"tri3d-adjust-neck": "Adjust Neck" + " v" + VERSION,
"tri3d_recolor_lab_manual": "Adjust color manually" + " v" + VERSION,
}
+2 -2
View File
@@ -67,11 +67,11 @@
-1
],
[
279,
246,
74
],
[
246,
279,
74
],
[
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -1,526 +0,0 @@
{
"height": 512,
"width": 512,
"keypoints": [
[
259,
75
],
[
261,
127
],
[
222,
133
],
[
208,
196
],
[
199,
253
],
[
296,
132
],
[
316,
192
],
[
333,
246
],
[
241,
249
],
[
242,
348
],
[
255,
448
],
[
277,
248
],
[
296,
344
],
[
322,
448
],
[
251,
69
],
[
268,
67
],
[
237,
77
],
[
280,
73
],
[
239,
71
],
[
239,
77
],
[
241,
81
],
[
243,
87
],
[
243,
91
],
[
247,
95
],
[
251,
96
],
[
255,
100
],
[
261,
100
],
[
264,
98
],
[
270,
96
],
[
272,
93
],
[
276,
89
],
[
278,
83
],
[
278,
79
],
[
278,
73
],
[
278,
69
],
[
243,
66
],
[
245,
66
],
[
249,
64
],
[
251,
64
],
[
255,
64
],
[
262,
64
],
[
266,
62
],
[
268,
62
],
[
272,
62
],
[
274,
64
],
[
259,
69
],
[
259,
71
],
[
259,
73
],
[
261,
77
],
[
255,
79
],
[
259,
79
],
[
261,
79
],
[
262,
79
],
[
264,
79
],
[
247,
69
],
[
249,
69
],
[
251,
67
],
[
255,
69
],
[
251,
69
],
[
249,
69
],
[
264,
69
],
[
266,
67
],
[
268,
67
],
[
272,
67
],
[
268,
69
],
[
266,
69
],
[
251,
87
],
[
255,
83
],
[
259,
83
],
[
261,
83
],
[
262,
83
],
[
264,
83
],
[
268,
85
],
[
266,
87
],
[
264,
91
],
[
261,
91
],
[
257,
91
],
[
253,
89
],
[
251,
87
],
[
255,
85
],
[
261,
85
],
[
264,
85
],
[
268,
85
],
[
264,
87
],
[
261,
89
],
[
255,
89
],
[
251,
69
],
[
268,
67
],
[
333,
249
],
[
328,
255
],
[
324,
262
],
[
322,
270
],
[
320,
278
],
[
331,
270
],
[
329,
278
],
[
324,
278
],
[
322,
276
],
[
335,
272
],
[
329,
278
],
[
326,
278
],
[
322,
276
],
[
337,
272
],
[
331,
278
],
[
328,
278
],
[
326,
276
],
[
337,
270
],
[
333,
276
],
[
329,
276
],
[
328,
276
],
[
199,
256
],
[
203,
263
],
[
207,
267
],
[
209,
275
],
[
209,
283
],
[
199,
277
],
[
203,
285
],
[
207,
283
],
[
211,
281
],
[
197,
279
],
[
201,
285
],
[
207,
283
],
[
209,
281
],
[
196,
277
],
[
201,
283
],
[
205,
283
],
[
209,
281
],
[
197,
277
],
[
201,
281
],
[
203,
281
],
[
205,
279
]
]
}
-526
View File
@@ -1,526 +0,0 @@
{
"height": 512,
"width": 512,
"keypoints": [
[
-1,
-1
],
[
264,
125
],
[
298,
125
],
[
310,
193
],
[
314,
254
],
[
230,
125
],
[
216,
192
],
[
211,
252
],
[
286,
244
],
[
292,
339
],
[
294,
448
],
[
240,
247
],
[
242,
336
],
[
246,
444
],
[
-1,
-1
],
[
-1,
-1
],
[
279,
74
],
[
246,
74
],
[
240,
66
],
[
240,
72
],
[
240,
76
],
[
242,
82
],
[
242,
86
],
[
246,
88
],
[
248,
92
],
[
252,
94
],
[
258,
94
],
[
262,
94
],
[
266,
94
],
[
270,
92
],
[
274,
90
],
[
276,
86
],
[
278,
82
],
[
280,
78
],
[
282,
74
],
[
248,
58
],
[
250,
56
],
[
252,
56
],
[
256,
56
],
[
260,
56
],
[
268,
58
],
[
272,
58
],
[
274,
60
],
[
278,
62
],
[
280,
64
],
[
264,
64
],
[
262,
66
],
[
262,
68
],
[
262,
68
],
[
258,
74
],
[
258,
74
],
[
262,
74
],
[
264,
74
],
[
266,
74
],
[
250,
62
],
[
252,
62
],
[
256,
62
],
[
258,
62
],
[
254,
64
],
[
252,
62
],
[
268,
64
],
[
272,
64
],
[
274,
64
],
[
276,
68
],
[
274,
68
],
[
270,
66
],
[
252,
80
],
[
256,
78
],
[
258,
78
],
[
260,
78
],
[
262,
78
],
[
266,
80
],
[
268,
82
],
[
266,
84
],
[
262,
84
],
[
260,
84
],
[
256,
84
],
[
254,
82
],
[
252,
80
],
[
256,
78
],
[
260,
78
],
[
264,
80
],
[
268,
82
],
[
264,
84
],
[
260,
82
],
[
256,
82
],
[
254,
62
],
[
272,
64
],
[
211,
255
],
[
221,
262
],
[
226,
268
],
[
229,
272
],
[
232,
278
],
[
217,
279
],
[
223,
286
],
[
229,
288
],
[
232,
291
],
[
214,
281
],
[
221,
288
],
[
223,
291
],
[
229,
291
],
[
211,
281
],
[
217,
286
],
[
223,
288
],
[
223,
291
],
[
211,
281
],
[
214,
286
],
[
217,
288
],
[
221,
288
],
[
314.2191598676356,
257
],
[
308.2191598676356,
262
],
[
306.2191598676356,
266
],
[
303.2191598676356,
270
],
[
301.2191598676356,
276
],
[
312.2191598676356,
279
],
[
311.2191598676356,
284
],
[
308.2191598676356,
290
],
[
303.2191598676356,
292
],
[
313.2191598676356,
279
],
[
312.2191598676356,
284
],
[
311.2191598676356,
290
],
[
307.2191598676356,
292
],
[
314.2191598676356,
279
],
[
313.2191598676356,
284
],
[
312.2191598676356,
289
],
[
311.2191598676356,
293
],
[
317.2191598676356,
279
],
[
314.2191598676356,
283
],
[
313.2191598676356,
287
],
[
312.2191598676356,
290
]
]
}
-526
View File
@@ -1,526 +0,0 @@
{
"height": 512,
"width": 512,
"keypoints": [
[
-1,
-1
],
[
252,
130
],
[
302,
130
],
[
316,
213
],
[
323,
284
],
[
202,
130
],
[
191,
211
],
[
187,
282
],
[
282,
278
],
[
280,
380
],
[
280,
484
],
[
222,
278
],
[
226,
382
],
[
222,
480
],
[
-1,
-1
],
[
-1,
-1
],
[
286,
72
],
[
227,
73
],
[
257,
59
],
[
257,
63
],
[
257,
65
],
[
253,
67
],
[
-2,
-2
],
[
-2,
-2
],
[
-2,
-2
],
[
-2,
-2
],
[
-2,
-2
],
[
279,
79
],
[
-2,
-2
],
[
243,
67
],
[
253,
71
],
[
257,
69
],
[
-2,
-2
],
[
-2,
-2
],
[
-2,
-2
],
[
275,
61
],
[
279,
59
],
[
255,
55
],
[
-2,
-2
],
[
-2,
-2
],
[
255,
59
],
[
255,
59
],
[
255,
59
],
[
255,
57
],
[
255,
57
],
[
255,
59
],
[
255,
59
],
[
255,
61
],
[
255,
63
],
[
277,
67
],
[
275,
67
],
[
277,
67
],
[
277,
67
],
[
277,
67
],
[
255,
59
],
[
255,
57
],
[
257,
59
],
[
257,
61
],
[
257,
59
],
[
255,
59
],
[
255,
59
],
[
257,
59
],
[
257,
59
],
[
-2,
-2
],
[
255,
59
],
[
-2,
-2
],
[
-2,
-2
],
[
-2,
-2
],
[
-2,
-2
],
[
279,
71
],
[
243,
67
],
[
279,
73
],
[
277,
71
],
[
279,
71
],
[
-2,
-2
],
[
-2,
-2
],
[
-2,
-2
],
[
-2,
-2
],
[
-2,
-2
],
[
-2,
-2
],
[
279,
69
],
[
279,
71
],
[
277,
71
],
[
279,
71
],
[
277,
69
],
[
-2,
-2
],
[
250,
56
],
[
263,
63
],
[
186.65255255416977,
285
],
[
196.65255255416977,
291
],
[
199.65255255416977,
298
],
[
201.65255255416977,
306
],
[
201.65255255416977,
310
],
[
194.65255255416977,
308
],
[
196.65255255416977,
312
],
[
199.65255255416977,
316
],
[
203.65255255416977,
318
],
[
190.65255255416977,
308
],
[
192.65255255416977,
314
],
[
194.65255255416977,
318
],
[
201.65255255416977,
320
],
[
186.65255255416977,
308
],
[
186.65255255416977,
314
],
[
190.65255255416977,
318
],
[
196.65255255416977,
320
],
[
182.65255255416977,
308
],
[
184.65255255416977,
312
],
[
186.65255255416977,
316
],
[
190.65255255416977,
318
],
[
323,
287
],
[
313,
298
],
[
310,
305
],
[
310,
312
],
[
310,
317
],
[
320,
315
],
[
317,
319
],
[
313,
324
],
[
308,
326
],
[
322,
315
],
[
320,
322
],
[
315,
326
],
[
308,
326
],
[
324,
317
],
[
320,
322
],
[
315,
326
],
[
310,
326
],
[
327,
317
],
[
324,
322
],
[
320,
324
],
[
315,
326
]
]
}
-526
View File
@@ -1,526 +0,0 @@
{
"height": 512,
"width": 512,
"keypoints": [
[
-1,
-1
],
[
254,
118
],
[
292,
118
],
[
306,
194
],
[
310,
262
],
[
216,
118
],
[
200,
193
],
[
195,
260
],
[
278,
251
],
[
286,
357
],
[
285.99326159010275,
462.45102588957826
],
[
228,
254
],
[
230,
353
],
[
231.99326159010275,
458.45102588957826
],
[
-1,
-1
],
[
-1,
-1
],
[
277,
62
],
[
241,
62
],
[
234,
53
],
[
234,
60
],
[
234,
64
],
[
236,
71
],
[
236,
75
],
[
241,
77
],
[
243,
82
],
[
247,
84
],
[
254,
84
],
[
258,
84
],
[
263,
84
],
[
267,
82
],
[
272,
80
],
[
274,
75
],
[
276,
71
],
[
278,
66
],
[
281,
62
],
[
243,
44
],
[
245,
42
],
[
247,
42
],
[
252,
42
],
[
256,
42
],
[
265,
44
],
[
269,
44
],
[
272,
46
],
[
276,
49
],
[
278,
51
],
[
261,
51
],
[
258,
53
],
[
258,
55
],
[
258,
55
],
[
254,
62
],
[
254,
62
],
[
258,
62
],
[
261,
62
],
[
263,
62
],
[
245,
49
],
[
247,
49
],
[
252,
49
],
[
254,
49
],
[
249,
51
],
[
247,
49
],
[
265,
51
],
[
269,
51
],
[
272,
51
],
[
274,
55
],
[
272,
55
],
[
267,
53
],
[
247,
69
],
[
252,
66
],
[
254,
66
],
[
256,
66
],
[
258,
66
],
[
263,
69
],
[
265,
71
],
[
263,
73
],
[
258,
73
],
[
256,
73
],
[
252,
73
],
[
249,
71
],
[
247,
69
],
[
252,
66
],
[
256,
66
],
[
261,
69
],
[
265,
71
],
[
261,
73
],
[
256,
71
],
[
252,
71
],
[
249,
49
],
[
269,
51
],
[
195,
262
],
[
206,
270
],
[
210,
276
],
[
213,
280
],
[
216,
285
],
[
201,
287
],
[
208,
294
],
[
213,
296
],
[
216,
299
],
[
197,
289
],
[
206,
296
],
[
208,
299
],
[
213,
299
],
[
195,
289
],
[
201,
294
],
[
208,
296
],
[
208,
299
],
[
195,
289
],
[
197,
294
],
[
201,
296
],
[
206,
296
],
[
310,
265
],
[
304,
270
],
[
302,
274
],
[
299,
279
],
[
297,
284
],
[
308,
287
],
[
307,
292
],
[
304,
299
],
[
299,
301
],
[
309,
287
],
[
308,
292
],
[
307,
299
],
[
303,
301
],
[
310,
287
],
[
309,
292
],
[
308,
298
],
[
307,
302
],
[
313,
287
],
[
310,
291
],
[
309,
296
],
[
308,
299
]
]
}
-526
View File
@@ -1,526 +0,0 @@
{
"height": 512,
"width": 512,
"keypoints": [
[
234,
85
],
[
264,
125
],
[
298,
125
],
[
310,
193
],
[
314,
254
],
[
230,
125
],
[
216,
192
],
[
211,
252
],
[
286,
244
],
[
292,
339
],
[
294,
448
],
[
240,
247
],
[
242,
336
],
[
246,
444
],
[
-1,
-1
],
[
238,
72
],
[
-1,
-1
],
[
262,
70
],
[
212,
82
],
[
212,
88
],
[
212,
92
],
[
214,
98
],
[
214,
102
],
[
218,
104
],
[
220,
108
],
[
224,
110
],
[
230,
110
],
[
234,
110
],
[
238,
110
],
[
242,
108
],
[
246,
106
],
[
248,
102
],
[
250,
98
],
[
252,
94
],
[
254,
90
],
[
220,
74
],
[
222,
72
],
[
224,
72
],
[
228,
72
],
[
232,
72
],
[
240,
74
],
[
244,
74
],
[
246,
76
],
[
250,
78
],
[
252,
80
],
[
236,
80
],
[
234,
82
],
[
232,
84
],
[
255,
85
],
[
230,
90
],
[
230,
90
],
[
234,
90
],
[
236,
90
],
[
238,
90
],
[
222,
78
],
[
224,
78
],
[
228,
78
],
[
230,
78
],
[
226,
80
],
[
224,
78
],
[
240,
80
],
[
244,
80
],
[
246,
80
],
[
248,
84
],
[
246,
84
],
[
242,
82
],
[
224,
96
],
[
228,
94
],
[
230,
94
],
[
232,
94
],
[
234,
94
],
[
238,
96
],
[
240,
98
],
[
238,
100
],
[
234,
100
],
[
232,
100
],
[
228,
100
],
[
226,
98
],
[
224,
96
],
[
228,
94
],
[
232,
94
],
[
236,
96
],
[
240,
98
],
[
236,
100
],
[
232,
98
],
[
228,
98
],
[
226,
78
],
[
244,
80
],
[
211,
255
],
[
221,
262
],
[
226,
268
],
[
229,
272
],
[
232,
278
],
[
217,
279
],
[
223,
286
],
[
229,
288
],
[
232,
291
],
[
214,
281
],
[
221,
288
],
[
223,
291
],
[
229,
291
],
[
211,
281
],
[
217,
286
],
[
223,
288
],
[
223,
291
],
[
211,
281
],
[
214,
286
],
[
217,
288
],
[
221,
288
],
[
314,
257
],
[
308,
262
],
[
306,
266
],
[
303,
270
],
[
301,
276
],
[
312,
279
],
[
311,
284
],
[
308,
290
],
[
303,
292
],
[
313,
279
],
[
312,
284
],
[
311,
290
],
[
307,
292
],
[
314,
279
],
[
313,
284
],
[
312,
289
],
[
311,
293
],
[
317,
279
],
[
314,
283
],
[
313,
287
],
[
312,
290
]
]
}
-526
View File
@@ -1,526 +0,0 @@
{
"height": 512,
"width": 512,
"keypoints": [
[
298,
85
],
[
264,
125
],
[
298,
125
],
[
310,
193
],
[
314,
254
],
[
230,
125
],
[
216,
192
],
[
211,
252
],
[
286,
244
],
[
292,
339
],
[
294,
448
],
[
240,
247
],
[
242,
336
],
[
246,
444
],
[
293.3658724790831,
75
],
[
-1,
-1
],
[
270.3658724790831,
73
],
[
-1,
-1
],
[
276.3658724790831,
82
],
[
276.3658724790831,
88
],
[
276.3658724790831,
92
],
[
278.3658724790831,
98
],
[
278.3658724790831,
102
],
[
282.3658724790831,
104
],
[
284.3658724790831,
108
],
[
288.3658724790831,
110
],
[
294.3658724790831,
110
],
[
298.3658724790831,
110
],
[
302.3658724790831,
110
],
[
306.3658724790831,
108
],
[
310.3658724790831,
106
],
[
312.3658724790831,
102
],
[
314.3658724790831,
98
],
[
316.3658724790831,
94
],
[
318.3658724790831,
90
],
[
284.3658724790831,
74
],
[
286.3658724790831,
72
],
[
288.3658724790831,
72
],
[
292.3658724790831,
72
],
[
296.3658724790831,
72
],
[
304.3658724790831,
74
],
[
308.3658724790831,
74
],
[
310.3658724790831,
76
],
[
314.3658724790831,
78
],
[
316.3658724790831,
80
],
[
300.3658724790831,
80
],
[
298.3658724790831,
82
],
[
296.3658724790831,
84
],
[
319.3658724790831,
85
],
[
294.3658724790831,
90
],
[
294.3658724790831,
90
],
[
298.3658724790831,
90
],
[
300.3658724790831,
90
],
[
302.3658724790831,
90
],
[
286.3658724790831,
78
],
[
288.3658724790831,
78
],
[
292.3658724790831,
78
],
[
294.3658724790831,
78
],
[
290.3658724790831,
80
],
[
288.3658724790831,
78
],
[
304.3658724790831,
80
],
[
308.3658724790831,
80
],
[
310.3658724790831,
80
],
[
312.3658724790831,
84
],
[
310.3658724790831,
84
],
[
306.3658724790831,
82
],
[
288.3658724790831,
96
],
[
292.3658724790831,
94
],
[
294.3658724790831,
94
],
[
296.3658724790831,
94
],
[
298.3658724790831,
94
],
[
302.3658724790831,
96
],
[
304.3658724790831,
98
],
[
302.3658724790831,
100
],
[
298.3658724790831,
100
],
[
296.3658724790831,
100
],
[
292.3658724790831,
100
],
[
290.3658724790831,
98
],
[
288.3658724790831,
96
],
[
292.3658724790831,
94
],
[
296.3658724790831,
94
],
[
300.3658724790831,
96
],
[
304.3658724790831,
98
],
[
300.3658724790831,
100
],
[
296.3658724790831,
98
],
[
292.3658724790831,
98
],
[
290.3658724790831,
78
],
[
308.3658724790831,
80
],
[
211,
255
],
[
221,
262
],
[
226,
268
],
[
229,
272
],
[
232,
278
],
[
217,
279
],
[
223,
286
],
[
229,
288
],
[
232,
291
],
[
214,
281
],
[
221,
288
],
[
223,
291
],
[
229,
291
],
[
211,
281
],
[
217,
286
],
[
223,
288
],
[
223,
291
],
[
211,
281
],
[
214,
286
],
[
217,
288
],
[
221,
288
],
[
314,
257
],
[
308,
262
],
[
306,
266
],
[
303,
270
],
[
301,
276
],
[
312,
279
],
[
311,
284
],
[
308,
290
],
[
303,
292
],
[
313,
279
],
[
312,
284
],
[
311,
290
],
[
307,
292
],
[
314,
279
],
[
313,
284
],
[
312,
289
],
[
311,
293
],
[
317,
279
],
[
314,
283
],
[
313,
287
],
[
312,
290
]
]
}