Giter Site home page Giter Site logo

trungnt13 / odin-ai Goto Github PK

View Code? Open in Web Editor NEW
21.0 8.0 11.0 7.19 MB

Orgainzed Digital Intelligent Network (O.D.I.N)

License: MIT License

Python 100.00%
deep-learning deep-neural-networks speech-processing image-processing natural-language-processing text-processing probabilistic-programming probabilistic-graphical-models graph-algorithms bayesian-methods

odin-ai's Introduction

image

O.D.I.N

Organized Digital Intelligent Network (O.D.I.N)

O.D.I.N is a framework for building "Organized Digital Intelligent Networks".

End-to-end design, versatile, plug-n-play, minimized repetitive work

This repo contains the most comprehensive implementation of variational autoencoder and disentangled representation benchmark.

TOC

  1. VAE
  2. Hierachical VAE
  3. Semi-supervised VAE
  4. Disentanglement Gym
  5. Faster Classical ML (automatically select GPU implementation)

Variational Autoencoder (VAE)

Model Reference/Description Implementation
  1. Vanilla VAE
(Kingma et al. 2014). "Auto-Encoding Variational Bayes" [Paper] [Code][Example]
  1. Beta-VAE
(Higgins et al. 2016). "beta-VAE: Learning Basic Visual Concepts with a Constrained Variational Framework" [Paper] [Code][Example]
  1. BetaGamma-VAE
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))\) [Code][Example]
  1. Annealing VAE
(Sønderby et al. 2016) "Ladder variational autoencoder" [Code][Example]
  1. CyclicalAnnealing VAE
(Fu et al. 2019) "Cyclical Annealing Schedule: A Simple Approach to Mitigating KL Vanishing" [Code][Example]
  1. BetaTC-VAE
