Building a Classroom Lab: Detecting Deepfakes with Physics-Based Tests
labsopticsteaching

Building a Classroom Lab: Detecting Deepfakes with Physics-Based Tests

sstudyphysics
2026-01-24 12:00:00
10 min read
Advertisement

Convert deepfake anxiety into a hands-on lab: students use rolling shutter, PRNU, and flicker tests to flag manipulated video.

Hook: Turn student anxiety about Deepfakes into a hands-on physics lab

Deepfakes have made headlines and classroom conversations in 2025–2026, leaving teachers and students asking how to tell real video from fabricated footage. If you teach physics, computer science, or digital forensics, you can convert that anxiety into an empowering, curriculum-aligned lab where students build and test physics-based detectors. This lab plan uses simple optics and signal-processing experiments—rolling shutter tests, sensor noise analysis, and light-flicker sensing—to help students design reproducible tests that flag manipulated video.

Why a physics-based approach matters in 2026

As generative AI tools and platform controversies surged in late 2025 and early 2026—prompting investigations and platform feature changes—purely ML-based detectors have struggled with adversarial examples and model drift. Physics leaves traces that are hard to convincingly fake: camera sensor patterns, optics-induced artifacts, and interactions between light and hardware. A classroom lab that explores these traces teaches scientific thinking and produces robust, explainable tests students can defend in reports or presentations.

  • Governments and platforms increased scrutiny of non-consensual and deceptive content in 2025–2026; forensic literacy is now a learning priority.
  • Content provenance and metadata standards are emerging, but physical-camera artifacts remain critical independent evidence.
  • Educators can meet accreditation and digital-literacy goals by offering hands-on labs that combine optics, electronics, and signal processing.

By the end of this unit students will be able to:

  • Describe how CMOS rolling shutter, sensor noise, and LED flicker create measurable signatures in video.
  • Design and run controlled experiments that reveal these signatures in real and synthetic (manipulated) video.
  • Implement simple signal-processing tests in Python or MATLAB to flag inconsistencies consistent with tampering.
  • Communicate results in a lab report that references experimental uncertainty, controls, and reproducibility.

Curriculum alignment suggestions: NGSS (HS-ETS1, HS-PS4), IB Physics (Option D/E labs), and A-Level Physics practical skills. Use these learning outcomes to satisfy lab accreditation requirements for practical competency.

Overview: 4‑module lab sequence (ideal for 3–4 weeks)

  1. Module A — Foundations: Intro to camera sensors, sampling, and optics; hypothesis development (1 lesson + homework)
  2. Module B — Rolling shutter & motion tests: Record controlled motion and measure skew/aliasing patterns (2–3 lessons)
  3. Module C — Sensor noise & PRNU: Capture flat-field sequences, compute sensor fingerprints, and compare to synthetic video (2–3 lessons)
  4. Module D — Light flicker & PWM detection: Use LED lighting and analyze aliasing between flicker frequency and frame rate (2 lessons + presentations)

Time and format

  • Total time: ~10–12 class periods (50–75 min each) or a 3–4 week lab block.
  • Class size: works for 16–30 students; groups of 2–3 recommended.
  • Assessment: lab notebook, final report, short practical exam, and a group presentation.

Equipment & materials (budget-conscious options)

  • Smartphones with CMOS sensors (most modern phones) – student devices or school pool
  • One DSLR or mirrorless camera with known rolling/global shutter behavior (optional)
  • LED panels or strips (some with PWM dimming) and incandescent bulbs (control)
  • Function generator (for LED modulation) or microcontroller (Arduino/ESP32) to PWM an LED
  • Tripods, sliding rigs or rotating turntable for controlled motion
  • Polarizing filters and neutral-density filters (for optics exploration)
  • Laptop with Python (numpy, scipy, opencv) or MATLAB; Jupyter recommended
  • Optional: handheld light meter or camera flash timer; oscilloscope for advanced classes

Module B: Rolling shutter experiment (detailed plan)

Concept in one line

Rolling shutter reads sensor rows sequentially; moving objects or modulated light appear skewed or time-warped in predictable ways.

Learning goals

  • Link readout timing to visible artifacts
  • Measure row‑timing and compute effective frame micro-timing
  • Detect inconsistencies between source footage and alleged recording conditions

