forked from SthPhoenix/InsightFace-REST
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.env
More file actions
executable file
·65 lines (54 loc) · 2.17 KB
/
example.env
File metadata and controls
executable file
·65 lines (54 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# InsightFace-REST Configuration
# ==============================
# Docker Compose project name (used for container naming)
COMPOSE_PROJECT_NAME=insightface-rest
# InsightFace-REST Docker image version
IFR_VERSION=v0.9.5.0
# Face Detection Model (choose from: retinaface*, scrfd*, yolov5*-face, centerface)
# Note: SCRFD models require input dimensions divisible by 32 (e.g., 640x640)
DET_NAME=retinaface_r50_v1
# Face Recognition Model (choose from: arcface*, glintr100, w600k*, adaface*)
REC_NAME=w600k_r50
# Gender/Age Model (None to disable, or 'genderage_v1')
GA_MODEL=None
# Face Mask Detection Model (None to disable, or 'mask_detector*')
MASK_DETECTOR=None
# Batch Processing Configuration
# ------------------------------
# Recognition batch size (higher = better throughput but more GPU memory)
REC_BATCH_SIZE=64
# Detection batch size (requires batch-supported detectors like SCRFD/YOLOv5)
DET_BATCH_SIZE=8
# Default Request Parameters
# --------------------------
# Face detection confidence threshold (0.0-1.0)
DEF_DET_THRESH=0.6
# Return base64-encoded face crops in responses
DEF_RETURN_FACE_DATA=False
# Enable gender/age estimation in responses
DEF_EXTRACT_GA=False
# Return face embeddings/feature vectors in responses
DEF_EXTRACT_EMBEDDING=True
# HTTP headers for image URL fetching (i.e. user agent to prevent blocking, or authorization headers)
DEF_IMG_REQ_HEADERS='{"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0"}'
# Performance Settings
# --------------------
# Maximum input image dimensions (W,H) - smaller=faster
# Note: SCRFD models require input dimensions divisible by 32 (e.g., 640x640)
MAX_SIZE=640,640
# Inference backend (trt=TensorRT, onnx=ONNX Runtime)
INFERENCE_BACKEND=trt
# Force FP16 mode for TensorRT (boosts speed on compatible GPUs)
FORCE_FP16=True
# Worker processes per container (higher=better concurrency)
NUM_WORKERS=1
# System Configuration
# --------------------
# Log verbosity (DEBUG, INFO, WARNING, ERROR)
LOG_LEVEL=INFO
# Use GPU-accelerated JPEG decoding (requires compatible GPU)
USE_NVJPEG=False
# Advanced
# --------
# Face model implementation class (custom implementations)
FACE_MODEL_CLASS=face_model