Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reshalfahsi/ggb
Implementation of GGB color space
https://github.com/reshalfahsi/ggb
ggb-color image-processing medical-image-processing opencv pillow python skimage
Last synced: about 7 hours ago
JSON representation
Implementation of GGB color space
- Host: GitHub
- URL: https://github.com/reshalfahsi/ggb
- Owner: reshalfahsi
- License: mit
- Created: 2019-10-30T07:46:10.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-23T03:24:13.000Z (9 months ago)
- Last Synced: 2024-10-13T03:38:21.403Z (about 1 month ago)
- Topics: ggb-color, image-processing, medical-image-processing, opencv, pillow, python, skimage
- Language: Python
- Homepage: https://ggb.readthedocs.io
- Size: 1.12 MB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GGB Color Space
[![PyPI](https://badge.fury.io/py/ggb.svg)](https://badge.fury.io/py/ggb)
[![license](https://img.shields.io/pypi/l/ggb.svg)](https://github.com/reshalfahsi/ggb/blob/master/LICENSE)
[![Travis CI](https://api.travis-ci.com/reshalfahsi/ggb.svg?branch=master)](https://travis-ci.com/github/reshalfahsi/ggb)
[![docker](https://img.shields.io/docker/pulls/reshalfahsi/ggb)](https://hub.docker.com/r/reshalfahsi/ggb)
[![codecov](https://codecov.io/github/reshalfahsi/ggb/coverage.svg?branch=master&precision=2)](https://codecov.io/gh/reshalfahsi/ggb)This package is implementation of GGB color space from [Development of a Robust Algorithm for Detection of Nuclei and Classification of White Blood Cells in Peripheral Blood Smear Image](https://link.springer.com/content/pdf/10.1007%2Fs10916-018-0962-1.pdf).
## Installation
### Install GGB
This package could be installed via [PyPI](https://pypi.org/project/ggb/).
pip3 install ggb
or manually:
python3 setup.py install
### Building Docker Image
`Dockerfile` is also provided in this project. To build the image:
```bash
cd docker/
bash docker.build.sh
```or pull it directly from [Docker Hub](https://hub.docker.com/r/reshalfahsi/ggb):
docker pull reshalfahsi/ggb
### Building the Documentation
The documentations to this package could be built using [Sphinx](www.sphinx-doc.org).
```bash
cd docs/
pip3 install -r requirements.txt
make html
```The HTML pages are in docs/build/html.
## Quick Demo
This package supports various computer vision libraries such as OpenCV and PIL. Complete examples for these computer vision libraries are provided in [here](https://github.com/reshalfahsi/ggb/tree/master/examples). For the short example in Python3:
```python
# import the package and its necessary components
from ggb import GGB, ColorSpace# we are using OpenCV
import cv2import urllib.request as urllib
import numpy as np# load image from internet
req = urllib.urlopen('https://github.com/reshalfahsi/GGB/raw/master/docs/img/leukocytes.png')
arr = np.asarray(bytearray(req.read()), dtype=np.uint8)
img = cv2.imdecode(arr, -1)
# convert to GGB Color
ggb_image = GGB(image=img, input_color=ColorSpace.BGR).process()# show the result
ggb_image.show()# save the image to OpenCV format
img = ggb_image.write()
```This package also could be run through CLI:
ggb /path/to/image --output /path/to/output
## Result
### Leukocytes
![alt text](https://github.com/reshalfahsi/GGB/raw/master/docs/img/GGB_RGB_LEUKOCYTES.jpg)### Fundus
![alt text](https://github.com/reshalfahsi/GGB/raw/master/docs/img/GGB_RGB_FUNDUS.jpg)### Car
![alt text](https://github.com/reshalfahsi/GGB/raw/master/docs/img/GGB_RGB_TESLA.jpg)