Skip to main content

(Face Identification + Vision Events)

This project provides:

  • Face identification pipelines (InceptionResnetV1 and ViT-based)
  • Training/evaluation/tuning scripts
  • A real-time Vision interface (interaction.vision.Vision) that emits user identity events

1) Setup (minimal)

Prerequisites

  • Python 3.12
  • Conda (recommended) or pip

Option A: Conda (recommended)

conda env create -f environment.yml
conda activate dissertation

Option B: pip

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

2) Core commands

Run from repo root:

python core/models/inception_resnet.py
python core/models/vision_transformer.py
python notebooks/eval.py
python notebooks/vit_eval.py
python core/inference/parameter_tune/resnet_tune.py
python core/inference/parameter_tune/vit_tune.py

3) Using Vision from another project (submodule usage)

If this repo is added as a submodule, import and start Vision like this:

import asyncio
from IPython.display import display
from PIL import Image
from recognition.interaction.vision import Vision


async def handle_vision_event(event_data: dict):
    """Callback triggered whenever user state changes."""
    if not event_data:
        return

    event_type = event_data.get("event")
    name = event_data.get("name", "unknown")
    role = event_data.get("role")

    if event_type == "user_changed":
        print(f"[VISION EVENT] User Changed -> Name: {name} | Role: {role}")

        if name == "unknown":
            await system.say(
                "Hello there! I don't believe we've met yet. Could you tell me your name?"
            )
            response = await system.listen(timeout=6.0)
            if response:
                await system.say(f"Nice to meet you, {response}!")

        elif role == "student":
            await system.set_robot_role_mode("student")
            await system.say(
                f"Welcome back, {name}! "
                f"I am ready as your personal development tutor today. "
                f"What would you like to work on?"
            )

        elif role == "staff":
            await system.set_robot_role_mode("staff")
            await system.say(
                f"Hello {name}. "
                f"Staff assistance mode activated. "
                f"How can I assist you today?"
            )

    elif event_type == "user_left":
        print(f"[VISION EVENT] User Left -> Name: {name}")
        if name and name != "unknown":
            await system.say(f"Goodbye {name}, have a nice day!")


system = Vision(host="127.0.0.1", callback=handle_vision_event, use_webcam=True)

# In Jupyter/async environments, create a task instead of blocking.
monitoring_task = asyncio.create_task(system.start_monitoring())

await asyncio.sleep(3)
if system.processed_image:
    display(Image.open(system.processed_image))

Vision constructor

  • Vision(host="localhost", callback=None, use_webcam=False)

Event payloads

  • user_changed: includes name, role, score, previous_user
  • user_left: includes name, role

4) Add this repo as a Git submodule

From your parent project root:

git submodule add <YOUR_REPO_URL> external/dissertation-codebase
git commit -m "Add dissertation codebase submodule"

Clone later with submodules:

git clone --recurse-submodules <PARENT_PROJECT_URL>

If already cloned without submodules:

git submodule update --init --recursive

Use it in Python (example):

import sys
from pathlib import Path

sys.path.append(str(Path("external/dissertation-codebase").resolve()))
from recognition.interaction.vision import Vision

5) Notes

  • SLURM shell scripts (train_*.sh, eval_*.sh, tune_*.sh) are cluster-oriented and may need local path/env updates.
  • Ensure your dataset paths and model checkpoints in recognition/config.py match your machine.

Metadata

Release files for furhat-face-recognition 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for furhat-face-recognition 0.0.2
File Size Uploaded
furhat_face_recognition-0.0.2.tar.gz 28.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for furhat-face-recognition 0.0.2
File Interpreter ABI Platform
furhat_face_recognition-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 68.7 kB

Release files / furhat_face_recognition-0.0.2.tar.gz

Download URL furhat_face_recognition-0.0.2.tar.gz
Size 28.2 kB
Tags Source
SHA-256 checksum
How to use checksums
cac73af0f8d772651c4026ceb2fef6c455e51e77dfa93fadaf1d3b2faba9be52
BLAKE2b-256 checksum
How to use checksums
cb1d20f465a8bf33773bd0d30f1a00f9a21d7dc81dc6161a7b03fd073ce23064
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.8

Release files / furhat_face_recognition-0.0.2-py3-none-any.whl

Download URL furhat_face_recognition-0.0.2-py3-none-any.whl
Size 40.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
acb6ab1acd9059da8b719b5332a36b27da1082f7c835193213cd2604b7b63f00
BLAKE2b-256 checksum
How to use checksums
da2554e096fbbbfea4bf63d3d83c5d79927534f25f45e0aa1c8393d09a596f6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.8

Release history Release notifications | RSS feed

0.0.3

2 release files

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page