Git Product home page Git Product logo

ziatdinovmax / pyroved Goto Github PK

View Code? Open in Web Editor NEW
45.0 45.0 11.0 114.4 MB

Invariant representation learning from imaging and spectral data

License: MIT License

Python 100.00%
encoder-decoder-model image-data probabilistic-programming pyro rotation-invariant scale-invariance semi-supervised-learning semi-supervised-vae spectral-data translation-invariant unsupervised-machine-learning vae variational-autoencoder

pyroved's Introduction

Hi there 👋

My expertise lies in designing and implementing custom machine learning solutions that drive research and development, with a current focus on AI-powered materials design and characterization. With a proven track record of collaborating closely with academic and industry partners, I excel at translating complex domain-specific challenges into efficient machine learning codes and workflows. During my 9-year tenure at the U.S. Department of Energy’s Oak Ridge National Laboratory, I led the development of machine learning codes that enabled autonomous experimentation in scanning probe and electron microscopy, and were later extended to neutron scattering experiments, chemical synthesis, and battery state-of-health assessments. To support my peers, I have authored multiple widely used open-source software packages, such as AtomAI and GPax, which streamline machine learning integration into experimental research. I also introduced the concept of the Jupyter paper to enhance transparency and reproducibility in research. My vision for the future is one where human-AI collaboration paves the way for rapid scientific innovation and practical applications.

My Latest Blog Posts 📖:

My Recent Papers 📜

pyroved's People

Contributors

matthewcarbone avatar utkarshp1161 avatar ziatdinovmax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

pyroved's Issues

Manifold traversals for 1D data in joint iVAE

Currently, the manifold_traversal() in joint iVAE supports only plotting the 2D images. It needs to be expanded to 1D spectral data since there's an increasing interest in applying joint iVAE to this type of data.

Question: import style modification

I am not sure which is best practice, since the way that you're handling imports does make sense. However, I think for readability, it might make more sense to precisely specify imports.

For example, consider the __init__.py in pyroved.utils,

from .coord import (generate_grid, generate_latent_grid,
                    generate_latent_grid_traversal, transform_coordinates)
from .data import init_dataloader, init_ssvae_dataloaders
from .nn import (get_activation, get_bnorm, get_conv, get_maxpool,
                 set_deterministic_mode, to_onehot)
from .prob import get_sampler
from .viz import plot_grid_traversal, plot_img_grid, plot_spect_grid

__all__ = ['generate_grid', 'transform_coordinates', 'generate_latent_grid',
           'get_sampler', 'init_dataloader', 'init_ssvae_dataloaders',
           'get_activation', 'get_bnorm', 'get_conv', 'get_maxpool',
           'to_onehot', 'set_deterministic_mode', 'get_sampler',
           'plot_img_grid', 'plot_spect_grid', 'plot_grid_traversal',
           'generate_latent_grid_traversal']

It too me a minute to figure out where set_deterministic_mode was when reading trvae.py,

from pyroved.utils import (
    generate_grid, generate_latent_grid, get_sampler,
    plot_img_grid, plot_spect_grid, set_deterministic_mode,
    to_onehot, transform_coordinates
)

In other words, I would modify the imports here to say

from pyroved.utils.nn import set_deterministic_mode

and remove the code in the __init__.py, for example. However, I'm happy to be convinced that your current way is better. What do you think?

Regarding post analysis of trained vae.

Hi @ziatdinovmax ,

Say I defined a vae = pv.models.iVAE(in_dim, latent_dim=2, invariances=['r'], seed=0)

  1. vae.manifold2d(d=8,cmap="jet") ---> plots the decoded latent space on grid, how to save it to a png file directly on disc. I know
    we can pass savefig = True in atomai but couldnt find here.

  2. Is there a function or modular way to create latent images ?

VAE with invariance to 3D rotations

This should be easy to implement by using von Mises Fisher distribution (or the qualitatively similar Projected Normal distribution) instead of the Normal distribution for sampling a latent angle. One will also need to modify the outputs of the encoder NN such that it outputs a "concentration" parameter in addition to z_loc and z_scale.

Extend to multi-channel data

Currently, all the VED/VAE models work only with a single channel data (e.g. grayscale images but not color images). The extension to multiple channels should be pretty straightforward if there is a use case.

Refactor the models classes due to repetition

There appears to be quite a bit of repetition in the classes in models.py, especially in e.g. the __init__. I'd suggest refactoring, and moving a lot of the shared code into the base class (and then adding documentation to the base class, of course).

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.