helblazer811 / ManimML

ManimML is a project focused on providing animations and visualizations of common machine learning concepts with the Manim Community Library.
MIT License
2.27k stars 136 forks source link

Camera Moving Forward Pass #18

Open helblazer811 opened 1 year ago

helblazer811 commented 1 year ago

It would be cool to have an animation where the camera flies with the forward pass animation. This would be especially valuable for visualizing very king architectures.

helblazer811 commented 1 year ago

This could be done in the NeuralNetwork class by basically constructing a forward pass animation but also adding animations to keep the camera over where the currently active animations are happening. The difficulty of this in edge cases is figuring out what layers the animation spans. By default each animation will only cause changes in the preceding and subsequent layers. This would be good default behavior for this feature.

helblazer811 commented 1 year ago

I could figure out the run time of each layer animation and linearly move the camera center between layers. Also make the horizontal field of view the maximum width of three adjacent layers, and make the vertical field the maximum width of a layer, also with some additional buffer.