Coder Social home page Coder Social logo

objectdetection's Introduction

PyTorch-Project-Template

Installation

$ git clone [email protected]:tomoino/PyTorch-Project-Template.git

Usage

Setup

$ cd PyTorch-Project-Template
$ sh docker/build.sh
$ sh docker/run.sh
$ sh docker/exec.sh

Start a new project

  1. Add yaml file to "./configs/project"
    $ vi ./configs/project/new_project.yaml
  2. Run train.py with project option
    $ python train.py project=new_project

Training

$ python train.py

Grid Search

You can run train.py with multiple different configurations.

$ python train.py -m \
    project.train.batch_size=16,32 \
    project.train.optimizer.lr=0.01,0.001

Evaluation

$ python train.py eval=True project.model.initial_ckpt=best_ckpt.pth

Check the results

You can use MLflow to check the results of your experiment. Access http://localhost:8888/ from your browser. If necessary, you can edit env.sh to change the port.

How to customize

Structure

$ tree -I "datasets|mlruns|__pycache__|outputs|multirun"
.
├── README.md
├── configs
│   ├── config.yaml
│   ├── hydra
│   │   └── job_logging
│   │       └── custom.yaml
│   ├── project
│   │   └── default.yaml
│   └── supported_info.py
├── data
│   ├── __init__.py
│   ├── dataloader.py
│   ├── dataset
│   │   ├── cifar10.py
│   │   └── omniglot.py
│   ├── helper.py
│   └── sampler
│       └── balanced_batch_sampler.py
├── docker
│   ├── Dockerfile
│   ├── build.sh
│   ├── env.sh
│   ├── exec.sh
│   ├── init.sh
│   ├── requirements.txt
│   └── run.sh
├── metrics
│   ├── __init__.py
│   └── classification_metric.py
├── models
│   ├── __init__.py
│   ├── base_model.py
│   ├── helper.py
│   └── networks
│       ├── resnet18.py
│       └── simple_cnn.py
├── train.py
└── trainers
    ├── __init__.py
    ├── base_trainer.py
    └── default_trainer.py

TODO

  • nohup
  • optuna
  • scheduler
  • flake8
  • error handling
  • clear cache command
  • basic metrics
  • assertion
  • notification
  • FP16 (apex)
  • classmethod, staticmethod
  • value error
  • usage as template
  • multi-gpu
  • refactoring on cfg to make the modules easy to reuse.
  • utils.paths
  • docker-compose
  • pytorch-lightning
  • trainer
  • evaluation mode
  • logger
  • metrics
  • mlflow
  • hydra tab completion
  • projects
  • hydra

objectdetection's People

Contributors

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