/shapedata

library to modify images and the corresponding landmarks

Primary LanguagePythonGNU Affero General Public License v3.0AGPL-3.0

ShapeData

PyPI version Build Status Documentation Status codecov LICENSE

This repository contains image classes to perform transformations on images with landmarks (similar to menpo but with much less dependencies). It also provides some basic Datasets for delira

Installation

This package can be installed via pip install shapedata

Basic Usage

To load a single image with landmarks you can simply do

import shapedata
img = shapedata.SingleShapeSingleImage2D.from_files("./example_files/lenna.png")

and to view this image do

from matplotlib import pyplot as plt
img.view(view_landmarks=True)
plt.show()

To augment the image you can use img.transform() to transform the image with the origin as transformation base or img.transform_about_centre() to use the images's center as transformation base. Transformations as img.translate(), img.rotate(), img.rescale() or img.resize() are also implemented and will fall back on img.transform() or img.transform_about_centre()

To access the image itself you can do img.img and accessing the landmarks works with img.lmk for instances of SingleShapeSingleImage For further usage have a look at the datasets and docstrings.

Licensing

Copyright (C) 2020 by RWTH Aachen University
http://www.rwth-aachen.de

License:
This software is dual-licensed under:
• Commercial license (please contact: lfb@lfb.rwth-aachen.de)
• AGPL (GNU Affero General Public License) open source license