# Face-API Model Weights

This directory holds the pre-trained machine learning model weights required by the SDK's vision face detector (`FaceDetector`).

## Files

```
beexpert-proctoring/assets/models/
├── tiny_face_detector_model-shard1
├── tiny_face_detector_model-weights_manifest.json
├── face_landmark_68_model-shard1
└── face_landmark_68_model-weights_manifest.json
```

## Model Taxonomy

1. **TinyFaceDetector** (`tiny_face_detector_model-*`)
   - An extremely lightweight detector optimized for browser execution.
   - Used to identify face presence, count faces, and calculate coordinates/bounding boxes.
   - Loaded via: `faceapi.nets.tinyFaceDetector.loadFromUri('/assets/models')`

2. **FaceLandmark68Net** (`face_landmark_68_model-*`)
   - Identifies 68 distinct facial landmark points (eyes, eyebrows, nose, mouth, jaw outline).
   - Used for eye-tracking (calculating the Eye Aspect Ratio (EAR)) and head pose estimation (nose vs jaw outline symmetry).
   - Loaded via: `faceapi.nets.faceLandmark68Net.loadFromUri('/assets/models')`

## Deployment & Hosting

- These static files must be served by your application's web server or CDN.
- Ensure that the path to these weights is correctly set in your SDK configuration under `ai.modelsUrl`.
- **Note:** Browsers will cache these files. Ensure your web server configuration allows caching (`Cache-Control: public, max-age=31536000`) to avoid reloading them on every session initialization.
