= Detector()
teddy #detections = teddy.detect_image('sample_data/sample1.png', viz=True)
#pose_output = teddy.detect_video("/srv/choreo/Einstein.mp4", start_seconds=6310, end_seconds=7288, write_images=True, images_too=False)
pifpafpose_detector
Pose Detector class based on Open PifPaf and some pose modification tools
Detector
Detector ()
Given a still image (or video frame), finds poses.
Attributes:
device: PyTorch computing resource (GPU or CPU)
net: Pose detection neural network model
processor: Pose detection image processor
teddy.init_model()
= 25
FPS !ffmpeg -y -framerate $FPS -pattern_type glob -i 'video_folder/*.png' -strict '-2' -c:v libx264 -vf "fps=$FPS" -pix_fmt yuv420p Einstein_ballet_pf.mp4
try:
= Detector()
teddy = teddy.detect_image('sample_data/sample1.png')
detections print(detections[0])
except:
print("Unable to instantiate a detector on your system. Do you have PyTorch with CUDA enabled?")