Configuration
Configuration Overview
ReID_Database is configured with three parameters:
from degirum_face.reid_database import ReID_DatabasePool
db = ReID_DatabasePool.get(
db_path="./faces.lance", # Required: database location
model_name="arcface_resnet100", # Optional: model validation
read_consistency_interval=0.5 # Optional: multi-process synchronization
)Typically initialized via FaceRecognizer/FaceTracker - see FaceRecognizer Configuration or FaceTracker Configuration.
Parameters
db_path (required)
Path to the LanceDB database directory.
Relative path:
db_path="./face_database.lance"Absolute path:
Windows path:
Database structure:
model_name (optional)
Embedding model name for validation. Ensures database only contains embeddings from compatible models.
Example:
When to use:
Multi-model environments
Preventing embedding pollution
Database migration validation
When to omit:
Single-model deployments
Testing/development
read_consistency_interval (optional)
Time interval in seconds for read consistency in multi-process scenarios. Controls how frequently database readers check for updates from writers.
Use case: When multiple processes access the same database - one process enrolling faces while others perform recognition/tracking.
Example:
Recommended values:
0.1-0.5- Real-time applications (low latency)0.5-1.0- General use (balanced)1.0+- Batch processing (lower overhead)None- Single process or default behavior
When to use:
Multiple cameras/processes reading from shared database
One process enrolling while others track
Distributed face recognition systems
When to omit:
Single-process applications
Writer-only processes
Read-only batch processing
Initialization Patterns
Using ReID_DatabasePool (Recommended)
Connection pooling ensures single connection per database path:
Thread Safety: Database objects returned by the pool are thread-safe. You can safely obtain multiple references to the same database object and use them concurrently from different threads.
Using ReID_Database Directly
Direct instantiation (bypasses connection pooling):
Warning: Not recommended for production. Multiple instances for the same path can cause issues.
Environment-Specific Paths
Development
Production
Docker/Container
See Methods Reference for database operations.
Last updated
Was this helpful?

