-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmlapiconfig.ini
135 lines (108 loc) · 3.63 KB
/
mlapiconfig.ini
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
[general]
# This is an optional file
# If specified, you can specify tokens with secret values in that file
# and onlt refer to the tokens in your main config file
secrets=/mlapi/secrets.ini
#secrets=./secrets.mine
# port that mlapi will listen on. Default 5000
port=5000
# Maximum # of processes that will be forked
# to handle requests. Note that each process will
# have its own copy of the model, so memory can
# build up very quickly
# This number also dictates how many requests will be executed in parallel
# The rest will be queued
# For now, keep this to 1 if you are on a GPU
processes=1
# the secret key that will be used to sign
# JWT tokens. Make sure you change the value
# in your secrets.ini
mlapi_secret_key=!MLAPI_SECRET_KEY
# folder where images will be uploaded
# default ./images
images_path=/config/images
# folder where the user DB will be stored
db_path=/mlapi/db
# If specified, will limit detected object size to this amount of
# the total image size passed. Can help avoiding weird detections
# You can specify as % or px. Default is px
# Remember the image is resized to 416x416 internally. better
# to keep in %
max_detection_size=100%
# You can now limit the # of detection process
# per target processor. If not specified, default is 1
# Other detection processes will wait to acquire lock
cpu_max_processes=3
tpu_max_processes=1
gpu_max_processes=1
# NEW: Time to wait in seconds per processor to be free, before
# erroring out. Default is 120 (2 mins)
cpu_max_lock_wait=120
tpu_max_lock_wait=120
gpu_max_lock_wait=120
[object]
# for Yolov3
object_framework=opencv
object_processor=cpu
object_config=/config/models/yolov3/yolov3.cfg
object_weights=/config/models/yolov3/yolov3.weights
object_labels=/config/models/yolov3/coco.names
# for Tiny Yolov3
#object_framework=opencv
#object_processor=cpu
#object_config=./models/tinyyolov3/yolov3-tiny.cfg
#object_weights=./models/tinyyolov3/yolov3-tiny.weights
#object_labels=./models/tinyyolov3/coco.names
# for Yolov4
#object_framework=opencv
#object_processor=cpu
#object_config=./models/yolov4/yolov4.cfg
#object_weights=./models/yolov4/yolov4.weights
#object_labels=./models/yolov4/coco.names
# for Tiny Yolov4
#object_framework=opencv
#object_processor=cpu
#object_config=./models/tinyyolov4/yolov4-tiny.cfg
#object_weights=./models/tinyyolov4/yolov4-tiny.weights
#object_labels=./models/tinyyolov4/coco.names
# for Google Coral Edge TPU
#object_framework=coral_edgetpu
#object_processor=tpu
#object_weights=/config/models/coral_edgetpu/ssd_mobilenet_v2_coco_quant_postprocess_edgetpu.tflite
#object_labels=/config/models/coral_edgetpu/coco_indexed.names
[face]
face_detection_framework=dlib
face_recognition_framework=dlib
face_num_jitters=0
face_upsample_times=1
face_model=cnn
face_train_model=hog
face_recog_dist_threshold=0.6
face_recog_knn_algo=ball_tree
known_images_path=/config/known_faces
unknown_images_path=/config/unknown_faces
unknown_face_name=unknown face
save_unknown_faces=yes
save_unknown_faces_leeway_pixels=50
[alpr]
alpr_use_after_detection_only=yes
alpr_api_type=cloud
# -----| If you are using plate recognizer | ------
alpr_service=plate_recognizer
alpr_key=!PLATEREC_ALPR_KEY
platerec_stats=yes
#platerec_regions=['us','cn','kr']
platerec_min_dscore=0.1
platerec_min_score=0.2
# ----| If you are using openALPR |-----
#alpr_service=open_alpr
#alpr_key=!OPENALPR_ALPR_KEY
#openalpr_recognize_vehicle=1
#openalpr_country=us
#openalpr_state=ca
# openalpr returns percents, but we convert to between 0 and 1
#openalpr_min_confidence=0.3
# ----| If you are using openALPR command line |-----
openalpr_cmdline_binary=alpr
openalpr_cmdline_params=-j -d
openalpr_cmdline_min_confidence=0.3