A Python package for computer vision experiments and research.


Keywords
ai, computer-vision, decoder, encoder, encoder-decoder, machine-learning, python, pytorch, transformer
License
Apache-2.0
Install
pip install mmit==0.0.0

Documentation

LogoTitle

mmit is a python library to build any encoder matched with any decoder for any Computer Vision model.

License badge PyTorch - Version Python - Version

For a quick overview of mmit, check out the documentation.

Let's take a look at what we have here!

Main Features

mmit is engineered with the objective of streamlining the construction of Computer Vision models. It offers a consistent interface for all encoders and decoders, thus enabling effortless integration of any desired combination.

Here are just a few of the things that mmit does well:

  • Any encoder works with any decoder at any input size
  • Unified interface for all decoders
  • Support for all pretrained encoders from timm
  • Pretrained encoder+decoders modules 🚧
  • PEP8 compliant (unified code style)
  • Tests, high code coverage and type hints
  • Clean code

Installation

To install mmit:

pip install mmit

Quick Start

Let's look at a super simple example of how to use mmit:

import torch
import mmit

encoder = mmit.create_encoder('resnet18')
decoder = mmit.create_decoder('unetplusplus') # automatically matches encoder output shape!

x = torch.randn(2, 3, 256, 256)
features = encoder(x)
out = decoder(*features)

To Do List

In the future, we plan to add support for:

  • timm encoders
  • some of timm transformers encoders with feature extraction
  • torchvision / torchub models
  • more decoders
  • lightning script to train models
  • multiple heads
  • popular loss function
  • popular datasets
  • popular metrics

Awesome Sources

This project is inspired by, and would not be possible without, the following amazing libraries