torinmb / mediapipe-touchdesigner

GPU Accelerated MediaPipe Plugin for TouchDesigner
MIT License
637 stars 31 forks source link

Vertical Format? #85

Closed burritotrex closed 4 months ago

burritotrex commented 4 months ago

Hey, thanks for your great work ! I try to integrate the mediapipe in my project, but since my use case needs vertical format input/output I am trying to change the width and height parameters, but so far unsuccessfully. If I switch the width and height everywhere it seems to break apart - the detections stop working, the image is put to the top left and is not filling the container anymore.

How could I achieve this?

EDIT: I just used a FLIP top on my input before the syphonspoutout and a FLIP top after the MediaPipe for now.

domisjustanumber commented 4 months ago

Hey @burritotrex I think you're on the right track - the AI model itself is trained on landscape webcam type images, so you'll get the best tracking accuracy if you feed it that size and shape images.

You could experiment with boxing the content (black bars on each side of the vertical image to fill out a horizontal frame) to see if that gets you any better or different results. Or the flip and flop may also work. I'd try both to see which works best.