Code Monkey home page Code Monkey logo

project_ml's Introduction

Authors

Robin Byl, Florence Franchomme, Nédid Ismaili, Adeline Wantiez

Image Inpainting

This project aims at inpainting missing region(s) of an image based on the remaining pixels using deep learning-based methods. For this, a Generative Adversarial Network (GAN) has been implemented. Its purpose is to generate visually plausible image to fill the missing content. The considered dataset is the Animal Faces-HQ (AFHQ).

To run the code go to Usage section.

Description

alt-text

Results

Results when feeding the whole image to the discriminator:
alt-text
Results when feeding the patch to the discriminator:
alt-text

Files

-dataset
    -afhq
        -cat
        -dog
        -wild
-Model
    Generator.py
    Discriminator.py
-Results
    General_architecture.png
    ResultsExample.png
Final_figures.py
Preprocessing.py
read_data.py
README.md
Training.py
TrainigFunctions.py
useTrainedModels.py

Clone Project

git clone https://github.com/FFrancho99/Project_ML.git

Packages

numpy >= 1.23.5
matplotlib >= 3.7.1
torch >= 2.0.0
torchmetrics >= 0.11.4
torchvision >= 0.15.1
uuid >= 1.30

Usage

Cuda is required to run the code but if you don't have it, change line 49 of Training.py 'cuda:0' to 'cpu'.
Run Training.py file to create, train, validate and test the model. If you already have a saved model then run useTrainedModels.py.

Sources

Dataset: Animal Faces-HQ (AFHQ) from https://www.kaggle.com/datasets/andrewmvd/animal-faces

project_ml's People

Contributors

adelinelw avatar ffrancho99 avatar robinbyl avatar nedid avatar

Stargazers

 avatar

Watchers

 avatar

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.