Skip to main content

Face and body based psychology analysis

Project description

FaboPsy Lib

Face and body based psychology analysis

FaboPsy 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

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)

streamlit run fabopsy_lib/webui/app.py -- --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 like 10)

Programmatic Usage

import numpy as np

from fabopsy_lib.api import Device
from fabopsy_lib.runtime import Factory, Pipeline, Runner

factory = Factory()
factory.load_builtin_modules()
factory.load_local_module("fabopsy_lib/example/example.toml")

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
FABOPSY_LOG_LEVEL Change default log level. Could be WARNING, INFO, DEBUG, or an integer (e.g., 10).
FABOPSY_CACHE_DIR Base directory for model cache. Models are cached under <CACHE_DIR>/models.

Development

Version check:

python tests/version.py

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

fabopsy_lib-0.0.1.tar.gz (162.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fabopsy_lib-0.0.1-py3-none-any.whl (46.2 kB view details)

Uploaded Python 3

File details

Details for the file fabopsy_lib-0.0.1.tar.gz.

File metadata

  • Download URL: fabopsy_lib-0.0.1.tar.gz
  • Upload date:
  • Size: 162.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for fabopsy_lib-0.0.1.tar.gz
Algorithm Hash digest
SHA256 963f819fe0ffed22f25079f88473d1ddc7f1f741cf15b95529e06b3deeeea0e2
MD5 26e33056c87a9f1a6ad4f2082ace84d5
BLAKE2b-256 83d41c874b4f5c2265473a48fc20dc33c33266d80299bd76ee221b4a192231e7

See more details on using hashes here.

File details

Details for the file fabopsy_lib-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: fabopsy_lib-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 46.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for fabopsy_lib-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7e19c922193c8d9f76719849fa7a4d7910ae3cb28de4061ea1cc69762ceae09f
MD5 e3e94fe04447e73ac63f028006d43914
BLAKE2b-256 e5a0dcc4823ee1464b0b516bd5d6ace2b49407cbeea8c17eb27899e766b1026f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page