facebookresearch / AnimatedDrawings

Code to accompany "A Method for Animating Children's Drawings of the Human Figure"
MIT License
10.31k stars 885 forks source link

A rendering performance issue #252

Closed Andy-Ren closed 6 months ago

Andy-Ren commented 7 months ago

Why did it take 18s from calling render.start, but the log shows that the actual rendering time was only 3s? What was the other 15s of lead time used for? Is it for loading the model? Is it possible to keep it resident in memory to improve rendering speed?

hjessmith commented 7 months ago

Hi @Andy-Ren

It's not loading the model, as the models are used prior to the call to render.start. Part of the time is used to generate the character model, part to generate the frames, and part to generate the animation from the still frames with FFMPEG. It's a bit hard to know exactly what's taking up the time without seeing the logs.

Andy-Ren commented 7 months ago

thks,Is there a way to optimize? For example, using parallel computing

hjessmith commented 7 months ago

Without seeing the log and knowing exactly why it's taking so long for you, it's hard to know whether parallelizing would speed things up. It would probably be a bit of work to rewrite things too.