Coder Social home page Coder Social logo

trendingtechnology / albu_scheduler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kirilev/albu_scheduler

0.0 1.0 0.0 6 KB

Image data augmentation scheduler for albumentations transforms

License: MIT License

Makefile 4.77% Python 95.23%

albu_scheduler's Introduction

albu_scheduler

Scheduler for albumentations transforms based on PyTorch schedulers interface

Usage

TransformMultiStepScheduler

import albumentations as A

from albu_scheduler import TransformMultiStepScheduler

transform_1 = A.Compose([
    A.RandomCrop(width=256, height=256),
    A.HorizontalFlip(p=0.5),
    A.RandomBrightnessContrast(p=0.2),
])
transform_2 = A.Compose([
    A.RandomCrop(width=128, height=128),
    A.VerticalFlip(p=0.5),
])

scheduled_transform = TransformMultiStepScheduler(transforms=[transform_1, transform_2], 
                                                  milestones=[0, 10])
dataset = Dataset(transform=scheduled_transform)

for epoch in range(100):
    train(...)
    validate(...)
    scheduled_transform.step()

TransformSchedulerOnPlateau

from albu_scheduler import TransformSchedulerOnPlateau

scheduled_transform = TransformSchedulerOnPlateau(transforms=[transform_1, transform_2], 
                                                  mode="max",
                                                  patience=5)

dataset = Dataset(transform=scheduled_transform)
for epoch in range(100):
    train(...)
    score = validate(...)
    scheduled_transform.step(score)

Installation

git clone https://github.com/KiriLev/albu_scheduler
cd albu_scheduler
make install

albu_scheduler's People

Contributors

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