https://github.com/casus/cvdm

https://github.com/casus/cvdm

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.4%) to scientific vocabulary
Last synced: 6 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: casus
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 12 MB
Statistics
  • Stars: 10
  • Watchers: 4
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Created almost 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

Conditional Variational Diffusion Models

Diffusion models have become popular for their ability to solve complex problems where hidden information needs to be estimated from observed data. Among others, their use is popular in image generation tasks. These models rely on a key hyperparameter of the variance schedule that impacts how well they learn, but recent work shows that allowing the model to automatically learn this hyperparameter can improve both performance and efficiency. Our CVDM package implements Conditional Variational Diffusion Models (CVDM) as described in the paper that build on this idea, with the addition of Zero-Mean Diffusion (ZMD), a technique that enhances performance in certain imaging tasks, aiming to make these approaches more accessible to researchers.

How to cite us

Della Maggiora, Gabriel, Luis Alberto Croquevielle, Nikita Deshpande, Harry Horsley, Thomas Heinis, and Artur Yakimovich. "Conditional Variational Diffusion Models." In The Twelfth International Conference on Learning Representations. 2023.

@inproceedings{della2023conditional, title={Conditional Variational Diffusion Models}, author={Della Maggiora, Gabriel and Croquevielle, Luis Alberto and Deshpande, Nikita and Horsley, Harry and Heinis, Thomas and Yakimovich, Artur}, booktitle={The Twelfth International Conference on Learning Representations}, year={2023} }

Where to get the data?

The datasets that we are using are available online: - BioSR, the data that we are using has been transformed to .npy files. You can also obtain the data here. To generate the training .npz you need to join the parts with cat bio_sr_part* > biosr.npz - ImageNet from ILSVRC2012 - HCOCO - only used in model evaluation

It is assumed that for: - BioSR super-resolution task, data can be found in the directory specified as datasetpath in configs/biosr.yaml, in two files, x.npy (input) and y.npy (ground truth) - BioSR phase task, data can be found in the directory specified as datasetpath in configs/biosrphase.yaml, in one file, y.npy (ground truth). Input to the model will be generated based on the ground truth. - ImageNet super-resolution task, data can be found in the directory specified as datasetpath in configs/imagenetsr.yaml as a collection of JPEG files. Input to the model will be generated based on the ground truth. - ImageNet phase task, data can be found in the directory specified as datasetpath in configs/imagenetphase.yaml as a collection of JPEG files. Input to the model will be generated based on the ground truth. - HCOCO phase evaluation task, data can be found in the directory specified as datasetpath in configs/hcoco_phase.yaml as a collection of JPEG files. Input to the model will be generated based on the ground truth.

How to prepare environment?

Create enviroment with conda create -n cvdm_env python=3.10

Install requirements using pip install -r requirements.txt

Note: The Docker image is currently not working.

How to run the training code?

  1. Download the data or use the sample data available in the data/ directory. The sample data is a fraction of the ImageNet dataset and can be used with configs imagenet_sr_sample.yaml or imagenet_phase_sample.yaml. You can also use your own data as long as it is in ".npy" format. To do so, use the task type "other".
  2. Modify the config in configs/ directory with the path to the data you want to use and the directory for outputs. For the description of each parameter, check the documentation in cvdm/configs/ files.
  3. Run the code from the root directory: python scripts/train.py --config-path $PATH_TO_CONFIG --neptune-token $NEPTUNE_TOKEN.

--neptune-token argument is optional.

How to run the evaluation code?

  1. Download the data.
  2. Modify the config in configs/ directory with the path to the data you want to use and the directory for outputs.
  3. Run the code from the root directory: python scripts/eval.py --config-path $PATH_TO_CONFIG --neptune-token $NEPTUNE_TOKEN.

--neptune-token argument is optional.

How to contribute?

To contribute to the software or seek support, please leave an issue or pull request.

License

This repository is released under the MIT License (refer to the LICENSE file for details).

Owner

  • Name: Center for Advanced Systems Understanding
  • Login: casus
  • Kind: organization
  • Email: m.bussmann@hzdr.de
  • Location: Görlitz, Germany

Official Github Organization account of the Center for Advanced Systems Understanding

GitHub Events

Total
  • Issues event: 4
  • Watch event: 6
  • Issue comment event: 18
  • Push event: 10
  • Fork event: 1
Last Year
  • Issues event: 4
  • Watch event: 6
  • Issue comment event: 18
  • Push event: 10
  • Fork event: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 3
  • Average time to close issues: 14 days
  • Average time to close pull requests: 1 day
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 21.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: 14 days
  • Average time to close pull requests: 3 days
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 21.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • insanemate033-gif (1)
Pull Request Authors
  • Ruruthia (3)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 13 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 2
pypi.org: cvdm

Code for Conditional Variational Diffusion Models

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 13 Last month
Rankings
Dependent packages count: 10.3%
Average: 34.1%
Dependent repos count: 57.9%
Maintainers (2)
Last synced: 6 months ago

Dependencies

.github/workflows/python-publish.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v3 composite
  • pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
.github/workflows/test.yml actions
  • actions/checkout v3 composite
  • docker/setup-buildx-action v2 composite
Dockerfile docker
  • ubuntu 22.04 build
pyproject.toml pypi
  • cupy-cuda12x >=13.3.0
  • einops >=0.7.0
  • keras >=2.15.0
  • matplotlib >=3.8.0
  • neptune >=1.10.2
  • opencv-python >=4.9.0.80
  • scikit-image >=0.22.0
  • scikit-learn >=1.4.2
  • tensorflow >=2.15.0
  • tensorflow-addons >=0.23.0
  • tqdm >=4.65.0
requirements.txt pypi
  • keras *
  • matplotlib *
  • neptune *
  • numpy *
  • pillow *
  • pyyaml *
  • scikit-image *
  • scikit-learn *
  • tensorflow *
  • tqdm *