Procedure (classroom-ready)

  1. Set up a checkerboard or high-contrast vertical ruler on a motorized slider 1–2 m from the camera.
  2. Record several passes at different speeds (slow, medium, fast) with the smartphone camera locked to 30 or 60 fps.
  3. Also record a global-shutter camera (if available) under the same motion for a control sample.
  4. Students extract frames with OpenCV (cv2.VideoCapture) and analyze vertical displacement vs. row index.

Analyses & expected results

  • Plot object edge position vs. row number; linear slope gives readout time per row.
  • Calculate effective rolling-shutter skew = object velocity × row read time.
  • Compare to control; a synthetic deepfake that composites frames from multiple sources may display inconsistent slopes across regions.

Actionable student task

Have each group develop a simple detector: flag a clip if more than 10% of contiguous vertical stripes have slopes that differ by >20% from the median slope. Implement this in Python and test on class clips and a set of curated manipulated videos.

Module C: Sensor noise & PRNU fingerprinting

Concept in one line

Photo-response non-uniformity (PRNU) is a stable, sensor-specific spatial noise pattern. Reproducing or removing it convincingly across frames is nontrivial for many deepfake pipelines.

Learning goals

  • Capture flat-field sequences and compute average noise residue
  • Compare intra-camera and inter-camera correlations
  • Understand limits: compression, denoising, and synthetic rendering reduce PRNU strength

Procedure

  1. Shoot 30–50 frames of a uniformly lit white surface at a fixed exposure (no auto settings).
  2. Compute the mean image and subtract it from each frame to produce noise residuals.
  3. Average residuals to build a PRNU fingerprint; normalize and save.
  4. Compute correlation coefficients between fingerprints from different phones and between real vs. manipulated clips.

Classroom note

High compression and aggressive denoising in social-media uploads reduce PRNU detectability. Use raw-ish settings or highest-quality captures when possible. Discuss ethical limitations: PRNU is probabilistic evidence, not sole proof.

Module D: Light flicker and PWM detection

Concept in one line

Many LEDs use PWM at kHz frequencies; the camera sampling can alias that flicker into visible bands. Detecting inconsistent flicker (or missing flicker) can indicate compositing.

Learning goals

  • Understand aliasing between continuous-time flicker and frame sampling
  • Measure flicker frequency using rolling-shutter stripe analysis and temporal FFTs
  • Design tests to show discrepancies between scene lighting and recorded footage

Procedure

  1. Modulate an LED with known PWM frequencies (e.g., 500 Hz, 1 kHz) using Arduino.
  2. Record the modulated LED with your smartphone and extract vertical stripe patterns caused by rolling shutter.
  3. Compute the vertical-intensity vs. row and use short-time FFT to recover aliased frequency components.

Practical test

Ask students to determine whether a short video with a lit ceiling shows LED PWM. If a deepfake composites facial lighting onto a different background, localized flicker signatures will be inconsistent across regions.

Data analysis: reproducible pipelines

Give students starter notebooks (Python/Jupyter) that load video, extract grayscale frames, compute residuals, and run FFTs. Provide modular functions so groups can focus on experiment design rather than debugging I/O.

Starter analysis checklist

  • Standardize frame rate and resolution before comparison.
  • Define ROI (region of interest) for local tests; compute local statistics.
  • Quantify uncertainty: run multiple trials and report mean ± standard deviation.
  • Use visualization: slope heatmaps for rolling-shutter, correlation matrices for PRNU, spectrograms for flicker.

Assessment items and rubrics

Formative assessments

  • Pre-lab quiz: sensor basics, sampling, aliasing (multiple choice + short answers)
  • Mid-unit lab check: students submit raw data and short progress note

Summative assessments

  1. Final lab report (40%): includes hypothesis, methods, data, analysis, limitations.
  2. Practical exam (30%): given an unknown video, run two physics-based tests and submit a one-page forensic memo.
  3. Group presentation (20%): 8–10 minute talk with demo and Q&A.
  4. Lab notebook & reproducibility (10%): code + raw data uploaded with README.

Rubric highlights (for report)

  • Experimental design & controls (25%)
  • Data quality & reproducibility (20%)
  • Analysis correctness & interpretation (30%)
  • Communication & ethics discussion (25%)

Sample assessment prompts

Multiple choice (example)

Which of the following is most likely to produce a vertical skew in a recorded video?

  • A. Global mechanical shutter
  • B. Rolling electronic shutter
  • C. High-ISO noise
  • D. Lens chromatic aberration

