{"id":24519505,"url":"https://github.com/Fer14/tiny_vae","last_synced_at":"2025-10-02T23:34:46.483Z","repository":{"id":273608789,"uuid":"919700644","full_name":"Fer14/vae_toy","owner":"Fer14","description":"Variational AutoEncoder Toy Model","archived":false,"fork":false,"pushed_at":"2025-01-21T22:12:49.000Z","size":5214,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T23:23:53.933Z","etag":null,"topics":["toy-models","toy-project","vae","variational-autoencoder","visualization"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fer14.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-20T21:05:59.000Z","updated_at":"2025-01-21T22:51:16.000Z","dependencies_parsed_at":"2025-01-21T23:23:58.910Z","dependency_job_id":"d8d1a297-bc91-40ce-971f-6cbc5c4d0d78","html_url":"https://github.com/Fer14/vae_toy","commit_stats":null,"previous_names":["fer14/vae_toy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fer14%2Fvae_toy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fer14%2Fvae_toy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fer14%2Fvae_toy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fer14%2Fvae_toy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fer14","download_url":"https://codeload.github.com/Fer14/vae_toy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235049008,"owners_count":18927715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["toy-models","toy-project","vae","variational-autoencoder","visualization"],"created_at":"2025-01-22T01:51:30.199Z","updated_at":"2025-10-02T23:34:46.460Z","avatar_url":"https://github.com/Fer14.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Variational AutoEncoder Tiny Model 🤏\n\n![logo](./logos/logo_blue.png)\n\n# Variational AutoEncoder\n\nThis project demonstrates the use of a Variational AutoEncoder (VAE) to learn a latent space representation of simple synthetic data: black-and-white images of circles with varying radius, x, and y coordinates. The goal is to map these parameters to a 3-dimensional latent space, where each dimension ideally corresponds to one of the circle's properties.\n\n##  The Data\n\nThe dataset consists of black-and-white images of circles, each of shape 32x32, generated using opencv's `cv2.circle `function. Each image contains a single circle, randomly positioned and sized within the frame. The parameters for the circles are:\n\n- `Radius`: Randomly selected within a defined range.\n- `X-coordinate`: Random horizontal position of the circle's center.\n- `Y-coordinate`: Random vertical position of the circle's center.\n\nBelow is a sample visualization of the generated data:\n![logo](./plots/data.png)\n\n# The Encoder\n\n![logo](./logos/encoder_blue.png)\n\n\nThe encoder network compresses the flattened 32x32 input image into a 3-dimensional latent representation. It consists entirely of fully connected layers, producing two outputs:\n\n- Mean vector (μ) of the latent distribution.\n- Log variance vector (logσ2) of the latent distribution.\n\n# The Decoder\n\n![logo](./logos/decoder_blue.png)\n\nThe decoder reconstructs the original image from the 3-dimensional latent representation. It also consists entirely of fully connected layers, ensuring the output matches the flattened dimensions of the original image (32x32).\n\n# The Latent Space\n\nThe latent space is a 3-dimensional representation of the circle data. Ideally, each dimension captures a specific property:\n\n![logo](./logos/latent_space_blue.png)\n\n## First dimension\n\nThe radius?\n\n![logo](./plots/plot2.png)\n\n\n## Second dimension\n\nThe Y-axis?\n\n![logo](./plots/plot3.png)\n\n## Third dimension\n\nThe X-axis?\n\n![logo](./plots/plot1.png)\n\n\n## Future Work\n- [ ]  Add Beta-VAE\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\nMade with ❤️ by [Fer14]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFer14%2Ftiny_vae","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFer14%2Ftiny_vae","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFer14%2Ftiny_vae/lists"}