This release is a pre-release and may not be stable for production use.
SeetaPsych Lib
A Computer Vision Toolkit for Face-based Psychological Measurement
SeetaPsych Lib is a Python library for face and body-based psychology analysis. It provides a modular Pipeline/Runner runtime and an optional Streamlit WebUI.
Requirements
- Python >= 3.10
- (Recommended) uv package manager: https://github.com/astral-sh/uv
Installation
Using uv (recommended)
uv sync
Install development dependencies (WebUI, etc.):
uv sync --group dev
Using pip
Install runtime dependencies:
python -m pip install .
If you want to run the WebUI, install extra tools manually:
python -m pip install streamlit opencv-python
Quick Start
Run WebUI (Streamlit)
python -m seetapsych_lib.webui --log INFO
Common arguments (pass them after --):
--dirs <DIR...>: load modules from directories--files <FILE...>: load modules from local config files--urls <URL...>: load modules from remote URLs--disable-builtin: disable builtin modules--cache-dir <DIR>: model cache directory--upload-dir <DIR>: upload directory--log <LEVEL>: log level (e.g.,DEBUG,INFO,WARNING, or an integer like10)
Programmatic Usage
import numpy as np
from seetapsych_lib.api import Device
from seetapsych_lib.runtime import Factory, Pipeline, Runner
factory = Factory(enable_example=True)
pkg = next(p for p in factory.packages if p.name == "Example Package")
pipeline = Pipeline(factory, packages=[pkg.uid])
pipeline.add_model(pkg.uid, pkg.models[0].uid)
pipeline.solve()
ok, _ = pipeline.satisfied()
if not ok:
pipeline.install_requirements()
runner = Runner(pipeline, device=Device("cpu"))
result = runner.run(np.zeros((64, 64, 3), dtype=np.uint8))
print(result)
Configuration
Environment Variables
The following environment variables are supported:
| Env | Description |
|---|---|
| SEETAPSYCH_LOG_LEVEL | Change default log level. Could be WARNING, INFO, DEBUG, or an integer (e.g., 10). |
| SEETAPSYCH_CACHE_DIR | Base directory for model cache. Models are cached under <CACHE_DIR>/models. |
| SEETAPSYCH_CONFIG_DIR | Base directory for config files. Config files are loaded from <CONFIG_DIR>/configs. |
Development
Version check:
python tests/version.py
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
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 seetapsych_lib-0.0.1rc1-py3-none-any.whl.
File metadata
- Download URL: seetapsych_lib-0.0.1rc1-py3-none-any.whl
- Upload date:
- Size: 70.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
465ee63c81bac6fe2b9488da83fa4452c7c2e44936157b515ef85d52980958fe
|
|
| MD5 |
a9373f68f0429a7153d0c1953f620585
|
|
| BLAKE2b-256 |
dfb13d1d1a68a86365f19a9c1c478f72de86642b30678c8ceec9f26a5b06009d
|