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