Giter Club home page Giter Club logo

image-reconstruction-using-diffusion-model's Introduction

Image Reconstruction using Diffusion Model

The code is not based on any paper. But it does something similar to this paper or (less similar to) this paper.

Before running the code, you should install improved-diffusion package. Check the readme of the improved-diffusion folder. Note: install from my copy, and not from the original repository.

Also models imagenet64_uncond_100M_1500K.pt and upsample_cond_500K.pt need to be downloaded. Links are in the improved-diffusion folder.

To generate 16 samples of doge, run:

python generate.py --model_path imagenet64_uncond_100M_1500K.pt --input_image doge.png --batch_size 16

To upsample these samples from 64 to 256 resolution, run:

python upsample.py --upsample_model_path upsample_cond_500K.pt --lowres_images generated_doge.png.npy --input_image doge.png

Results

The doge image

Turns into this (one of possible outcomes):

As you can see, the model gave doge a body.

The image of myself turned into this (right half of the image was masked off):

As you can see, the model gave me a bird.

image-reconstruction-using-diffusion-model's People

Contributors

hocop avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

image-reconstruction-using-diffusion-model's Issues

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.