{"id":26484321,"url":"https://github.com/trungnt13/odin-ai","last_synced_at":"2026-03-14T10:03:02.498Z","repository":{"id":49269584,"uuid":"61964012","full_name":"trungnt13/odin-ai","owner":"trungnt13","description":"Orgainzed Digital Intelligent Network (O.D.I.N)","archived":false,"fork":false,"pushed_at":"2022-10-30T14:26:27.000Z","size":7365,"stargazers_count":22,"open_issues_count":4,"forks_count":11,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-15T20:33:42.813Z","etag":null,"topics":["bayesian-methods","deep-learning","deep-neural-networks","disentangled-representations","disentanglement-learning","factor-vae","generative-model","graph-algorithms","image-processing","machine-learning","natural-language-processing","probabilistic-graphical-models","probabilistic-programming","semi-supervised-learning","speech-processing","text-processing","variational-autoencoder","variational-autoencoders"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trungnt13.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-25T22:25:31.000Z","updated_at":"2024-09-16T21:20:31.000Z","dependencies_parsed_at":"2022-09-16T17:00:47.149Z","dependency_job_id":null,"html_url":"https://github.com/trungnt13/odin-ai","commit_stats":null,"previous_names":["imito/odin-ai"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trungnt13%2Fodin-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trungnt13%2Fodin-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trungnt13%2Fodin-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trungnt13%2Fodin-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trungnt13","download_url":"https://codeload.github.com/trungnt13/odin-ai/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244555021,"owners_count":20471342,"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":["bayesian-methods","deep-learning","deep-neural-networks","disentangled-representations","disentanglement-learning","factor-vae","generative-model","graph-algorithms","image-processing","machine-learning","natural-language-processing","probabilistic-graphical-models","probabilistic-programming","semi-supervised-learning","speech-processing","text-processing","variational-autoencoder","variational-autoencoders"],"created_at":"2025-03-20T05:22:29.991Z","updated_at":"2026-03-14T10:02:57.462Z","avatar_url":"https://github.com/trungnt13.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":".. image:: https://readthedocs.org/projects/odin/badge/\n    :target: http://odin0.readthedocs.org/en/latest/\n\nO.D.I.N\n=======\nOrganized Digital Intelligent Network (O.D.I.N)\n\nO.D.I.N is a framework for building \"Organized Digital Intelligent Networks\".\n\nEnd-to-end design, versatile, plug-n-play, minimized repetitive work\n\nThis repo contains the most comprehensive implementation of variational autoencoder and disentangled representation benchmark.\n\n.. code-block:: python\n\n  from odin.fuel import MNIST\n  from odin.networks import get_networks\n  from odin.bay.vi import VariationalAutoencoder\n\n  ds = MNIST()\n  train = ds.create_dataset(partition='train')\n  # optimized architectures for MNIST\n  networks = get_networks(ds, is_hierarchical=False, is_semi_supervised=False)\n\n  # create the VAE\n  vae = VariationalAutoencoder(**networks)\n  vae.build(ds.full_shape)\n  vae.fit(train, max_iter=10000)\n\nTOC\n---\n\n1. `VAE`__\n2. `Hierachical VAE`__\n3. `Semi-supervised VAE`__\n4. `Disentanglement Gym`__\n5. `Faster Classical ML`__ (automatically select GPU implementation)\n\n.. __: #variational-autoencoder-vae\n.. __: #hierarchical-vae\n.. __: #semi-supervised-vae\n.. __: #disentanglement-gym\n.. __: #fast-api-for-classical-ml\n\nVariational Autoencoder (VAE)\n-----------------------------\n\n.. list-table::\n   :widths: 30 80 25\n   :header-rows: 1\n\n   * - Model\n     - Reference/Description\n     - Implementation\n   * - 1. Vanilla VAE\n     - (Kingma et al. 2014). \"Auto-Encoding Variational Bayes\" [`Paper \u003chttps://arxiv.org/abs/1312.6114\u003e`_]\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/5c83586999a15a02ebbcb7b5f7336f1cce245ae4/odin/bay/vi/autoencoder/variational_autoencoder.py#L132\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/vae_basic_test.py\u003e`_]\n   * - 2. Beta-VAE\n     - (Higgins et al. 2016). \"beta-VAE: Learning Basic Visual Concepts with a Constrained Variational Framework\" [`Paper \u003chttps://openreview.net/forum?id=Sy2fzU9gl\u003e`_]\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/beta_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/unsupervised_vae_test.py\u003e`_]\n   * - 3. BetaGamma-VAE\n     - Customized version of Beta-VAE, support re-weighing both reconstruction and regularization  ``\\(\\mathrm{ELBO}=\\gamma \\cdot E_q[log p(x|z)] - \\beta \\cdot KL(q(z|x)||p(z|x))\\)``\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/beta_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/betavae_encoder_info_bound.py\u003e`_]\n   * - 4. Annealing VAE\n     - (Sønderby et al. 2016) \"Ladder variational autoencoder\"\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/beta_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/betavae_encoder_info_bound.py\u003e`_]\n   * - 5. CyclicalAnnealing VAE\n     - (Fu et al. 2019) \"Cyclical Annealing Schedule: A Simple Approach to Mitigating KL Vanishing\"\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/beta_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/betavae_encoder_info_bound.py\u003e`_]\n   * - 6. BetaTC-VAE\n     - (Chen et al. 2019) \"Isolating Sources of Disentanglement in Variational Autoencoders\" (regularize the latents' Total Correlation)\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/beta_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/betavae_encoder_info_bound.py\u003e`_]\n   * - 7. Controlled Capacity Beta-VAE\n     - (Burgess et al. 2018) \"Understanding disentangling in beta-VAE\"\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/beta_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/betavae_encoder_info_bound.py\u003e`_]\n   * - 8. FactorVAE\n     - (Kim et al. 2018) \"Disentangling by Factorising\"\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/factor_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/betavae_encoder_info_bound.py\u003e`_]\n   * - 9. AuxiliaryVAE\n     - (Maaløe et al. 2016) \"Auxiliary Deep Generative Models\"\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/auxiliary_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/betavae_encoder_info_bound.py\u003e`_]\n   * - 10. HypersphericalVAE\n     - (Davidson et al. 2018) \"Hyperspherical Variational Auto-Encoders\"\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/hyperbolic_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/betavae_encoder_info_bound.py\u003e`_]\n   * - 11. PowersphericalVAE\n     - (De Cao et al. 2020) \"The Power Spherical distribution\"\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/hyperbolic_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/betavae_encoder_info_bound.py\u003e`_]\n   * - 12. DIPVAE\n     - (Kumar et al. 2018) \"Variational Inference of Disentangled Latent Concepts from Unlabeled Observations\" (I - `only_mean=True`; II - `only_mean=False`)\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/dip_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/betavae_encoder_info_bound.py\u003e`_]\n   * - 13. InfoVAE\n     - (Zhao et al. 2018) \"infoVAE: Balancing Learning and Inference in Variational Autoencoders\"\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/info_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/betavae_encoder_info_bound.py\u003e`_]\n   * - 14. MIVAE\n     - (Ducau et al. 2017) \"Mutual Information in Variational Autoencoders\" (max Mutual Information I(X;Z))\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/info_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/betavae_encoder_info_bound.py\u003e`_]\n   * - 15. irmVAE\n     - (Jing et al. 2020) \"Implicit Rank-Minimizing Autoencoder\" (Implicit Rank Minimizer)\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/irm_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/betavae_encoder_info_bound.py\u003e`_]\n   * - 16. ALDA\n     - (Figurnov et al. 2018) \"Implicit Reparameterization Gradients\" (Amortized Latent Dirichlet Allocation - VAE with Dirichlet latents for topic modeling)\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/lda_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/betavae_encoder_info_bound.py\u003e`_]\n   * - 17. TwoStageVAE\n     - (Dai et al. 2019) \"Diagnosing and Enhancing VAE Models\"\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/two_stage_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/betavae_encoder_info_bound.py\u003e`_]\n   * - 18. VampriorVAE\n     - (Tomczak et al. 2018) \"VAE with a VampPrior\"\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/vamprior.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/betavae_encoder_info_bound.py\u003e`_]\n   * - 19. VQVAE\n     - (Oord et al. 2017) \"Neural Discrete Representation Learning\"\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/vq_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/betavae_encoder_info_bound.py\u003e`_]\n\n\nHierarchical VAE\n----------------\n\n.. list-table::\n   :widths: 30 80 25\n   :header-rows: 1\n\n   * - Model\n     - Reference/Description\n     - Implementation\n   * - 20. LadderVAE\n     - (Sønderby et al. 2016) \"Ladder variational autoencoder\"\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/hierarchical_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/vae_basic_test.py\u003e`_]\n   * - 21. BidirectionalVAE\n     - (Kingma et al. 2016) \"Improved variational inference with inverse autoregressive flow\" (Bidirectional inference hierarchical VAE)\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/hierarchical_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/vae_basic_test.py\u003e`_]\n   * - 22. ParallelVAE\n     - (Zhao et al. 2017) \"Learning Hierarchical Features from Generative Models\" (Multiple latents connects encoder-decoder from bottom to top in parallel)\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/hierarchical_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/vae_basic_test.py\u003e`_]\n\nSemi-supervised VAE\n-------------------\n\n.. list-table::\n   :widths: 30 80 25\n   :header-rows: 1\n\n   * - Model\n     - Reference/Description\n     - Implementation\n   * - 23. Semi-supervised FactorVAE\n     - Same as FactorVAE, but the discriminator also estimate the density of the labels and unlabeled data (like in semi-GAN)\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/factor_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/semafo_final.py\u003e`_]\n   * - 24. MultiheadVAE\n     - VAE has multiple decoders for different tasks\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/multitask_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/semafo_final.py\u003e`_]\n   * - 25. SkiptaskVAE\n     - VAE has multiple tasks directly constrain the latents\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/multitask_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/semafo_final.py\u003e`_]\n   * - 26. ConditionalM2VAE\n     - (Kingma et al. 2014) \"Semi-supervised learning with deep generative models\" [`Paper \u003chttps://arxiv.org/abs/1406.5298\u003e`_]\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/autoencoder/conditional_vae.py\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/semafo_final.py\u003e`_]\n   * - 27. CCVAE (capture characteristic VAE)\n     - (Joy et al. 2021) \"Capturing label characteristics in VAEs\" [`Paper \u003chttps://openreview.net/forum?id=wQRlSUZ5V7B\u003e`_]\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/aea88577cbc972230e3d9dabfbe6144509364768/examples/vae/semafo_final.py#L1130\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/semafo_final.py\u003e`_]\n   * - 28. SemafoVAE\n     - (Trung et al. 2021) \"The transitive information theory and its application to deep generative models\" [`Paper \u003cgithub.com/trungn13\u003e`_]\n     - [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/aea88577cbc972230e3d9dabfbe6144509364768/examples/vae/semafo_final.py#L351\u003e`_][`Example \u003chttps://github.com/trungnt13/odin-ai/blob/master/examples/vae/semafo_final.py\u003e`_]\n\n\nDisentanglement Gym\n-------------------\n\n`DisentanglementGym \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/bay/vi/disentanglement_gym.py\u003e`_: fast API for benchmarks on popular datasets and renowned disentanglement metrics.\n\nDataset support: `['shapes3d', 'dsprites', 'celeba', 'fashionmnist', 'mnist', 'cifar10', 'cifar100', 'svhn', 'cortex', 'pbmc', 'halfmoons']`\n\nMetrics support:\n\n* Correlation: 'spearman', 'pearson', 'lasso'\n* BetaVAE score\n* FactorVAE score\n* Mutual Information Estimated\n* MIG (Mutual Information Gap)\n* SAP (Separated Attribute Prediction)\n* RDS (relative disentanglement strength)\n* DCI (Disentanglement, Completeness, Informativeness)\n* FID (Frechet Inception Distance)\n* Total Correlation\n* Clustering scores: Adjusted Rand Index, Adjusted Mutual Info, Normalized Mutual Info, Silhouette score.\n\n\nFast API for classical ML\n-------------------------\n\nAutomatically accelerated by RAPIDS.ai (i.e. automatically select GPU implementation if available)\n\nDimension Reduction\n~~~~~~~~~~~~~~~~~~~\n\n* t-SNE [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/ml/fast_tsne.py\u003e`_]\n* UMAP [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/ml/fast_umap.py\u003e`_]\n* PCA, Probabilistic PCA, Supervised Probabilistic PCA, MiniBatch PCA, Randomize PCA [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/ml/decompositions.py\u003e`_]\n* Probabilistic Linear Discriminant Analysis (PLDA) [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/ml/plda.py\u003e`_]\n* iVector (GPU acclerated) [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/ml/ivector.py\u003e`_]\n\nGMM\n~~~\n\n* GMM classifier [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/ml/gmm_classifier.py\u003e`_]\n* Probabilistic embedding with GMM [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/ml/gmm_embedding.py\u003e`_]\n* Universal Background Model (GMM-Tmatrix) [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/ml/gmm_tmat.py\u003e`_]\n\nClustering\n~~~~~~~~~~\n\n* KNN [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/ml/cluster.py\u003e`_]\n* KMeans [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/ml/cluster.py\u003e`_]\n* DBSCAN [`Code \u003chttps://github.com/trungnt13/odin-ai/blob/master/odin/ml/cluster.py\u003e`_]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrungnt13%2Fodin-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrungnt13%2Fodin-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrungnt13%2Fodin-ai/lists"}