LogoVisionLog

Face Enrollment

How to enroll faces into the recognition database

Face enrollment is the process of adding persons to the recognition database using folder-based batch enrollment.

Prerequisites

Before enrolling faces, ensure you have:

  1. InsightFace library installed with dependencies
  2. buffalo_l model (downloads automatically on first run)

Folder-Based Enrollment

Organize person images in folders named by person for batch enrollment.

Folder Structure

Create a folder for each person, with the folder name as the person's identifier:

FolderContents
Person_Name_1/Multiple images of person 1
Person_Name_2/Multiple images of person 2
Person_Name_3/Multiple images of person 3

Image Requirements

FactorRecommendation
Count3-5 images per person
FormatsJPG, JPEG, PNG, BMP, WEBP
ResolutionAt least 640x480
Face SizeFace should be >= 100 pixels
LightingEven, front-facing light
ExpressionNeutral or slight smile
AngleInclude varied angles (front, slight turn)

How Enrollment Works

1. Image Loading

The system scans the enrollment folder and loads all images from each person's subfolder.

2. Face Detection

For each image, the system detects faces using SCRFD.

Quality checks:

  • Face size must be >= 50 pixels
  • Detection confidence >= 0.5
  • Only one face per image (or largest is used)

3. Embedding Extraction

Each face is converted to a 512-dimensional embedding vector using ArcFace.

4. Embedding Averaging

Multiple samples are averaged for robust recognition. This averaging reduces the impact of:

  • Lighting variations
  • Different angles
  • Expression changes

5. Database Storage

The normalized, averaged embedding is saved to the face database for recognition.

Best Practices

Sample Count

CountReliability
1 imageLess reliable
3-5 imagesRecommended
10+ imagesHigh-accuracy requirements

Naming Conventions

  • Use underscores for spaces (e.g., John_Doe)
  • Be consistent with naming
  • Avoid special characters
  • Names are case-sensitive

Image Tips

  • Use photos with only the target person
  • Ensure face is clearly visible
  • Avoid photos that are too dark or bright
  • Face should be in focus, not blurry

Troubleshooting

No face detected

Solutions:

  • Ensure face is clearly visible
  • Check image isn't too dark/bright
  • Face may be too small - use closer photo
  • Image may be corrupted - try another

Multiple faces detected

Solutions:

  • Use photos with only the target person
  • Crop images to single person
  • System uses largest face if multiple detected

Low quality warning

Solutions:

  • Use higher resolution images
  • Ensure proper lighting
  • Reduce motion blur
  • Face should be clearly in focus

Database Management

OperationDescription
View enrolledList all persons in database
Remove personDelete from database
Re-enrollRun enrollment again to update embeddings

On this page