mirror of
https://github.com/helblazer811/ManimML.git
synced 2025-06-28 09:47:34 +08:00
Readme changes
This commit is contained in:

committed by
Alec Helbling

parent
e8857acc83
commit
a7c43d0f8b
26
Readme.md
26
Readme.md
@ -0,0 +1,26 @@
|
|||||||
|
# Manim Machine Learning
|
||||||
|
|
||||||
|
Manim Machine Learning is a project focused on providing animations and visualizations of common machine learning concepts with the [Manim Community Library](https://www.manim.community/). We want this project to be a compilation of primitive visualizations that can be easily combined to create videos about complex machine learning concepts.
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
First you will want to install manim. Then you can run the following to generate the example videos.
|
||||||
|
|
||||||
|
`make video`
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
`manim -pqh src/vae.py VAEScene`
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
### Variational Autoencoders
|
||||||
|
|
||||||
|
This is a visualization of a Variational Autoencoder. You can also find a video form in examples/
|
||||||
|
|
||||||
|
<img src="examples/VAEImage.png" width="600">
|
||||||
|
|
||||||
|
### Neural Networks
|
||||||
|
|
||||||
|
This is a visualization of a Neural Network. You can find a video animation of a neural network in examples/
|
||||||
|
|
||||||
|
<img src="examples/NNImage.png" width="600">
|
||||||
|
BIN
examples/NNImage.png
Normal file
BIN
examples/NNImage.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 117 KiB |
BIN
examples/VAEImage.png
Normal file
BIN
examples/VAEImage.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 86 KiB |
@ -134,6 +134,11 @@ class NeuralNetwork(VGroup):
|
|||||||
|
|
||||||
return animation_group
|
return animation_group
|
||||||
|
|
||||||
|
config.pixel_height = 720
|
||||||
|
config.pixel_width = 1280
|
||||||
|
config.frame_height = 6.0
|
||||||
|
config.frame_width = 6.0
|
||||||
|
|
||||||
class TestNeuralNetworkScene(Scene):
|
class TestNeuralNetworkScene(Scene):
|
||||||
"""Test Scene for the Neural Network"""
|
"""Test Scene for the Neural Network"""
|
||||||
|
|
||||||
|
15
src/vae.py
15
src/vae.py
@ -297,3 +297,18 @@ class VAEScene(Scene):
|
|||||||
interpolation_images = mnist_image_handler.interpolation_images
|
interpolation_images = mnist_image_handler.interpolation_images
|
||||||
interpolation_animation = vae.make_interpolation_animation(interpolation_images)
|
interpolation_animation = vae.make_interpolation_animation(interpolation_images)
|
||||||
self.play(interpolation_animation)
|
self.play(interpolation_animation)
|
||||||
|
|
||||||
|
class VAEImage(Scene):
|
||||||
|
|
||||||
|
def construct(self):
|
||||||
|
# Set Scene config
|
||||||
|
vae = VariationalAutoencoder()
|
||||||
|
mnist_image_handler = MNISTImageHandler()
|
||||||
|
image_pair = mnist_image_handler.image_pairs[3]
|
||||||
|
vae.move_to(ORIGIN)
|
||||||
|
vae.scale(1.3)
|
||||||
|
self.play(Create(vae), run_time=3)
|
||||||
|
# Make a forward pass animation
|
||||||
|
forward_pass_animation = vae.make_forward_pass_animation(image_pair)
|
||||||
|
self.play(forward_pass_animation)
|
||||||
|
|
Reference in New Issue
Block a user