Matplotlib Image labeller for classifying images

Overview

mpl-image-labeller

Binder Documentation Status

License PyPI Python Version

Use Matplotlib to label images for classification. Works anywhere Matplotlib does - from the notebook to a standalone gui!

For more see the documentation.

Install

pip install mpl-image-labeller

Key features

  • Simple interface
  • Uses keys instead of mouse
  • Only depends on Matplotlib
    • Works anywhere - from inside Jupyter to any supported GUI framework
  • Displays images with correct aspect ratio
  • Easily configurable keymap
  • Smart interactions with default Matplotlib keymap
  • Callback System (see examples/callbacks.py)

single class per image

gif of usage for labelling images of cats and dogs

multiple classes per image

gif of usage for labelling images of cats and dogs

Usage

import matplotlib.pyplot as plt
import numpy as np

from mpl_image_labeller import image_labeller

images = np.random.randn(5, 10, 10)
labeller = image_labeller(
    images, classes=["good", "bad", "meh"], label_keymap=["a", "s", "d"]
)
plt.show()

accessing the axis You can further modify the image (e.g. add masks over them) by using the plotting methods on axis object accessible by labeller.ax.

Lazy Loading Images If you want to lazy load your images you can provide a function to give the images. This function should take the integer idx as an argument and return the image that corresponds to that index. If you do this then you must also provide N_images in the constructor to let the object know how many images it should expect. See examples/lazy_loading.py for an example.

Controls

  • <- move one image back
  • -> move one image forward

To label images use the keys defined in the label_keymap argument - default 0, 1, 2...

Get the labels by accessing the labels property.

Overwriting default keymap

Matplotlib has default keybindings that it applied to all figures via rcparams.keymap that allow for actions such as s to save or q to quit. If you inlcude one of these keys as a shortcut for labelling as a class then that default keymap will be disabled for that figure.

Related Projects

This is not the first project to implement easy image labelling but seems to be the first to do so entirely in Matplotlib. The below projects implement varying degrees of complexity and/or additional features in different frameworks.

You might also like...
This repository contains several image-to-image translation models, whcih were tested for RGB to NIR image generation. The models are Pix2Pix, Pix2PixHD, CycleGAN and PointWise.

RGB2NIR_Experimental This repository contains several image-to-image translation models, whcih were tested for RGB to NIR image generation. The models

Official implement of Paper:A deeply supervised image fusion network for change detection in high resolution bi-temporal remote sening  images
Official implement of Paper:A deeply supervised image fusion network for change detection in high resolution bi-temporal remote sening images

A deeply supervised image fusion network for change detection in high resolution bi-temporal remote sensing images 深度监督影像融合网络DSIFN用于高分辨率双时相遥感影像变化检测 Of

The first dataset of composite images with rationality score indicating whether the object placement in a composite image is reasonable.
The first dataset of composite images with rationality score indicating whether the object placement in a composite image is reasonable.

Object-Placement-Assessment-Dataset-OPA Object-Placement-Assessment (OPA) is to verify whether a composite image is plausible in terms of the object p

For auto aligning, cropping, and scaling HR and LR images for training image based neural networks

ImgAlign For auto aligning, cropping, and scaling HR and LR images for training image based neural networks Usage Make sure OpenCV is installed, 'pip

Rename Images with Auto Generated Neural Image Captions

Recaption Images with Generated Neural Image Caption Example Usage: Commandline: Recaption all images from folder /home/feng/Downloads/images to folde

A python-image-classification web application project, written in Python and served through the Flask Microframework. This Project implements the VGG16 covolutional neural network, through Keras and Tensorflow wrappers, to make predictions on uploaded images.
Image-to-Image Translation with Conditional Adversarial Networks (Pix2pix) implementation in keras

pix2pix-keras Pix2pix implementation in keras. Original paper: Image-to-Image Translation with Conditional Adversarial Networks (pix2pix) Paper Author

Learning Continuous Image Representation with Local Implicit Image Function
Learning Continuous Image Representation with Local Implicit Image Function

LIIF This repository contains the official implementation for LIIF introduced in the following paper: Learning Continuous Image Representation with Lo

Comments
Releases(1.1.2)
  • 1.1.2(Nov 18, 2022)

  • 1.1.1(Nov 12, 2021)

    What's Changed

    • add github actions test by @ianhi in https://github.com/ianhi/mpl-image-labeller/pull/20
    • Autoscale cmaps + add tests by @ianhi in https://github.com/ianhi/mpl-image-labeller/pull/21
    • Updated callbacks example to show how to adjust overlay extent

    Full Changelog: https://github.com/ianhi/mpl-image-labeller/compare/1.1.0...1.1.1

    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Nov 1, 2021)

    What's Changed

    • Added ability for user to set the title https://github.com/ianhi/mpl-image-labeller/pull/15
    • Updated text positioning for single class labeller

    Full Changelog: https://github.com/ianhi/mpl-image-labeller/compare/1.0.0...1.1.0

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Oct 30, 2021)

  • 0.5.0(Oct 29, 2021)

    • Fixed xlims getting messed up when zooming in https://github.com/ianhi/mpl-image-labeller/pull/9
    • Allow passing imshow_kwargs https://github.com/ianhi/mpl-image-labeller/commit/27afa0bf9633c5f59e2d3089f9fef789147e2b3c
    Source code(tar.gz)
    Source code(zip)
  • 0.4.0(Oct 29, 2021)

  • 0.3.0(Oct 27, 2021)

  • 0.2.0(Oct 27, 2021)

    Full Changelog: https://github.com/ianhi/mpl-image-labeller/compare/0.1.1...0.2.0

    Fixes:

    init_labels is respected

    new features:

    1. ax is not accesible through the .ax attribute
    2. images can now be a callable

    Thanks to @jrussell25 for suggesting these improvements

    Source code(tar.gz)
    Source code(zip)
  • 0.1.1(Oct 27, 2021)

