AliaksandrSiarohin / video-preprocessing

516 stars 135 forks source link

Inserting cropped video back in the original #41

Closed leg0m4n closed 2 years ago

leg0m4n commented 2 years ago

Hi, Aliaksandr! Thank you for your scripts, they are super useful in my research!

I intend to do some changes to the cropped face images and then insert them back into the original, do you have any recommendations on how to better approach this task without losing quality and mismatch problems? Do you think doing everything in reverse in the crop script will be enough?

leg0m4n commented 2 years ago

Yes, figured it out, I was confused about tube_bbox at first - basically it's just [minX1, minY1, maxX2, maxY2] across all frames with iou taken into account. So we crop the same bbox across all frames. Which means if we want to insert cropped frames back into the orignal video, you just simply us this tube_bbox coords again.