Giter Club home page Giter Club logo

mlvision's Introduction

MLVISION

A pytorch train library

Introduction

Most classification tasks do not require to rewrite a train loop in pytorch, using this library allows for fast iteration using any deep learning architecture.

The library can be use for cpu, gpu, and multi gpu training, and implements an efficient train loop as well as logging in order to plot train history.

Installation

You can install it using poetry by running:

poetry install

Usage

Train a Model

To train a model you will need to edit a config file with at least the path of the training and validation data.

For more details on the config you can take a look at the next section.

You can now run the train command using:

# One GPU
poetry run python train.py --config /path/to/config --devices cuda:0

The code support multi gpu training using DDP:

poetry run python train.py --config /path/to/config --devices cuda:0 cuda:1 cuda:2 ...

or cpu training:

poetry run python train.py --config /path/to/config --devices cpu

Config

The config allows you to change multiple hyper parameter of the training:

  • data
    • path to dataset
    • data augmentation
    • workers for data loaders
  • optimization
    • number of epochs
    • learning rate
    • float16 / float32
  • model
    • Architecture (defined in mlvision.models.__init__.py)
    • args: given as kwargs to the model class

Add a new model

You can easily define a new model and use it, to do so create a new file in mlvision/models and add the class in the mlvision.models.__init__.py file.

You should now be able to use it in a config file.

mlvision's People

Contributors

guichardvictor avatar

Watchers

 avatar

mlvision's Issues

Next Steps

Improvements

  • CI does not fully run (but the package is still released
  • mlvision_cli is not properly created
  • Add cpu option to install pytorch using cpu instead of cuda
  • Add export to onnx / torchscript in the cli

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.