Owner
Ian Hunt-Isaak
The embodiment of entropy - He/Him
Ian Hunt-Isaak
Unofficial implementation (replicates paper results!) of MINER: Multiscale Implicit Neural Representations in pytorch-lightning

MINER_pl Unofficial implementation of MINER: Multiscale Implicit Neural Representations in pytorch-lightning. 📖 Ref readings Laplacian pyramid explan

AI葵 51 Nov 28, 2022
Hierarchical Metadata-Aware Document Categorization under Weak Supervision (WSDM'21)

Hierarchical Metadata-Aware Document Categorization under Weak Supervision This project provides a weakly supervised framework for hierarchical metada

Yu Zhang 53 Sep 17, 2022
Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising

Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising

Kai Zhang 1.2k Dec 29, 2022
[ICCV'21] PlaneTR: Structure-Guided Transformers for 3D Plane Recovery

PlaneTR: Structure-Guided Transformers for 3D Plane Recovery This is the official implementation of our ICCV 2021 paper News There maybe some bugs in

73 Nov 30, 2022
Companion repo of the UCC 2021 paper "Predictive Auto-scaling with OpenStack Monasca"

Predictive Auto-scaling with OpenStack Monasca Giacomo Lanciano*, Filippo Galli, Tommaso Cucinotta, Davide Bacciu, Andrea Passarella 2021 IEEE/ACM 14t

Giacomo Lanciano 0 Dec 07, 2022
TensorFlow code for the neural network presented in the paper: "Structural Language Models of Code" (ICML'2020)

SLM: Structural Language Models of Code This is an official implementation of the model described in: "Structural Language Models of Code" [PDF] To ap

73 Nov 06, 2022
This is a code repository for the paper "Graph Auto-Encoders for Financial Clustering".

Repository for the paper "Graph Auto-Encoders for Financial Clustering" Requirements Python 3.6 torch torch_geometric Instructions This is a simple c

Edward Turner 1 Dec 02, 2021
Distributed Evolutionary Algorithms in Python

DEAP DEAP is a novel evolutionary computation framework for rapid prototyping and testing of ideas. It seeks to make algorithms explicit and data stru

Distributed Evolutionary Algorithms in Python 4.9k Jan 05, 2023
Build a small, 3 domain internet using Github pages and Wikipedia and construct a crawler to crawl, render, and index.

TechSEO Crawler Build a small, 3 domain internet using Github pages and Wikipedia and construct a crawler to crawl, render, and index. Play with the r

JR Oakes 57 Nov 24, 2022
Implementation for our ICCV 2021 paper: Dual-Camera Super-Resolution with Aligned Attention Modules

DCSR: Dual Camera Super-Resolution Implementation for our ICCV 2021 oral paper: Dual-Camera Super-Resolution with Aligned Attention Modules paper | pr

Tengfei Wang 110 Dec 20, 2022
[NeurIPS-2021] Mosaicking to Distill: Knowledge Distillation from Out-of-Domain Data

MosaicKD Code for NeurIPS-21 paper "Mosaicking to Distill: Knowledge Distillation from Out-of-Domain Data" 1. Motivation Natural images share common l

ZJU-VIPA 37 Nov 10, 2022
Code and datasets for the paper "KnowPrompt: Knowledge-aware Prompt-tuning with Synergistic Optimization for Relation Extraction"

KnowPrompt Code and datasets for our paper "KnowPrompt: Knowledge-aware Prompt-tuning with Synergistic Optimization for Relation Extraction" Requireme

ZJUNLP 137 Dec 31, 2022
Bonnet: An Open-Source Training and Deployment Framework for Semantic Segmentation in Robotics.

Bonnet: An Open-Source Training and Deployment Framework for Semantic Segmentation in Robotics. By Andres Milioto @ University of Bonn. (for the new P

Photogrammetry & Robotics Bonn 314 Dec 30, 2022
AutoML library for deep learning

Official Website: autokeras.com AutoKeras: An AutoML system based on Keras. It is developed by DATA Lab at Texas A&M University. The goal of AutoKeras

Keras 8.7k Jan 08, 2023
The Instructed Glacier Model (IGM)

The Instructed Glacier Model (IGM) Overview The Instructed Glacier Model (IGM) simulates the ice dynamics, surface mass balance, and its coupling thro

27 Dec 16, 2022
A Data Annotation Tool for Semantic Segmentation, Object Detection and Lane Line Detection.(In Development Stage)

Data-Annotation-Tool How to Run this Tool? To run this software, follow the steps: git clone https://github.com/Autonomous-Car-Project/Data-Annotation

TiVRA AI 13 Aug 18, 2022
PyTorch code for our paper "Attention in Attention Network for Image Super-Resolution"

Under construction... Attention in Attention Network for Image Super-Resolution (A2N) This repository is an PyTorch implementation of the paper "Atten

Haoyu Chen 71 Dec 30, 2022
From a body shape, infer the anatomic skeleton.

OSSO: Obtaining Skeletal Shape from Outside (CVPR 2022) This repository contains the official implementation of the skeleton inference from: OSSO: Obt

Marilyn Keller 166 Dec 28, 2022
This is the source code for: Context-aware Entity Typing in Knowledge Graphs.

This is the source code for: Context-aware Entity Typing in Knowledge Graphs.

9 Sep 01, 2022
Spiking Neural Network for Computer Vision using SpikingJelly framework and Pytorch-Lightning

Spiking Neural Network for Computer Vision using SpikingJelly framework and Pytorch-Lightning

Sami BARCHID 2 Oct 20, 2022