Practical prompt

Given two 10‑s clips (Clip A and Clip B) of the same person under similar lighting, propose and run two physics-based tests to assess whether they were recorded with the same camera. Submit code, plots, and a 500-word conclusion with confidence level.

Classroom safety and ethics

  • Safety: avoid laser experiments unless you have proper safety training and eyewear. Use low-voltage electronics and follow school lab rules.
  • Ethics: students must not create or disseminate deepfakes of real people without explicit consent. Emphasize responsible use and legal implications—note the surge in regulatory action in 2025–2026.
  • Data privacy: use consented volunteers or synthetic faces provided by the teacher; do not upload sensitive videos to public platforms without permission.

Troubleshooting common issues

  • Low signal-to-noise in PRNU: increase frame count, use consistent exposure, and avoid aggressive JPEG compression.
  • No visible rolling-shutter stripes: check camera mode (some phone cameras use electronic stabilization or frame blending), lock exposure and disable EIS if possible.
  • Flicker not detected: ensure LED is PWM-modulated and not mains-only; increase sample ROI size and use FFT averaging.

Extensions and advanced options

  • Introduce polarization tests: inconsistencies in specular highlights or polarization response can reveal composites.
  • Use an oscilloscope to directly measure LED drive signals and compare to aliased frequencies in video.
  • Combine physics features with lightweight ML classifiers for a hybrid detector; discuss model transparency and adversarial risks.
  • Invite a local digital-forensics practitioner or law-enforcement evidence officer for a guest critique session.

Case study classroom timeline (example)

School: 11th/12th grade physics; 24 students; 6 weeks.

  1. Week 1: Foundations and pre-lab quiz
  2. Week 2–3: Rolling shutter experiments + short report
  3. Week 4: PRNU experiments and mid-unit check
  4. Week 5: Flicker module + practical exam
  5. Week 6: Final reports and presentations

Why this matters for teacher professional development in 2026

As platforms and regulators tighten rules around synthetic media, schools need teachers who can teach verification literacy. This lab develops experimental design skills, signal analysis, and ethical reasoning—competencies valued by universities and accreditation boards. It also prepares students for careers in cybersecurity, forensics, and media literacy that are growing in demand.

"Physics gives teachers and students tools that are hard to fake—optics and electronics leave fingerprints that tell the story beyond pixels."

Resources & starter materials (2026 updates)

  • Starter Jupyter notebooks: frame extraction, rolling-shutter slope calc, PRNU pipeline, flicker spectrograms (teacher copy with sample data)
  • Curated dataset of real and synthetic clips (consented and sanitized) for classroom testing
  • Assessment templates and rubrics aligned to NGSS and IB practical criteria
  • List of safe, low-cost hardware: recommended phone models, Arduino kits, and LED panels

Future predictions: Where physics-based detection will go next

  • Hybrid verification platforms: In 2026 we expect more tools that combine content provenance metadata with physics-derived signals to give layered confidence scores.
  • Standardized curricular modules: As regulators and education boards emphasize media literacy, modular labs like this will become part of accredited digital-forensics pathways.
  • Adversarial arms race: Generative models will attempt to mimic low-level sensor noise. Teachers should stress that physics tests are one line of evidence and that reproducible methodology and clear uncertainty reporting are essential.

Takeaways for busy teachers (actionable checklist)

  • Start small: run a one-session rolling-shutter demo before committing to a full unit.
  • Use consented, school-owned devices to avoid privacy issues.
  • Provide starter code so students focus on experiment design and interpretation.
  • Map assessments to accreditation criteria early and use rubrics to reduce grading time.
  • Emphasize ethics: make students explain limitations and legal concerns in every report.

Final classroom-ready checklist

  1. Download starter notebooks and sample clips.
  2. Gather equipment and prepare consents.
  3. Plan 3–4 week timeline and map to standards.
  4. Prepare assessment rubric and practical exam materials.

Call to action

Ready to pilot this lab? Download the teacher kit (notebooks, datasets, rubrics) and a one-session rolling-shutter demo from our resource hub. Run the demo, adapt the modules to your accreditation needs, and share student findings with other educators to help build a verified, forensic-literate classroom community in 2026.

Advertisement

Related Topics

#labs#optics#teaching
s

studyphysics

Contributor

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.

Advertisement
2026-01-24T03:26:00.008Z