Skip to content

Interactive Tutorials & Notebooks

The fastest way to learn PrimateFace is to run one of our 8 self-contained Jupyter notebooks in demos/notebooks/—4 simple starters (including two CPU-only / zero-MMPose notebooks that run in under 15 seconds) and 4 end-to-end research workflows. Every notebook runs out of the box on public sample primate media and auto-downloads verified v1.0.0 weights from Hugging Face.

No GPU or local install required — run directly in Google Colab

Every notebook begins with an automatic Python 3.12 zero-compile Colab bootstrap cell (mmcv-lite + rfdetr — no C++ compilation, no NumPy downgrade, no runtime restart). Click any Open in Colab badge below and choose Runtime → Run all (for GPU notebooks, select Runtime → Change runtime type → T4 GPU first).

Simple Starters

Notebook What You Will Do Runtime Launch
quickstart.ipynb 3-line PrimateFace API on a spider monkey photo: 68 landmarks, 3D head pose, kinematics, HRNet vs RTMPose comparison, and export to CSV, COCO, DLC, SLEAP, and NWB CPU or T4 GPU Open In Colab · GitHub
genus_classification.ipynb Detect faces with RF-DETR-M and classify 69 primate genera with calibrated ConvNeXt-Small + selective abstention (zero MMPose required) CPU or T4 GPU Open In Colab · GitHub
landmark_conversion_68_48.ipynb Convert 68 ↔ 48 landmarks in pure NumPy (~1 ms/face), explore the unified 104-landmark schema, and compute kinematics/symmetry (CPU-only, zero GPU/MMPose) CPU only (~10 s) Open In Colab · GitHub
batch_video_and_export.ipynb Process a field video or folder of images frame by frame with MedianSavgolSmoother, quality filtering, explicit blank gaps, and CSV/DLC/COCO export T4 GPU recommended Open In Colab · GitHub

Research Workflows

Notebook Biological Application Runtime Launch
lemur_video_timestamping.ipynb Fast RF-DETR-M video face detection, confidence threshold sweep, IoU multi-face tracking with explicit gaps, presence timelines, and BORIS v7.0 export (zero MMPose) CPU or T4 GPU Open In Colab · GitHub
howler_vocal_motor_coupling.ipynb Wild Alouatta vocal–motor tracking: 3-pair inner-lip mouth aperture vs 150–1,200 Hz howl envelope, circular-shift null (Δr), and eye/brow/head controls T4 GPU recommended Open In Colab · GitHub
macaque_face_recognition.ipynb Temporally disjoint individual recognition: raw vs 2-point Umeyama eye-aligned crops comparing ArcFace, MegaDescriptor-L-384, and DINOv2 T4 GPU recommended Open In Colab · GitHub
dyadic_facial_interaction.ipynb Multi-individual proximity, rectified mutual facing (vs mutual aversion), and lagged mouth-aperture turn-taking with circular-shift null (CPU-only) CPU only (~10 s) Open In Colab · GitHub

Running Notebooks Locally vs. Google Colab

  1. Click any Open in Colab badge above.
  2. For the 4 pose/recognition notebooks (quickstart, batch_video_and_export, howler_vocal_motor_coupling, macaque_face_recognition), select Runtime → Change runtime type → T4 GPU. The CPU-only and RF-DETR-only notebooks run cleanly on CPU as well.
  3. Click Runtime → Run all. Each notebook installs only the lightweight dependencies it needs (zero C++ mmcv compilation) and downloads verified v1.0.0 weights from Hugging Face.
Running on your own photo, video, or colony gallery

Every notebook includes a commented 1-line path swap and Colab files.upload() cell so you can drop in your own .jpg, .mp4, or identity/image.jpg folder without modifying any analysis code.

Complete Installation, install the [dev] extras, and launch JupyterLab:

uv pip install -e ".[rfdetr,dev]"
jupyter lab demos/notebooks/

Optional extras for specific notebooks:

  • macaque_face_recognition.ipynb: uv pip install -e ".[embedding,megadescriptor,dinov2]"
  • howler_vocal_motor_coupling.ipynb: uv pip install librosa soundfile
  • quickstart.ipynb SLEAP/NWB export cells: uv pip install -e ".[interop]"

Next Steps