(Chen et al. 2019) "Isolating Sources of Disentanglement in Variational Autoencoders" (regularize the latents' Total Correlation) [Code][Example]
  1. Controlled Capacity Beta-VAE
(Burgess et al. 2018) "Understanding disentangling in beta-VAE" [Code][Example]
  1. FactorVAE
(Kim et al. 2018) "Disentangling by Factorising" [Code][Example]
  1. AuxiliaryVAE
(Maaløe et al. 2016) "Auxiliary Deep Generative Models" [Code][Example]
  1. HypersphericalVAE
(Davidson et al. 2018) "Hyperspherical Variational Auto-Encoders" [Code][Example]
  1. PowersphericalVAE
(De Cao et al. 2020) "The Power Spherical distribution" [Code][Example]
  1. DIPVAE
(Kumar et al. 2018) "Variational Inference of Disentangled Latent Concepts from Unlabeled Observations" (I - only_mean=True; II - only_mean=False) [Code][Example]
  1. InfoVAE
(Zhao et al. 2018) "infoVAE: Balancing Learning and Inference in Variational Autoencoders" [Code][Example]
  1. MIVAE
(Ducau et al. 2017) "Mutual Information in Variational Autoencoders" (max Mutual Information I(X;Z)) [Code][Example]
  1. irmVAE
(Jing et al. 2020) "Implicit Rank-Minimizing Autoencoder" (Implicit Rank Minimizer) [Code][Example]
  1. ALDA
(Figurnov et al. 2018) "Implicit Reparameterization Gradients" (Amortized Latent Dirichlet Allocation - VAE with Dirichlet latents for topic modeling) [Code][Example]
  1. TwoStageVAE
(Dai et al. 2019) "Diagnosing and Enhancing VAE Models" [Code][Example]
  1. VampriorVAE
(Tomczak et al. 2018) "VAE with a VampPrior" [Code][Example]
  1. VQVAE
(Oord et al. 2017) "Neural Discrete Representation Learning" [Code][Example]

Hierarchical VAE

Model Reference/Description Implementation
  1. LadderVAE
(Sønderby et al. 2016) "Ladder variational autoencoder" [Code][Example]
  1. BidirectionalVAE
(Kingma et al. 2016) "Improved variational inference with inverse autoregressive flow" (Bidirectional inference hierarchical VAE) [Code][Example]
  1. ParallelVAE
(Zhao et al. 2017) "Learning Hierarchical Features from Generative Models" (Multiple latents connects encoder-decoder from bottom to top in parallel) [Code][Example]

Semi-supervised VAE

Model Reference/Description Implementation
  1. Semi-supervised FactorVAE
Same as FactorVAE, but the discriminator also estimate the density of the labels and unlabeled data (like in semi-GAN) [Code][Example]
  1. MultiheadVAE
VAE has multiple decoders for different tasks [Code][Example]
  1. SkiptaskVAE
VAE has multiple tasks directly constrain the latents [Code][Example]
  1. ConditionalM2VAE
(Kingma et al. 2014) "Semi-supervised learning with deep generative models" [Paper] [Code][Example]
  1. CCVAE (capture characteristic VAE)
(Joy et al. 2021) "Capturing label characteristics in VAEs" [Paper] [Code][Example]
  1. SemafoVAE
(Trung et al. 2021) "The transitive information theory and its application to deep generative models" [Paper] [Code][Example]

Disentanglement Gym

DisentanglementGym: fast API for benchmarks on popular datasets and renowned disentanglement metrics.

Dataset support: ['shapes3d', 'dsprites', 'celeba', 'fashionmnist', 'mnist', 'cifar10', 'cifar100', 'svhn', 'cortex', 'pbmc', 'halfmoons']

Metrics support:

  • Correlation: 'spearman', 'pearson', 'lasso'
  • BetaVAE score
  • FactorVAE score
  • Mutual Information Estimated
  • MIG (Mutual Information Gap)
  • SAP (Separated Attribute Prediction)
  • RDS (relative disentanglement strength)
  • DCI (Disentanglement, Completeness, Informativeness)
  • FID (Frechet Inception Distance)
  • Total Correlation
  • Clustering scores: Adjusted Rand Index, Adjusted Mutual Info, Normalized Mutual Info, Silhouette score.

Fast API for classical ML

Automatically accelerated by RAPIDS.ai (i.e. automatically select GPU implementation if available)

Dimension Reduction

  • t-SNE [Code]
  • UMAP [Code]
  • PCA, Probabilistic PCA, Supervised Probabilistic PCA, MiniBatch PCA, Randomize PCA [Code]
  • Probabilistic Linear Discriminant Analysis (PLDA) [Code]
  • iVector (GPU acclerated) [Code]

GMM

  • GMM classifier [Code]
  • Probabilistic embedding with GMM [Code]
  • Universal Background Model (GMM-Tmatrix) [Code]

Clustering

odin-ai's People

Contributors

celikalp avatar tirkarthi avatar trungnt13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

odin-ai's Issues

Hello World?

Hi!

How to start using Odin?
Any tips are welcome.

Lucas

Hydra integration

Hi, thanks for your interest in Hydra.
I see that you are depending on internal APIs here.

The way you are using Hydra now can probably best be addressed with the experimental compose API.
However, there is a room for much better integration. Frameworks are definitely in my mind as I build Hydra and there are some non obvious features that can really make the the integration nice.

I would love to learn more about ODIN, please join the Hydra chat and we can discuss a bit.

Importing ABC directly from collections has been deprecated and will be removed in Python 3.10

Use collections.abc for ABC import.

odin/backend/__init__.py:6
  /root/checked_repos/odin-ai/odin/backend/__init__.py:6: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
    from collections import Mapping

odin/utils/__init__.py:21
odin/utils/__init__.py:21
  /root/checked_repos/odin-ai/odin/utils/__init__.py:21: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
    from collections import Iterable, Iterator, Mapping, OrderedDict, deque

odin/utils/crypto.py:9
  /root/checked_repos/odin-ai/odin/utils/crypto.py:9: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
    from collections import Sequence

$ rg -t py 'time.clock|encodestring|decodestring|celementtree|collections.*(Awaitable|Coroutine|AsyncIterable|AsyncIterator|AsyncGenerator|Hashable|Iterable|Iterator|Generator|Reversible|Sized|Container|Callable|Set|MutableSet|Mapping|MutableMapping|MappingView|KeysView|ItemsView|ValuesView|Sequence|MutableSequence|ByteString)|asyncio.?coroutine|isAlive|readfp'
odin/stats.py
6:from collections import Iterator, Mapping, OrderedDict, defaultdict

odin/fuel/dataset.py
6:from collections import Mapping, OrderedDict

odin/fuel/databases.py
13:from collections import OrderedDict, Iterator, defaultdict, MutableMapping, Mapping

odin/preprocessing/processor.py
17:from collections import Mapping, defaultdict

odin/preprocessing/text.py
14:from collections import OrderedDict, Iterator, Iterable, defaultdict, Mapping

odin/preprocessing/speech.py
46:from collections import Mapping, OrderedDict, defaultdict

odin/preprocessing/_opensmile.py
17:from collections import Mapping

odin/preprocessing/base.py
7:from collections import Mapping
179:   - If the return is instance of `collections.Mapping`, the new features

odin/networks/util_layers.py
4:from collections import Iterable

odin/networks/base_networks.py
779:    if not isinstance(self.units, collections.Iterable):

odin/visual/bashplot.py
15:from collections import Mapping

odin/visual/figures.py
16:from collections import Mapping, OrderedDict, defaultdict

odin/utils/python_utils.py
14:from collections import (Iterable, Iterator, Mapping, OrderedDict, defaultdict,

odin/utils/decorators.py
16:from collections import MutableMapping, Mapping

odin/utils/__init__.py
21:from collections import Iterable, Iterator, Mapping, OrderedDict, deque

odin/utils/crypto.py
9:from collections import Sequence

odin/backend/__init__.py
6:from collections import Mapping

odin/ml/gmm_tmat.py
13:from collections import Mapping, OrderedDict, defaultdict

odin/bay/distributions/conditional.py
59:    slices = (tuple(slices) if isinstance(slices, collections.Sequence) else

odin/bay/vi/autoencoder/factor_vae.py
56:    if isinstance(v, collections.Sequence):

odin/bay/random_variable.py
6:from collections import MutableSequence, Sequence

Deprecation warning due to invalid escape sequences

Deprecation warnings are raised due to invalid escape sequences. This can be fixed by using raw strings or escaping the literals. pyupgrade also helps in automatic conversion : https://github.com/asottile/pyupgrade/

find . -iname '*.py' | grep -Ev 'example|scripts'  | xargs -P4 -I{} python3 -Wall -m py_compile {} 
./odin/preprocessing/textgrid.py:192: DeprecationWarning: invalid escape sequence \d
  tier_re = " \d+.?\d* \d+.?\d*[\r\n]+\"[^\"]*\""
./odin/preprocessing/textgrid.py:200: DeprecationWarning: invalid escape sequence \s
  tier_re = header + "[\s\S]+?(?=" + header + "|$$)"
./odin/preprocessing/textgrid.py:238: DeprecationWarning: invalid escape sequence \[
  header = " +item \["
./odin/preprocessing/textgrid.py:241: DeprecationWarning: invalid escape sequence \S
  header = "\"\S+\" \".*\" \d+\.?\d* \d+\.?\d*"
./odin/preprocessing/textgrid.py:360: DeprecationWarning: invalid escape sequence \S
  trans = "([\S\s]*)"
./odin/preprocessing/textgrid.py:364: DeprecationWarning: invalid escape sequence \d
  xmin = "(\d+\.?\d*) +"
./odin/preprocessing/textgrid.py:365: DeprecationWarning: invalid escape sequence \d
  xmax = "(\d+\.?\d*) *[\r\n]+"
./odin/preprocessing/textgrid.py:372: DeprecationWarning: invalid escape sequence \d
  xmin = " +xmin = (\d+\.?\d*) *[\r\n]+"
./odin/preprocessing/textgrid.py:373: DeprecationWarning: invalid escape sequence \d
  xmax = " +xmax = (\d+\.?\d*) *[\r\n]+"
./odin/preprocessing/textgrid.py:374: DeprecationWarning: invalid escape sequence \S
  size = " +\S+: size = (\d+) *[\r\n]+"
./odin/preprocessing/textgrid.py:378: DeprecationWarning: invalid escape sequence \d
  xmin = "(\d+\.?\d*) *[\r\n]+"
./odin/preprocessing/textgrid.py:379: DeprecationWarning: invalid escape sequence \d
  xmax = "(\d+\.?\d*) *[\r\n]+"
./odin/preprocessing/textgrid.py:380: DeprecationWarning: invalid escape sequence \d
  size = "(\d+) *[\r\n]+"
./odin/preprocessing/textgrid.py:398: DeprecationWarning: invalid escape sequence \S
  trans_xmin = " (\S+)"
./odin/preprocessing/textgrid.py:399: DeprecationWarning: invalid escape sequence \S
  trans_xmax = " (\S+)[\r\n]+"
./odin/preprocessing/textgrid.py:400: DeprecationWarning: invalid escape sequence \S
  trans_text = "\"([\S\s]*?)\""
./odin/preprocessing/textgrid.py:402: DeprecationWarning: invalid escape sequence \S
  trans_head = " +\S+ \[\d+\]: *[\r\n]+"
./odin/preprocessing/textgrid.py:403: DeprecationWarning: invalid escape sequence \S
  trans_xmin = " +\S+ = (\S+) *[\r\n]+"
./odin/preprocessing/textgrid.py:404: DeprecationWarning: invalid escape sequence \S
  trans_xmax = " +\S+ = (\S+) *[\r\n]+"
./odin/preprocessing/textgrid.py:405: DeprecationWarning: invalid escape sequence \S
  trans_text = " +\S+ = \"([^\"]*?)\""
./odin/preprocessing/textgrid.py:410: DeprecationWarning: invalid escape sequence \S
  trans_text = "\"([\S\s]*?)\""
./odin/preprocessing/base.py:634: DeprecationWarning: invalid escape sequence \_
  def __init__(self, dtype, input_name=None, exclude_pattern=".+\_sum[1|2]"):
./odin/utils/decorators.py:147: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if debug is 0: # ignore
./odin/utils/decorators.py:158: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if debug is 1:
./odin/utils/decorators.py:160: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif debug is 2:
./odin/utils/decorators.py:173: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if debug is 1:
./odin/utils/decorators.py:175: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif debug is 2:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.