# Efficient and Lightweight Ear Segmentation
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/umitkacar/Ear-segmentation-ai/main.svg)](https://results.pre-commit.ci/latest/github/umitkacar/Ear-segmentation-ai/main)
<p>
<img alt="Python38" src="https://img.shields.io/badge/Python-3.8-3776AB.svg?logo=Python&logoColor=white"/>
<img alt="Python39" src="https://img.shields.io/badge/Python-3.9-3776AB.svg?logo=Python&logoColor=white"/>
<img alt="Python310" src="https://img.shields.io/badge/Python-3.10-3776AB.svg?logo=Python&logoColor=white"/>
<img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-v1.13.1-EE4C2C.svg?logo=PyTorch&logoColor=white"/>
<img alt="Torchvision" src="https://img.shields.io/badge/Torchvision-v0.14.1-EE4C2C.svg?logo=PyTorch&logoColor=white"/>
<img alt="Cuda" src="https://img.shields.io/badge/Cuda-Enabled-76B900.svg?logo=Nvidia&logoColor=white"/>
<img alt="Poetry" src="https://img.shields.io/badge/Poetry-60A5FA.svg?logo=Poetry&logoColor=white"/>
<img alt="Black" src="https://img.shields.io/badge/code%20style-black-black"/>
<img alt="Mypy" src="https://img.shields.io/badge/mypy-checked-blue"/>
<img alt="isort" src="https://img.shields.io/badge/isort-checked-yellow"/>
</p>
## Download Model 📂
<p>
<a href="https://drive.google.com/drive/folders/1l88PrrNESBDZ4Jd3QJSG9EbIe0CjXC_j?usp=sharing"><img alt="GoogleDrive" src="https://img.shields.io/badge/GoogleDrive-4285F4?logo=GoogleDrive&logoColor=white"></a>
<a href="https://github.com/umitkacar/Ear-segmentation-ai/releases/download/v1.0.0/earsegmentation_model_v1_46.pth"><img alt="Github" src="https://img.shields.io/badge/Github Download-181717?logo=Github&logoColor=white"></a>
</p>
## ⚙️ Requirements ⚙️
* Python 3.8 to Python3.10 (Virtualenv recommended)
* Display Server for showing results
* Optional: poetry
* Optional: Nvidia CUDA for cuda usage
## 🛠️ Installation 🛠️
### Pip installation
```bash
pip install -r requirements.txt
```
### Poetry installation
```bash
poetry shell
poetry install
```
## Optional (If you have multiple python installation)
```bash
poetry env use $(which python3.10)
poetry shell
poetry install
```
## Usage
```
usage: earsegmentationai_cli.py [-h] -m {c,p} [-d [{cpu,cuda}]] [-fp FOLDERPATH] [-id [DEVICEID]]
options:
-h, --help show this help message and exit
-m {c,p}, --mode {c,p}
Select camera or picture mode
-d [{cpu,cuda}], --device [{cpu,cuda}]
Run in gpu or cpu mode
-fp FOLDERPATH, --folderpath FOLDERPATH
Folder path for image(s) for image mode only
-id [DEVICEID], --deviceId [DEVICEID]
Camera deviceId /dev/videoX for camera mode only
```
## Webcam Mode 📷
```bash
python earsegmentationai_cli.py --mode c --device cpu
python earsegmentationai_cli.py --mode c --device cuda
python earsegmentationai_cli.py --mode c --deviceId 1 --device cuda
```
## Image Mode 🖼️
```bash
python earsegmentationai_cli.py --mode p --fp /path/xxx/
```
## Youtube Video 📸 ✨
<p>
<a href="https://www.youtube.com/watch?v=5Puxj7Q0EEo"><img alt="Youtube" src="https://img.shields.io/badge/Youtube-FF0000?logo=Youtube&logoColor=white"></a>
</p>
Raw data
{
"_id": null,
"home_page": "https://github.com/umitkacar/Ear-segmentation-ai",
"name": "earsegmentationai",
"maintainer": "Umit KACAR",
"docs_url": null,
"requires_python": ">=3.8,<3.11",
"maintainer_email": "umitkacar.phd@gmail.com",
"keywords": "pytorch,ear,segmentation,ear-segmentation,linux,segmentation_models",
"author": "Umit KACAR",
"author_email": "umitkacar.phd@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/db/09/7096c793d6357893542eb318f2318be73c37e32eb367037db7c5cf4b7e00/earsegmentationai-1.0.2.tar.gz",
"platform": null,
"description": "# Efficient and Lightweight Ear Segmentation\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/umitkacar/Ear-segmentation-ai/main.svg)](https://results.pre-commit.ci/latest/github/umitkacar/Ear-segmentation-ai/main)\n<p>\n <img alt=\"Python38\" src=\"https://img.shields.io/badge/Python-3.8-3776AB.svg?logo=Python&logoColor=white\"/>\n <img alt=\"Python39\" src=\"https://img.shields.io/badge/Python-3.9-3776AB.svg?logo=Python&logoColor=white\"/>\n <img alt=\"Python310\" src=\"https://img.shields.io/badge/Python-3.10-3776AB.svg?logo=Python&logoColor=white\"/>\n <img alt=\"PyTorch\" src=\"https://img.shields.io/badge/PyTorch-v1.13.1-EE4C2C.svg?logo=PyTorch&logoColor=white\"/>\n <img alt=\"Torchvision\" src=\"https://img.shields.io/badge/Torchvision-v0.14.1-EE4C2C.svg?logo=PyTorch&logoColor=white\"/>\n <img alt=\"Cuda\" src=\"https://img.shields.io/badge/Cuda-Enabled-76B900.svg?logo=Nvidia&logoColor=white\"/>\n <img alt=\"Poetry\" src=\"https://img.shields.io/badge/Poetry-60A5FA.svg?logo=Poetry&logoColor=white\"/>\n <img alt=\"Black\" src=\"https://img.shields.io/badge/code%20style-black-black\"/>\n <img alt=\"Mypy\" src=\"https://img.shields.io/badge/mypy-checked-blue\"/>\n <img alt=\"isort\" src=\"https://img.shields.io/badge/isort-checked-yellow\"/>\n</p>\n\n## Download Model \ud83d\udcc2\n\n<p>\n<a href=\"https://drive.google.com/drive/folders/1l88PrrNESBDZ4Jd3QJSG9EbIe0CjXC_j?usp=sharing\"><img alt=\"GoogleDrive\" src=\"https://img.shields.io/badge/GoogleDrive-4285F4?logo=GoogleDrive&logoColor=white\"></a>\n<a href=\"https://github.com/umitkacar/Ear-segmentation-ai/releases/download/v1.0.0/earsegmentation_model_v1_46.pth\"><img alt=\"Github\" src=\"https://img.shields.io/badge/Github Download-181717?logo=Github&logoColor=white\"></a>\n</p>\n\n## \u2699\ufe0f Requirements \u2699\ufe0f\n\n* Python 3.8 to Python3.10 (Virtualenv recommended)\n* Display Server for showing results\n* Optional: poetry\n* Optional: Nvidia CUDA for cuda usage\n\n## \ud83d\udee0\ufe0f Installation \ud83d\udee0\ufe0f\n\n### Pip installation\n\n```bash\npip install -r requirements.txt\n```\n\n### Poetry installation\n\n```bash\npoetry shell\npoetry install\n```\n\n## Optional (If you have multiple python installation)\n\n```bash\npoetry env use $(which python3.10)\npoetry shell\npoetry install\n```\n\n## Usage\n\n```\nusage: earsegmentationai_cli.py [-h] -m {c,p} [-d [{cpu,cuda}]] [-fp FOLDERPATH] [-id [DEVICEID]]\n\noptions:\n -h, --help show this help message and exit\n -m {c,p}, --mode {c,p}\n Select camera or picture mode\n -d [{cpu,cuda}], --device [{cpu,cuda}]\n Run in gpu or cpu mode\n -fp FOLDERPATH, --folderpath FOLDERPATH\n Folder path for image(s) for image mode only\n -id [DEVICEID], --deviceId [DEVICEID]\n Camera deviceId /dev/videoX for camera mode only\n```\n\n## Webcam Mode \ud83d\udcf7\n\n```bash\npython earsegmentationai_cli.py --mode c --device cpu\npython earsegmentationai_cli.py --mode c --device cuda\npython earsegmentationai_cli.py --mode c --deviceId 1 --device cuda\n```\n\n## Image Mode \ud83d\uddbc\ufe0f\n\n```bash\npython earsegmentationai_cli.py --mode p --fp /path/xxx/\n```\n\n## Youtube Video \ud83d\udcf8 \u2728\n\n<p>\n<a href=\"https://www.youtube.com/watch?v=5Puxj7Q0EEo\"><img alt=\"Youtube\" src=\"https://img.shields.io/badge/Youtube-FF0000?logo=Youtube&logoColor=white\"></a>\n</p>\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Pytorch Based - Efficient and Lightweight Ear Segmentation",
"version": "1.0.2",
"split_keywords": [
"pytorch",
"ear",
"segmentation",
"ear-segmentation",
"linux",
"segmentation_models"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "fbaa4e51970dc7c3b1c763c5cdd2198f",
"sha256": "2397ca0d704515c8ffeac6b42362ebe6b07817323ffa688c608c0be7d781036e"
},
"downloads": -1,
"filename": "earsegmentationai-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fbaa4e51970dc7c3b1c763c5cdd2198f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<3.11",
"size": 10483,
"upload_time": "2023-01-01T06:33:18",
"upload_time_iso_8601": "2023-01-01T06:33:18.025400Z",
"url": "https://files.pythonhosted.org/packages/fa/3c/a4c415135afcbb925d97fee45534448cfc0c416736398e9684c37f317e00/earsegmentationai-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "9489b7f8fe9e8fd82dc11091f0a5bebd",
"sha256": "112574ac0c64c211215d7494ca1324b32b45c6f50bd8d59e8a7d1688fc05b015"
},
"downloads": -1,
"filename": "earsegmentationai-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "9489b7f8fe9e8fd82dc11091f0a5bebd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<3.11",
"size": 7336,
"upload_time": "2023-01-01T06:33:19",
"upload_time_iso_8601": "2023-01-01T06:33:19.350011Z",
"url": "https://files.pythonhosted.org/packages/db/09/7096c793d6357893542eb318f2318be73c37e32eb367037db7c5cf4b7e00/earsegmentationai-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-01 06:33:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "umitkacar",
"github_project": "Ear-segmentation-ai",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "albumentations",
"specs": [
[
"==",
"1.3.0"
]
]
},
{
"name": "bandit",
"specs": [
[
"==",
"1.7.4"
]
]
},
{
"name": "black",
"specs": [
[
"==",
"22.12.0"
]
]
},
{
"name": "certifi",
"specs": [
[
"==",
"2022.12.7"
]
]
},
{
"name": "cfgv",
"specs": [
[
"==",
"3.3.1"
]
]
},
{
"name": "charset-normalizer",
"specs": [
[
"==",
"2.1.1"
]
]
},
{
"name": "click",
"specs": [
[
"==",
"8.1.3"
]
]
},
{
"name": "contourpy",
"specs": [
[
"==",
"1.0.6"
]
]
},
{
"name": "coverage",
"specs": [
[
"==",
"7.0.1"
]
]
},
{
"name": "cycler",
"specs": [
[
"==",
"0.11.0"
]
]
},
{
"name": "debugpy",
"specs": [
[
"==",
"1.6.4"
]
]
},
{
"name": "distlib",
"specs": [
[
"==",
"0.3.6"
]
]
},
{
"name": "earsegmentationai",
"specs": []
},
{
"name": "efficientnet-pytorch",
"specs": [
[
"==",
"0.7.1"
]
]
},
{
"name": "filelock",
"specs": [
[
"==",
"3.9.0"
]
]
},
{
"name": "fonttools",
"specs": [
[
"==",
"4.38.0"
]
]
},
{
"name": "gitdb",
"specs": [
[
"==",
"4.0.10"
]
]
},
{
"name": "GitPython",
"specs": [
[
"==",
"3.1.30"
]
]
},
{
"name": "identify",
"specs": [
[
"==",
"2.5.11"
]
]
},
{
"name": "idna",
"specs": [
[
"==",
"3.4"
]
]
},
{
"name": "imageio",
"specs": [
[
"==",
"2.23.0"
]
]
},
{
"name": "imgviz",
"specs": [
[
"==",
"1.6.2"
]
]
},
{
"name": "joblib",
"specs": [
[
"==",
"1.2.0"
]
]
},
{
"name": "kiwisolver",
"specs": [
[
"==",
"1.4.4"
]
]
},
{
"name": "matplotlib",
"specs": [
[
"==",
"3.6.2"
]
]
},
{
"name": "munch",
"specs": [
[
"==",
"2.5.0"
]
]
},
{
"name": "mypy",
"specs": [
[
"==",
"0.991"
]
]
},
{
"name": "mypy-extensions",
"specs": [
[
"==",
"0.4.3"
]
]
},
{
"name": "networkx",
"specs": [
[
"==",
"2.8.8"
]
]
},
{
"name": "nodeenv",
"specs": [
[
"==",
"1.7.0"
]
]
},
{
"name": "numpy",
"specs": [
[
"==",
"1.24.1"
]
]
},
{
"name": "nvidia-cublas-cu11",
"specs": [
[
"==",
"11.10.3.66"
]
]
},
{
"name": "nvidia-cuda-nvrtc-cu11",
"specs": [
[
"==",
"11.7.99"
]
]
},
{
"name": "nvidia-cuda-runtime-cu11",
"specs": [
[
"==",
"11.7.99"
]
]
},
{
"name": "nvidia-cudnn-cu11",
"specs": [
[
"==",
"8.5.0.96"
]
]
},
{
"name": "opencv-python",
"specs": [
[
"==",
"4.6.0.66"
]
]
},
{
"name": "opencv-python-headless",
"specs": [
[
"==",
"4.6.0.66"
]
]
},
{
"name": "packaging",
"specs": [
[
"==",
"22.0"
]
]
},
{
"name": "pastel",
"specs": [
[
"==",
"0.2.1"
]
]
},
{
"name": "pathspec",
"specs": [
[
"==",
"0.10.3"
]
]
},
{
"name": "pbr",
"specs": [
[
"==",
"5.11.0"
]
]
},
{
"name": "Pillow",
"specs": [
[
"==",
"9.3.0"
]
]
},
{
"name": "platformdirs",
"specs": [
[
"==",
"2.6.2"
]
]
},
{
"name": "poethepoet",
"specs": [
[
"==",
"0.17.1"
]
]
},
{
"name": "pre-commit",
"specs": [
[
"==",
"2.21.0"
]
]
},
{
"name": "pretrainedmodels",
"specs": [
[
"==",
"0.7.4"
]
]
},
{
"name": "pyparsing",
"specs": [
[
"==",
"3.0.9"
]
]
},
{
"name": "python-dateutil",
"specs": [
[
"==",
"2.8.2"
]
]
},
{
"name": "pytoolconfig",
"specs": [
[
"==",
"1.2.4"
]
]
},
{
"name": "pyupgrade",
"specs": [
[
"==",
"3.3.1"
]
]
},
{
"name": "PyWavelets",
"specs": [
[
"==",
"1.4.1"
]
]
},
{
"name": "PyYAML",
"specs": [
[
"==",
"6.0"
]
]
},
{
"name": "qudida",
"specs": [
[
"==",
"0.0.4"
]
]
},
{
"name": "requests",
"specs": [
[
"==",
"2.28.1"
]
]
},
{
"name": "rope",
"specs": [
[
"==",
"1.6.0"
]
]
},
{
"name": "ruff",
"specs": [
[
"==",
"0.0.203"
]
]
},
{
"name": "scikit-image",
"specs": [
[
"==",
"0.19.3"
]
]
},
{
"name": "scikit-learn",
"specs": [
[
"==",
"1.2.0"
]
]
},
{
"name": "scipy",
"specs": [
[
"==",
"1.9.3"
]
]
},
{
"name": "segmentation-models-pytorch",
"specs": [
[
"==",
"0.3.1"
]
]
},
{
"name": "six",
"specs": [
[
"==",
"1.16.0"
]
]
},
{
"name": "smmap",
"specs": [
[
"==",
"5.0.0"
]
]
},
{
"name": "stevedore",
"specs": [
[
"==",
"4.1.1"
]
]
},
{
"name": "threadpoolctl",
"specs": [
[
"==",
"3.1.0"
]
]
},
{
"name": "tifffile",
"specs": [
[
"==",
"2022.10.10"
]
]
},
{
"name": "timm",
"specs": [
[
"==",
"0.4.12"
]
]
},
{
"name": "tokenize-rt",
"specs": [
[
"==",
"5.0.0"
]
]
},
{
"name": "tomli",
"specs": [
[
"==",
"2.0.1"
]
]
},
{
"name": "torch",
"specs": [
[
"==",
"1.13.1"
]
]
},
{
"name": "torchvision",
"specs": [
[
"==",
"0.14.1"
]
]
},
{
"name": "tqdm",
"specs": [
[
"==",
"4.64.1"
]
]
},
{
"name": "types-requests",
"specs": [
[
"==",
"2.28.11.7"
]
]
},
{
"name": "types-urllib3",
"specs": [
[
"==",
"1.26.25.4"
]
]
},
{
"name": "typing_extensions",
"specs": [
[
"==",
"4.4.0"
]
]
},
{
"name": "urllib3",
"specs": [
[
"==",
"1.26.13"
]
]
},
{
"name": "virtualenv",
"specs": [
[
"==",
"20.17.1"
]
]
}
],
"lcname": "earsegmentationai"
}