Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/malolm/imgutils-amadeus
low version of imgutils for amadeus
https://github.com/malolm/imgutils-amadeus
Last synced: 13 days ago
JSON representation
low version of imgutils for amadeus
- Host: GitHub
- URL: https://github.com/malolm/imgutils-amadeus
- Owner: MaloLM
- License: mit
- Created: 2024-12-22T11:51:04.000Z (18 days ago)
- Default Branch: main
- Last Pushed: 2024-12-22T12:22:23.000Z (18 days ago)
- Last Synced: 2024-12-22T13:25:24.528Z (18 days ago)
- Language: Python
- Size: 46.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# imgutils
[![GitHub license](https://img.shields.io/github/license/deepghs/imgutils)](https://github.com/deepghs/imgutils/blob/master/LICENSE)
A convenient and user-friendly anime-style image data processing library that integrates various advanced anime-style
image processing models.This python package is based on [deepghs/imgutils](https://github.com/deepghs/imgutils) work.
## Installation
You can simply install it with `pip` command line from the official PyPI site.
```shell
pip install -e .
```For more information about installation, you can refer
to [Installation](https://deepghs.github.io/imgutils/main/tutorials/installation/index.html).### Object Detection
Currently, object detection is supported for anime heads and person, as shown below
- Face Detection
- Head Detection
- Person Detection
Based on practical tests, head detection currently has a very stable performance and can be used for automation tasks.
However, person detection is still being further iterated and will focus on enhancing detection capabilities for
artistic illustrations in the future.The head detection model can be found at https://huggingface.co/deepghs/anime_head_detection .
### Truncated Image Check
The following code can be used to detect incomplete image files (such as images interrupted during the download
process):```python
from imgutils.validate import is_truncated_fileif __name__ == '__main__':
filename = 'test_jpg.jpg'
if is_truncated_file(filename):
print('This image is truncated, you\'d better '
'remove this shit from your dataset.')
else:
print('This image is okay!')```
### Character Extraction
When we need to extract the character parts from anime images, we can use
the [`segment-rgba-with-isnetis`](https://deepghs.github.io/imgutils/main/api_doc/segment/isnetis.html#segment-rgba-with-isnetis)
function for extraction and obtain an RGBA format image (with the background part being transparent), just like the
example shown below.```python
from imgutils.segment import segment_rgba_with_isnetismask_, image_ = segment_rgba_with_isnetis('hutao.png')
image_.save('hutao_seg.png')mask_, image_ = segment_rgba_with_isnetis('skadi.jpg')
image_.save('skadi_seg.png')
```This model can be found at https://huggingface.co/skytnt/anime-seg .