Privacy Tools Guide

Iran deploys integrated facial recognition surveillance at airports, highways, and public spaces connected to centralized government databases, primarily targeting women’s clothing violations and political opposition. Defeat recognition by wearing sunglasses, face masks, and hats that disrupt facial landmarks; use hairline-altering makeup or prosthetics. For developers, advocate for on-device processing that doesn’t transmit biometric data to servers. If targeted, use Signal without phone number verification and document surveillance instances for international human rights organizations.

Technical Architecture of Public Surveillance Systems

Modern facial recognition surveillance networks consist of several integrated components working in concert. The typical deployment includes high-resolution cameras positioned at strategic locations—traffic intersections, metro stations, commercial centers, and government buildings. These cameras capture continuous video feeds that feed into centralized processing systems.

The technical pipeline follows a multi-stage process:

Capture: Cameras record video at varying resolutions, typically 2-8 megapixels for facial identification purposes. Modern systems use cameras with infrared capabilities for low-light operation, ensuring 24/7 surveillance capability.

Detection: Frame extraction algorithms identify faces within video frames. This uses convolutional neural networks (CNNs) trained to detect facial landmarks—typically 68 or more key points mapping eyes, nose, mouth, and jawline.

Normalization: Detected faces undergo preprocessing: alignment to standard orientation, scaling to uniform dimensions (typically 160×160 or 224×224 pixels), and histogram equalization to normalize lighting conditions.

Embedding Generation: The normalized face passes through a face embedding model that converts visual features into a numerical vector—typically 128, 256, or 512 dimensions. This embedding captures unique facial characteristics while being computationally efficient for database storage and comparison.

Matching: Generated embeddings compare against watchlists or databases using distance metrics like cosine similarity or Euclidean distance. Threshold values determine positive matches.

Iranian Deployment Context

Iran’s surveillance infrastructure has expanded significantly, with reports indicating integration across multiple government agencies. The system reportedly combines facial recognition with license plate recognition (ALPR), mobile phone metadata, and internet monitoring to create citizen profiles.

The Islamic Republic’s Passive Defense Organization has promoted “smart city” initiatives that integrate surveillance cameras with behavioral analysis algorithms. These systems claim to detect “abnormal behaviors” but raise concerns about political targeting and mass surveillance capabilities.

Technical specifications of deployed systems remain partially classified, but analysis of network traffic and leaked documentation suggests:

Code Analysis: Facial Recognition System Components

For developers studying these systems, understanding the underlying technology provides context for building privacy tools. Here’s a conceptual example of how embedding generation works:

import face_recognition
import cv2
from datetime import datetime
import numpy as np

def extract_face_embedding(image_path):
    """
    Extract facial embedding from an image.
    This demonstrates the core mechanism surveillance systems use.
    """
    image = cv2.imread(image_path)
    rgb_image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)

    # Detect face locations
    face_locations = face_recognition.face_locations(rgb_image)

    # Generate encodings (embeddings)
    face_encodings = face_recognition.face_encodings(rgb_image, face_locations)

    return face_encodings[0] if face_encodings else None

def compare_faces(known_encoding, probe_encoding, threshold=0.6):
    """
    Compare two face embeddings.
    Returns True if faces match within threshold.
    """
    distance = np.linalg.norm(known_encoding - probe_encoding)
    return distance < threshold

The distance threshold (typically 0.4-0.6) determines the sensitivity of matching. Lower thresholds reduce false positives but may miss genuine matches.

Privacy Protection Strategies

Developers and power users can implement several defensive measures:

Obfuscation Techniques

Research demonstrates that specific patterns can confuse facial recognition systems:

Adversarial Patterns: Carefully crafted patterns on clothing or accessories can trigger misclassification. Studies show that printed glasses with specific patterns reduce recognition accuracy by 40-90%.

def generate_adversarial_pattern(width, height):
    """
    Generate a placeholder adversarial pattern.
    Real implementations require optimization against specific models.
    """
    pattern = np.random.rand(height, width, 3) * 255
    return pattern.astype(np.uint8)

Face Masking in Photos: Before sharing images publicly, applying subtle modifications can prevent accurate embedding generation. Tools like Fawkes (developed at University of Chicago) optimize pixel changes invisible to humans but effective against recognition systems.

Technical Countermeasures

Image Stripping: Remove metadata and EXIF data from photos before upload:

# Using exiftool to strip metadata
exiftool -all= image.jpg

Blur Processing: Apply gaussian blur to faces in posted images:

from PIL import Image, ImageFilter
import cv2

def blur_faces(image_path, output_path):
    """
    Apply blur to detected faces for privacy.
    """
    image = cv2.imread(image_path)
    face_cascade = cv2.CascadeClassifier(
        cv2.data.haarcascades + 'haarcascade_frontalface_default.xml'
    )
    gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
    faces = face_cascade.detectMultiScale(gray, 1.1, 4)

    for (x, y, w, h) in faces:
        face_region = image[y:y+h, x:x+w]
        blurred = cv2.GaussianBlur(face_region, (51, 51), 0)
        image[y:y+h, x:x+w] = blurred

    cv2.imwrite(output_path, image)

