Skip to content

umitkacar/Ear-segmentation-ai

Repository files navigation

Efficient and Lightweight Ear Segmentation

License: MIT pre-commit.ci status PyPI PyPI - Downloads PyPI - Format PyPI - Status PyPI - Implementation PyPI - Wheel security: bandit Ruff

main-ci Release to PyPi

Python38 Python39 Python310 PyTorch Torchvision Torchvision OpenCV Cuda Poetry Black Mypy isort

Download Model 📂

GoogleDrive Github

⚙️ 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

pip install -r requirements.txt

Poetry installation

poetry shell
poetry install

Optional (If you have multiple python installation)

poetry env use $(which python3.10)
poetry shell
poetry install

Usage

earsegmentationai --help
 Usage: earsegmentationai [OPTIONS] COMMAND [ARGS]...

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion          Install completion for the current shell.                                          │
│ --show-completion             Show completion for the current shell, to copy it or customize the installation.   │
│ --help                        Show this message and exit.                                                        │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ picture-capture                                                                                                  │
│ version                                                                                                          │
│ video-capture                                                                                                    │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Webcam Mode 📷

python -m earsegmentationai.main webcam-capture --deviceid 1 --device "cpu"
python -m earsegmentationai.main webcam-capture --deviceid 1 --device "cuda:0"

Image Mode 🖼️

python -m earsegmentationai.main picture-capture --folderpath "/path/filename.png" --device "cpu"
python -m earsegmentationai.main picture-capture --folderpath "/path/filename.png" --device "cuda:0"

Youtube Video 📸 ✨

Youtube