Skip to main content

Dissertation Codebase (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.1

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.1
File Size Uploaded
furhat_face_recognition-0.0.1.tar.gz 27.6 kB Details

Built distribution (wheel)

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

Total release size: 67.7 kB

Release files / furhat_face_recognition-0.0.1.tar.gz

Download URL furhat_face_recognition-0.0.1.tar.gz
Size 27.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2295db4f58424549f268b4e270254b0ac1aaaf1a3f027da6748a23e61a749a72
BLAKE2b-256 checksum
How to use checksums
a8092d936831c5aa4f6a331fd1f49a41f954cbeebd8c2181fc1af4b83d3054b8
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.1-py3-none-any.whl

Download URL furhat_face_recognition-0.0.1-py3-none-any.whl
Size 40.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef1e5d07402afeb56f0dcacb463cc1c6b930a23efc042729f28196bd136b2791
BLAKE2b-256 checksum
How to use checksums
14be8f638fd28c799768e0741fa7f8d5e93eed263f60da5e2e55bef4b0abb9de
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

0.0.2

2 release files

This release

0.0.1 This release

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