Operational Security

Beyond technical measures, operational practices reduce exposure:

Broader Implications

The proliferation of surveillance technology raises concerns beyond individual privacy. Developers working on any system handling biometric data carry responsibility for ethical implementation. Considerations include:

Data Minimization: Collect only necessary data, delete promptly, avoid creating centralized databases that become targets.

Transparency: Users should understand when and how their data is processed.

Security: Biometric data, once compromised, cannot be changed like passwords. Protecting enrollment databases requires highest security standards.

Consent: Meaningful consent requires genuine choice, not forced acceptance as condition of services.

Practical Tools for Users Under Surveillance

For individuals in high-risk jurisdictions, specific tools provide measurable privacy improvements:

Fawkes: A tool developed at University of Chicago that applies imperceptible modifications to images before posting publicly. These “fawkes shields” prevent facial recognition systems from generating accurate embeddings of your face while remaining visually identical to human observers.

# Installing and using Fawkes
pip install fawkes

# Process an image to add privacy protection
fawkes --input photo.jpg --output protected_photo.jpg --mode low

The mode parameter controls protection strength versus imperceptibility trade-off. “Low” mode adds minimal visual noise while providing moderate protection; “high” mode provides stronger protection but slightly alters image quality.

Clearview AI Opt-Out: While Clearview scraped billions of public images for facial recognition databases, they maintain an opt-out process. Submit a photo and identifying information to remove your face from their index—though the effectiveness remains contested.

Digital Censoring Tools: For activists and journalists in Iran specifically, Signal and ProtonMail with carefully managed account creation provide encrypted communication channels. Create Signal accounts using VPN-routed phone numbers from privacy-focused VOIP services to avoid linking your real phone number.

Network-Level Defenses

Beyond physical appearance modifications, network security prevents the collection of identifying metadata:

VPN Usage in Restricted Regions: Iran actively blocks and throttles VPN connections, but certain VPN providers maintain connectivity:

Always use VPN obfuscation protocols—standard OpenVPN or WireGuard fail against active blocking. Configure VPN to connect at boot before any traffic leaks your location.

Tor Browser for Anonymous Browsing: Accessing services through Tor Exit nodes makes IP-based tracking significantly harder, though it doesn’t address facial recognition from cameras.

# Using Tor on command line for privacy
torsocks curl https://check.torproject.org

For developers and organizations, architectural approaches reduce surveillance scope:

On-Device Processing Architecture: Instead of transmitting facial images to centralized servers, implement face detection and matching entirely on user devices. This prevents centralized databases that become targets.

Example approach using client-side ML:

# Client-side face recognition - no server transmission
import face_recognition
import cv2
import json

def local_face_verification(local_image_path, remote_image_path):
    """
    Compare faces locally without uploading to server.
    Both images loaded and processed on client device.
    """
    local_image = face_recognition.load_image_file(local_image_path)
    remote_image = face_recognition.load_image_file(remote_image_path)

    local_encoding = face_recognition.face_encodings(local_image)[0]
    remote_encoding = face_recognition.face_encodings(remote_image)[0]

    distance = face_recognition.compare_faces(
        [local_encoding],
        remote_encoding,
        tolerance=0.6
    )

    return {"match": distance[0], "processed_locally": True}

Data Minimization in Surveillance: If you operate systems in jurisdictions with surveillance, delete facial templates after verification rather than maintaining historical databases. This reduces the damage if databases are breached or misused.

Encryption of Biometric Data: Any storage of facial encodings should use end-to-end encryption where users control decryption keys. This prevents unauthorized government access even if servers are seized.

Understanding Threat Models

Different threat actors require different defenses:

Mass Surveillance: Affects broad populations indiscriminately. Physical obfuscation (masks, hats, sunglasses) and avoiding public spaces during high-risk activities provide basic protection.

Targeted Surveillance: Directed at specific individuals or groups. Beyond physical methods, you need operational security: monitoring who has access to your devices, limiting location tracking, compartmentalizing your digital presence across accounts.

Forensic Identification: After-the-fact analysis of images or footage. Destruction of metadata, avoiding distinctive clothing, and minimizing image distribution help prevent retrospective identification.

Monitoring and Alerting Systems

If you suspect facial recognition targeting, implement monitoring:

#!/bin/bash
# Monitor for suspicious access patterns to your digital presence

# Check what social media accounts might expose your face
echo "Monitoring social media for facial images..."

# Using existing tools to check image metadata
for image in ~/suspicious_uploads/*.jpg; do
    exiftool "$image" | grep -E "GPS|Camera Model|Date"
done

# Check for facial recognition hits in news archives
# Using archived imagery of public events you attended
echo "Checking for photo tagging patterns that indicate recognition"

Built by theluckystrike — More at zovo.one