A CLI tool that detects alcohol intoxication from facial images.
Project description
Sober Scan
A CLI tool that detects alcohol intoxication from facial images.
#Alcohol Intoxication #Facial Recognition #CLI
🚀 Getting Started
It is recommended to use uv to create a virtual environment and pip install the following package.
pip install sober-scan
To run the application, simply type:
sober-scan
# or
sober-scan --help
👨💻 Development Setup
-
Clone the repository and navigate to project folder:
git clone https://github.com/Sang-Buster/Sober-Scan cd Sober-Scan
-
Install uv first:
# macOS/Linux curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
-
Create a virtual environment at
Sober-Scan/.venv/:uv venv --python 3.10
-
Activate the virtual environment:
# macOS/Linux source .venv/bin/activate
# Windows .venv\Scripts\activate
-
Install the required packages:
uv pip install -e .
-
Install ruff and pre-commit:
uv pip install ruff pre-commit
ruffis a super fast Python linter and formatter.pre-commithelps maintain code quality by running automated checks before commits are made.
-
Install git hooks:
pre-commit install --hook-type commit-msg --hook-type pre-commit --hook-type pre-push
These hooks perform different checks at various stages:
commit-msg: Ensures commit messages follow the conventional formatpre-commit: Runs Ruff linting and formatting checks before each commitpre-push: Performs final validation before pushing to remote
-
Code Linting:
ruff check ruff check --fix ruff check --select I ruff check --select I --fix ruff format
-
Run the application:
uv run src/sober_scan/app.py
📝 File Structure
📂Sober-Scan
┣ 📂src // Source Code
┃ ┗ 📦sober_scan // Python package
┃ ┃ ┣ 📂commands // Command line interface
┃ ┃ ┃ ┣ 📄detect.py
┃ ┃ ┃ ┣ 📄model.py
┃ ┃ ┃ ┗ 📄train.py
┃ ┃ ┣ 📂models // Model files
┃ ┃ ┃ ┣ 📄cnn.py
┃ ┃ ┃ ┣ 📄knn.py
┃ ┃ ┃ ┣ 📄nb.py
┃ ┃ ┃ ┣ 📄rf.py
┃ ┃ ┃ ┗ 📄svm.py
┃ ┃ ┣ 📂tests // Test files
┃ ┃ ┃ ┗ 📄test_cli.py
┃ ┃ ┣ 📄cli.py // CLI interface
┃ ┃ ┣ 📄config.py // Configuration
┃ ┃ ┣ 📄feature_extraction.py // Feature extraction
┃ ┃ ┗ 📄utils.py // Utility functions
┣ 📄.gitignore // Git ignore patterns (env, cache, database)
┣ 📄.pre-commit-config.yaml // Pre-commit hooks (ruff, commit message)
┣ 📄.pre-commit_msg_template.py // Commit message format validator
┣ 📄.python-version // Python version
┣ 📄LICENSE // MIT License
┣ 📄README.md // Project documentation
┣ 📄pyproject.toml // Project configuration
┗ 📄uv.lock // Lock file
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sober_scan-0.0.1.tar.gz.
File metadata
- Download URL: sober_scan-0.0.1.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96c119e8371081255890f48931509f57f3ef5b24e4a6836afc721f22dcc485ca
|
|
| MD5 |
c648f5aaca73e725100cf410f6892246
|
|
| BLAKE2b-256 |
38abce7ef8a50437207271e303151af2ec0ae2f96a8400a73094b83bb2cc049c
|
File details
Details for the file sober_scan-0.0.1-py3-none-any.whl.
File metadata
- Download URL: sober_scan-0.0.1-py3-none-any.whl
- Upload date:
- Size: 40.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f9008298d921ede3ff5025202bfbf2a1cb6bc34198513f8f4db685b7fb761c2
|
|
| MD5 |
192c56a45a8bd1ddfb869a2651ff43a8
|
|
| BLAKE2b-256 |
fd2da31441fcab5e15505768a4bcb0ffdc06c4669a24fcb88d1c62b85197fa19
|