trrahul / densepose-video

Code to run densepose on video with detectron. https://github.com/facebookresearch/Detectron
GNU General Public License v3.0
62 stars 18 forks source link

Have you try to write video via opencv? #8

Closed JustinhoCHN closed 5 years ago

JustinhoCHN commented 6 years ago

I've tried to write frames which already transfered with texture to video using opencv, but when I defined the video encoding format as 'MJPG' like:

cv2.VideoWriter_fourcc(*'MJPG')

it'll raise error like this:

TypeError: Expected single character string for argument 'c1'

Have you met with this error?

Thanks you for your implementation.

trrahul commented 6 years ago

Yes, I have. I was not able to fix it, so I used ffmpeg to create video from generated frames.

JustinhoCHN commented 6 years ago

So we still have to save those frames to disk and then call the ffmpeg to make the video? If we do that all in memory, maybe we can save the i/o time cost. @trrahul

trrahul commented 6 years ago

Yes. But i/o does not take a lot of time compared to the time taken by the inference process. It is very very less on an SSD.

JustinhoCHN commented 5 years ago

Got it , thanks your implementation again.