Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/badr-moufad/hackathon_starter_kit
Starter code for the Hackathon "Zero-shot Diffusion based image restoration"
https://github.com/badr-moufad/hackathon_starter_kit
Last synced: 2 months ago
JSON representation
Starter code for the Hackathon "Zero-shot Diffusion based image restoration"
- Host: GitHub
- URL: https://github.com/badr-moufad/hackathon_starter_kit
- Owner: Badr-MOUFAD
- Created: 2024-07-07T21:32:01.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-09T15:36:48.000Z (6 months ago)
- Last Synced: 2024-10-03T10:26:34.985Z (3 months ago)
- Language: Python
- Size: 3.83 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hackathon starter-kit
Zero-shot Diffusion based image restoration.
The goal of the hackathon is to guide the participants to develop robust and efficient algorithms
that leverage the advances in DMs to solve inverse problems with no-additional training of
the models.
The focus will be common tasks encountered in image restoration such as image inpainting and Super Resolution.## Installation
Beforehand, ensure to download the code.
You can use ``git`` or download it as ``zip``.1. Run the following the command to create a fresh Python environment.
```bash
python3 -m venv venv-hackathon
```1. Activate the environment
```bash
source venv-hackathon/bin/activate
```1. then install the project on editable mode
```bash
pip install -e .
```1. Finally, download [FFHQ model checkpoint](https://drive.google.com/drive/folders/1jElnRoFv7b31fG0v6pTSQkelbSX3xGZh) and put it on ``material/checkpoints`` folder.
Do not forget to put the absolute path of the project in ``py_source/local_paths.py``.
Similarly, put the absolute path to FFHQ checkpoint in ``/py_source/configs/ffhq_model.yaml``## About the repository structure
The ``material`` folder contains external files such images, and model checkpoints.
Essential functions and classes to load pre-trained Diffusion Models, load images, display them, and initialize inverse problem are located in ``py_source/`` folder.
In particular,
- ``py_source/sampling/`` folder contains examples of algorithm for solving inverse problem
- ``py_source/utils.py`` contains functions to load model, images, and plot themThere are two notebooks to help you get started
- ``demo_inverse_problems.ipynb`` shows how to define an inverse problem, solve it with an algorithm, and visualize the result
- ``demo_evaluation.ipynb`` explains and illustrates the evaluation process of an algorithm## Note
- To avoid installation conflicts, the code of the following repositories was moved/modified inside ``src`` folder
- https://github.com/gabrielvc/mcg_diff
- https://github.com/openai/guided-diffusion
- Link to download FFHQ model checkpoint https://drive.google.com/drive/folders/1jElnRoFv7b31fG0v6pTSQkelbSX3xGZh
- Evaluation script and the inverse problems used will be uploaded later during the week