Coder Social home page Coder Social logo

dcgan-pytorch-lightning-comet's Introduction

DCGAN with Powerful-Lightweight Boilerplate

written by Eungbean Lee

Comet.ML: experiments CodeFactor codecov Code style: black Docker Automated build

이 프로젝트는 연세대학교 어영정 교수님의 'GAN (AAI5007)'수업 과제 일환으로 제작되었습니다.

The lightweight PyTorch boilerplate for efficient and high-performance AI research.

"Configure, scale and track your models."

Monitor & Tracking


cloud-based ML Platform

Scalable Parameter Tuning

Experiment

Configuration & Preperation


Image Augmentation
"YACS"
Variable Configuration

Quick Test/Play Around

Code Formatter

Super-clean and easy-configurable code

equipped with variety state-of-arts high-level tools for deep learning.

  • Comet.ml provides a self-hosted and cloud-based meta ML platform allowing to track and optimize experiments and models.
  • Docker 👨‍💻 + 🐳 = 💕
  • Pytorch-lightning, The lightweight PyTorch wrapper for high-performance AI research.
  • YACS is designed to be simple configuration management system for academic and industrial research projects.
  • Albumentation is a fast image augmentation library and easy to use wrapper around other libraries.

  • 이 프로젝트는 Pytorch를 기반으로 다양한 High-level 라이브러리를 사용합니다.
    추후 Boilerplate Template으로 Refactor 후 배포될 예정입니다.
    본 코드는 아래의 특징을 모토로 설계하였습니다.

    • Reproduciblity: Docker를 사용해 어떤 환경에서든지 5분 안에 실행할 수 있습니다.
    • Clean Coding: 단순함과 직관성. Clean Coding Rule을 준수하려고 노력하였습니다.
    • modularity: 각자의 기능이 다른 조각들을 서로 다른 파이썬 sub module로 분리하였습니다.
    • data-augmentation: Albumentation 패키지를 포함했습니다.
    • ready to go: 혁신적인 pytorch-lightning 라이브러리를 사용해 train loop을 쓰지 않아도 됩니다.
    • Comet.ml 을 내장했습니다. ID만 입력하면 모든 학습현황을 모니터링 할 수 있습니다.
    • Test-Produce-Go: Jupyter Notebook으로 빠르게 테스트 후 적용이 가능합니다.

    Instruction

    Setup Docker (Linux / Mac)

    1) Configure your custom variables

    1. ./docker/Dockerfile.dev에서 컨테이너에 접속하기 위한 SSH password를 설정해줍니다.
    ENV SSHPASSWD "MY_PASSWORD"
    1. ./docker/settings.sh 에서 Dataset과 Output (Optional)의 경로를 설정해줍니다.
    #DEFAULT CONFIGURATION
    #================================================
    #Configure Path
    DATASET_DIR=${PROJ_DIR}/dataset # Your dataset path
    OUTPUT_DIR=${PROJ_DIR}/output # Your output path : weight, log, checkpoint, predictions..
    
    #Configure Settings
    IMAGE="100daysgan" 		# Image name
    CONTAINER="100daysgan" 	# Container name
    GPUS="all"	            # "all", "0,1,2..", "none"
    JUPYTER_PORT_H=18888 	# jupyter port
    DEFAULT_PORT_H=10022 	# SSH port
    TB_PORT_H=16006 		# TensorBoard port
    #================================================

    Build/Run/Exec Docker

    # ensure you are in DCGAN repository
    # Build the docker image
    ./docker/build.sh
    
    # Run the docker container
    ./docker/run.sh
    
    # Attatch into contaier
    ./docker/exec.sh

    Configurate the Model / Training / Setting Parameters

    References

    이 프로젝트를 구현하는데 도움을 받은 Github Project/Blog Post는 다음과 같습니다.

    Structure

    .
    ├── callbacks // here you can create your custom callbacks
    ├── checkpoint // were we store the trained models
    ├── data // here we define our dataset
    │ └── transformation // custom transformation, e.g. resize and data augmentation
    ├── dataset // the data
    │ ├── train
    │ └── val
    ├── logger.py // were we define our logger
    ├── losses // custom losses
    ├── main.py
    ├── models // here we create our models
    │ ├── MyCNN.py
    │ ├── resnet.py
    │ └── utils.py
    ├── playground.ipynb // a notebook that can be used to fast experiment with things
    ├── Project.py // a class that represents the project structure
    ├── README.md
    ├── requirements.txt
    ├── test // you should always perform some basic testing
    │ └── test_myDataset.py
    └── tools.utils.py // utilities functions
    

    dcgan-pytorch-lightning-comet's People

    Contributors

    eungbean 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.