https://github.com/justusschock/shapedata
library to modify images and the corresponding landmarks
https://github.com/justusschock/shapedata
delira image-augmentation image-manipulation image-processing image-transformation keypoints landmark-detection landmarking landmarks landmarks-resizer shape shape-analysis
Last synced: 9 months ago
JSON representation
library to modify images and the corresponding landmarks
- Host: GitHub
- URL: https://github.com/justusschock/shapedata
- Owner: justusschock
- License: agpl-3.0
- Created: 2019-01-30T14:35:35.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-05T14:14:39.000Z (about 6 years ago)
- Last Synced: 2025-03-31T22:23:07.863Z (11 months ago)
- Topics: delira, image-augmentation, image-manipulation, image-processing, image-transformation, keypoints, landmark-detection, landmarking, landmarks, landmarks-resizer, shape, shape-analysis
- Language: Python
- Homepage: https://shapedata.rtfd.io
- Size: 549 KB
- Stars: 6
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ShapeData
[](https://badge.fury.io/py/shapedata) [](https://travis-ci.com/justusschock/shapedata) [](https://shapedata.readthedocs.io/en/master/?badge=master) [](https://codecov.io/gh/justusschock/shapedata) 
This repository contains image classes to perform transformations on images with landmarks (similar to [menpo](https://github.com/menpo/menpo) but with much less dependencies). It also provides some basic Datasets for [delira](https://github.com/justusschock/delira)
## Installation
This package can be installed via `pip install shapedata`
## Basic Usage
To load a single image with landmarks you can simply do
```python
import shapedata
img = shapedata.SingleShapeSingleImage2D.from_files("./example_files/lenna.png")
```
and to view this image do
```python
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