Skip to main content

An user-friendly plugin that enables to annotate images from a pre-trained model (segmentation, classification, detection) given by an user.

Project description

manini

License BSD-3 PyPI Python Version tests codecov napari hub

Manini is thought as a tool to boost the collaborative contribution of end-users to the assessment of deep learning model during their testing phase. It is a user-Friendly plugin that enables to manually correct the result of an inference of deep learning model by an end-user. The plugin covers the following informational tasks: segmentation, classification and object detection.


This plugin was written by Herearii Metuarea, PHENET engineer at LARIS (French laboratory located in Angers, France) in Imhorphen team, french scientific research team lead by David Rousseau (Full professor). This plugin was designed in the context of the european project INVITE and PHENET.

Screenshot from 2023-11-13 00-13-13

The Manini plugin for napari a tool to perform image inference from a pre-trained model (tensorflow .h5) and then annotate the resulting images with the tools provided by napari. Its development is ongoing.

Screencast from 24-01-2023 14 00 51


This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.

Installation

You can install manini via pip:

pip install manini

To install latest development version :

pip install git+https://github.com/hereariim/manini.git

Description

This plugin is a tool to perform 2D image inference. The inference is open to the model for image segmentation (binary or multiclass), image classification and object detection. This tool is compatible with tensorflow h5 models. In this format, the h5 file must contain all the elements of the model (architecture, weights, etc).

Image segmentation

This tool allows image inference from a segmentation model.

Input

The user must deposit two items (+1 optional item).

  • A compressed file (.zip) containing the images in RGB
.
└── input.zip
    ├── im_1.JPG
    ├── im_2.JPG 
    ├── im_3.JPG
    ...
    └── im_n.JPG
  • A tensorflow h5 file (.h5) which is the segmentation model
  • A text file (.txt) containing the names of the classes (optional)

The Ok button is used to validate the imported elements. The Run button is used to launch the segmentation.

Processing

Once the image inference is complete, the plugin returns a drop-down menu showing a list of RGB images contained in the compressed file. When the user clicks on an image displayed in this list, one items appear in the napari window:

  • A menu that presents a list of the classes given as input

cpe

A widget also appears to the right of the window. This is a list of the classes in the model with their associated colours. In this tool, the number of classes is limited to 255.

The user can make annotations on the layer label. For example, the user can correct mispredicted pixels by annotating them with a brush or an eraser.

Output

The Save button allows you to obtain a compressed image file. This file contains folders containing the RGB images and their greyscale mask.

Image classification

This tool performs image inference from an image classification model.

Input

This tool offers three mandatory inputs:

  • A compressed file (.zip) containing the RGB images
.
└── input.zip
    ├── im_1.JPG
    ├── im_2.JPG 
    ├── im_3.JPG
    ...
    └── im_n.JPG
  • A tensorflow h5 (.h5) file which is the image classification model
  • A text file (.txt) containing the class names

The Ok button is used to validate the imported elements. The Run button is used to launch the classification.

Processing

Once the image inference is complete, the plugin returns one elements :

  • an table containing the predicted class for each image.

cpe2

The user can change the predicted class by selecting a class displayed in the associated drop-down menu for an image.

Output

The Save button allows you to obtain a csv file. This file is the table on which the user had made his modifications.

Detection

This tool performs image inference from an yolo object detection model.

Input

The user must deposit two items (+1 optional item).

  • A compressed file (.zip) containing the images in RGB
.
└── input.zip
    ├── im_1.JPG
    ├── im_2.JPG 
    ├── im_3.JPG
    ...
    └── im_n.JPG
  • A tensorflow h5 file (.h5) which is the detection model
  • A text file (.txt) containing the names of the classes (optional)

The Ok button is used to validate the imported elements. The Run button is used to launch the segmentation.

Processing

When the prediction of bounding box coordinates is complete for each image, the plugin returns one elements:

  • A menu that presents a list of the classes given as input

Screenshot from 2023-01-24 10-33-07

The window displays the bounding boxes and the RGB image. The bounding box coordinates are taken from the json file which is an output file of the darknet detector test command. The user can update these coordinates by deleting or adding one or more bounding boxes. From the list of classes, the user can quickly add a bounding box to the image.

Output

The Save button allows you to obtain a json file. This file contains for each image, the bounding box coordinates and the class for each detected object.

License

Distributed under the terms of the BSD-3 license, "manini" is free and open source software

Citation

Herearii Metuarea, David Rousseau. Toward more collaborative deep learning project management in plant phenotyping. ESS Open Archive . October 31, 2023. DOI: 10.22541/essoar.169876925.51005273/v1

Issues

If you encounter any problems, please file an issue along with a detailed description.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

manini-0.0.5.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

manini-0.0.5-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file manini-0.0.5.tar.gz.

File metadata

  • Download URL: manini-0.0.5.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for manini-0.0.5.tar.gz
Algorithm Hash digest
SHA256 149beb0085170deba2a2a6021c1880a2aa7b39df903f16e29572e08958ad4492
MD5 a0542c6ce7843c5f1db251c58585f5fa
BLAKE2b-256 0d0dd6c995f4df9d01f0a5a19342d399926aef5c055b649e80d6d24c2cc57a3c

See more details on using hashes here.

File details

Details for the file manini-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: manini-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for manini-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 37ad9578a54f744a53eba448c1acc572ce77cb2c2f64f929da043be196a3654c
MD5 c3c385da28d74e97c5aaad1bcde9cdbd
BLAKE2b-256 51be4ea9bf178eef7843d22b8c7c2d8603d9e1fd4d51077628526269495b0380

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page