# C302 Lab: Consent and Anonymisation Dry Run

> The hands-on lab of the C302 privacy course: inventory every stream your rig records, draft an information and consent sheet from the elements published programmes documented, plan the space, run the deface anonymisation tool on a sample clip and count its misses, optionally run EgoBlur on Aria data, and trace a withdrawal through every copy. Every command is as the tools' READMEs give it.

Page: https://egocam.ai/university/c302/lab/

This lab is a dry run of the privacy work a capture programme needs before its first real session: the paperwork a wearer sees, the plan for the space, the anonymisation step at ingest, and the route a withdrawal takes through your storage. Nothing here is legal advice, and the drafts you produce are for your ethics board or lawyer to review and correct.

Work through [Lessons 1 to 4](https://egocam.ai/university/c302/) first, and keep the [checklist](https://egocam.ai/university/c302/checklist/) next to you. Every command below is copied from the tool's README, or follows its documented form with your own file names; the source is linked at each step. Square brackets mark values you fill in.

## Part A: The paperwork

### Step 1: Inventory every stream

List every stream your rig records or logs, one row each, and what it can reveal. Consent has to cover every stream, and anonymisation has to decide about each one ([Consent for Wearers](https://egocam.ai/privacy/consent-for-wearers/), [Streams beyond the RGB video](https://egocam.ai/privacy/privacy-in-public-datasets/#streams-beyond-the-rgb-video)).

| Stream | What it can reveal | Decision before release |
|---|---|---|
| [each head camera, colour or greyscale] | bystander faces, screens, documents, reflections | blur or black-box; human review |
| [each wrist camera] | screens and papers in the hands; faces at the frame edge | blur or black-box; human review |
| [microphones] | voices and what was said | drop, cut to selected channels, or keep only with consent |
| [eye-tracking cameras] | images of the wearer's eyes | keep derived gaze, remove raw images (as HD-EPIC did) |
| [IMU] | the wearer's motion | personal data of the wearer |
| [GNSS, Wi-Fi, Bluetooth logs] | location and nearby devices | turn off if not needed (as Nymeria did) |

**You should have** a row for every stream in the recording container, including the ones no one plans to use.

### Step 2: Draft the information sheet and consent form

There is no standard wearer consent form. Draft one from the topics published programmes documented, as collected on [Consent for Wearers](https://egocam.ai/privacy/consent-for-wearers/#what-published-programmes-put-in-front-of-wearers):

- [ ] **Every recorded stream**, named one by one from Step 1, and which raw streams are deleted after processing.
- [ ] **A separate yes or no on appearing unblurred** (face, voice, tattoos) in released data.
- [ ] **Recording and publishing as separate permissions**: a consent form plus a data release form, as HD-EPIC used.
- [ ] **Where not to record**: the [Project Aria guidelines](https://projectaria.com/community-guidelines) list "restrooms, medical or health facilities, bedrooms or hotel rooms, religious facilities or prayer rooms, locker/changing rooms", and homes only with all household members' consent.
- [ ] **Preparing the space**: be alone where the protocol needs it, remove portraits and mirrors, use mock documents, no personal phones.
- [ ] **How to pause and delete in the moment**, with your rig's actual controls.
- [ ] **Review after recording**: when the footage comes back to the wearer, and any quarantine.
- [ ] **Withdrawal without losing pay**, stated in writing.
- [ ] **Later deletion requests** and how to make them.

Send the sheet ahead of the recording day and hold a briefing, as Ego-Exo4D's Indiana site and Ego4D's Bristol site did ([Lesson 1](https://egocam.ai/university/c302/lesson-1-consent-for-wearers/)). If wearers are employees or contractors, add the workplace safeguards from [Lesson 4](https://egocam.ai/university/c302/lesson-4-the-law-and-consent-at-work/#safeguards): consent collected outside the reporting line, supervisors not told who agreed, a yes or no per stream, and no use of the footage to score workers.

### Step 3: Plan the space

For each place you will record, write down ([Lesson 2](https://egocam.ai/university/c302/lesson-2-bystanders-and-shared-spaces/)):

1. **Closed or shared?** A closed room keeps out everyone who has not consented; a shared space means blurring and review.
2. **Who authorises recording there**: household members, the venue owner, the employer.
3. **No-go zones** on the route, and when the wearer pauses.
4. **Notice**: a visible recording indicator, identifying clothing or a badge, and contact cards with a description of the study and where to find out more.
5. **Stop-on-request**: what the wearer says and does when a bystander asks.

**Checkpoint:** hand the stream inventory, the draft forms and the space plan to your ethics board or lawyer, with the open questions from [Lesson 4](https://egocam.ai/university/c302/lesson-4-the-law-and-consent-at-work/) (lawful basis, DPIA, biometric streams, BIPA if anyone is recorded in Illinois).

## Part B: Anonymise a sample clip with deface

[deface](https://github.com/ORB-HD/deface) detects faces with the CenterFace network and blurs them. It handles faces only, not plates or screens ([Anonymisation Tools Compared](https://egocam.ai/privacy/anonymisation-tools-compared/)). All commands are from its [README](https://github.com/ORB-HD/deface) (repository at commit `09b670d`).

### Step 4: Install

The README recommends a new virtual environment first, then:

```bash
python3 -m pip install deface
```

For an Nvidia GPU, the README adds `python3 -m pip install onnx onnxruntime-gpu`.

### Step 5: Get a sample clip

Use a short clip of team members who agreed to be recorded, from your own rig. If you have none yet, EgoBlur's repository ships demo media with faces: clone it as its [README](https://github.com/facebookresearch/EgoBlur) shows and use `gen2/demo_assets/test_face_video.mp4`.

```bash
git clone https://github.com/facebookresearch/EgoBlur.git
```

### Step 6: Run with the defaults

The README's quick start, with your file name:

```bash
deface [clip.mp4]
```

**You should see** a new file next to the input with the postfix `_anonymized`. The README notes that "By default all audio tracks are discarded as well". `--keep-audio` copies audio over; use it only for clips whose speakers consented (Step 1).

### Step 7: Look at the scores, then measure the threshold

The detection threshold, `--thresh`, defaults to 0.2, which the README says "was found to work well on many test videos". It also says "The optimal value can depend on many factors such as video quality, lighting conditions and prevalence of partial occlusions", and suggests setting a very low threshold and drawing the detection scores. The README's examples use a photo, but "they work the same on any video or photo file":

```bash
deface [clip.mp4] --draw-scores -o [clip_scores.mp4]
deface [clip.mp4] --thresh [LOW] -o [clip_low.mp4]
deface [clip.mp4] --thresh [HIGH] -o [clip_high.mp4]
```

Step through each output frame by frame and count, on the same set of frames:

- **misses**: a visible face, or part of one, left unblurred, especially at the frame edge;
- **false blurs**: a blur on something that is not a face, especially the wearer's hands.

The README's own examples show the trade-off: "--thresh 0.02 (notice the false positives, e.g. at hand regions)" and "--thresh 0.7 (notice the false negatives, especially at partially occluded faces)". No source in the field guide gives a threshold for head-worn video ([Anonymising Footage](https://egocam.ai/privacy/anonymisation/#four-failure-modes-and-what-helps)), so **write down** the value you choose, the counts that justify it, and the clips you measured it on.

> **Diagram:** Face detector recall on head-worn RGB footage (Aria Pilot Dataset test set, IoU 0.5), from the EgoBlur paper's tables. Recall drops for faces that are non-frontal, occluded or dark, and collapses for faces cut off at the frame edge, which is common with a head camera. At 30 fps even 90% recall leaves several missed frames for every few seconds a bystander is in view.

### Step 8: Try the other options you may need

- **Black boxes instead of blur**, as [HD-EPIC](https://arxiv.org/abs/2502.04144) used "to avoid potential regeneration":

```bash
deface [clip.mp4] --boxes --replacewith solid -o [clip_boxes.mp4]
```

- **Larger masks.** `--mask-scale` grows each mask "to make sure that masks cover the complete face"; the default is 1.3.
- **High-resolution input.** On inputs well above 720p the README warns that "even detection accuracy can suffer", and gives `--scale` to downsample for detection only, keeping the aspect ratio: for 16:9 input, `--scale 640x360`, or `--scale 1280x720` if that is not good enough.

### Step 9: Repeat for every stream

Run the same measurement on a clip from each camera in your Step 1 inventory, greyscale and wrist cameras included. Recall differs by stream: in the EgoBlur paper, MediaPipe found 0.533 of faces on RGB and 0.390 on greyscale ([How detectors did on Aria footage](https://egocam.ai/privacy/anonymisation/#how-detectors-did-on-aria-footage)). Then note what deface did not touch: screens, documents, reflections, plates. Those need a plate detector, manual boxes or human review.

**If it fails:** if a stream has many misses at the frame edge, the documented responses are larger masks, boxes carried across frames, and human review ([Anonymising Footage](https://egocam.ai/privacy/anonymisation/#four-failure-modes-and-what-helps)).

## Part C (optional): EgoBlur on Aria data

If your recordings come from Project Aria glasses, EgoBlur's [README](https://github.com/facebookresearch/EgoBlur) (v2.0.1, commit `75144e1`) says to "Use the model generation that matches your data". Install with `pip install egoblur`, download the models from the [EgoBlur site](https://www.projectaria.com/tools/egoblur), and run the README's Gen2 video example with your paths:

```bash
egoblur-gen2 \
  --camera_name camera-rgb \
  --face_model_path ${EGOBLUR_MODELS}/ego_blur_face_gen2.jit \
  --input_video_path ${EGOBLUR_REPO}/gen2/demo_assets/test_face_video.mp4 \
  --output_video_path ${EGOBLUR_REPO}/gen2/demo_assets/output/test_face_video_output.mp4
```

`--camera_name` picks camera-specific default thresholds; valid names are `slam-front-left`, `slam-front-right`, `slam-side-left`, `slam-side-right` and `camera-rgb`. The README does not list the threshold values. Two things to check against your installed version with `egoblur-gen2 --help`: the README gives 0.3 as the `--nms_iou_threshold` default, while the Gen2 script's source sets 0.5; and the `egoblur-vrs-blur` tool for whole VRS files copies non-camera streams, "eye tracking" among them, "verbatim", so remove eye images in a separate step if they must not be released.

## Part D: Trace a withdrawal

Pick one recorded take and suppose its wearer, or a bystander in it, asks for deletion. The Aria guidelines require partners to comply "with reasonable deletion requests, when requested by a participant or a bystander, without undue delay" ([Project Aria Research Community Guidelines](https://projectaria.com/community-guidelines)).

1. List every copy of the take: the raw file on the rig, the upload, backups, the blurred version, derived outputs (gaze, poses, labels), and any shared release.
2. For each copy, write who can delete it and how long it takes.
3. Check the blurred copies. The EDPB treats blurring as erasure only "with no retroactive ability to recover the personal data" ([Privacy Law](https://egocam.ai/privacy/privacy-law-gdpr-and-bipa/#dpias-storage-and-blurring)); while the raw original exists, the data has not been erased.

**You should have** a written route from the request to every copy, which you can give the wearer in the consent paperwork.

## Sources

- ORB-HD. [deface](https://github.com/ORB-HD/deface) README and source (commit `09b670d`).
- Meta. [EgoBlur](https://github.com/facebookresearch/EgoBlur) README and Gen2 scripts (v2.0.1, commit `75144e1`); [EgoBlur models](https://www.projectaria.com/tools/egoblur).
- Meta. [Project Aria Research Community Guidelines](https://projectaria.com/community-guidelines).
- Perrett, T. et al. (2025). [HD-EPIC: A Highly-Detailed Egocentric Video Dataset](https://arxiv.org/abs/2502.04144). *CVPR*.
- European Data Protection Board. [Guidelines 3/2019 on processing of personal data through video devices](https://www.edpb.europa.eu/sites/default/files/files/file1/edpb_guidelines_201903_video_devices_en_0.pdf).
- Field guide: [Consent for Wearers](https://egocam.ai/privacy/consent-for-wearers/), [Bystanders and Recording in Shared Spaces](https://egocam.ai/privacy/bystanders/), [Anonymising Footage](https://egocam.ai/privacy/anonymisation/), [Anonymisation Tools Compared](https://egocam.ai/privacy/anonymisation-tools-compared/), [How Public Datasets Handled Privacy](https://egocam.ai/privacy/privacy-in-public-datasets/), [Privacy Law: GDPR, Biometric Data and BIPA](https://egocam.ai/privacy/privacy-law-gdpr-and-bipa/).
