File size: 528 Bytes
3366cca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#from annotator.dwpose import DWposeDetector
from easy_dwpose import DWposeDetector
from PIL import Image


device = "cpu"
dwpose = DWposeDetector(device=device)

for n in range(1, 46):
    pil_image = Image.open("videos/dance2/frame ("+str(n)+").png").convert("RGB")
    #skeleton = dwpose(pil_image, output_type="np", include_hands=True, include_face=False)

    out_img, pose = dwpose(pil_image, include_hands=True, include_face=True)

    print(pose['bodies'])
    out_img.save('videos/dance'+str(n)+'.png')