# ============================================================================== # FindFace Security configuration file # ============================================================================== # # This config file is written in Python's syntax and interpreted at FindFace Security # service startup. You have to restart the service in order to apply changes. # # If you have any questions or suggestions, please contact us at support@ntechlab.com # ============================================================================== # GENERAL SETTINGS # ============================================================================== # enables debug options DEBUG = False # media files directory MEDIA_ROOT = "/var/lib/findface-security/uploads" # static files directory STATIC_ROOT = "/var/lib/findface-security/static" # language code LANGUAGE_CODE = 'en-us' # time zone TIME_ZONE = 'UTC' # Database is used by FindFace Security to store cameras, # camera groups, watchlists and so on. Only PostgreSQL is supported. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'DISABLE_SERVER_SIDE_CURSORS': True, 'NAME': 'ffsecurity', 'PORT': 5439, 'USER': 'ntech', 'PASSWORD': '1yugQnVH1YgfVNm9I5EPR4XNJFnSHo19' } } # Signature key for session encryption # Use pwgen -sncy 50 1|tr "'" "." to generate your own unique key SECRET_KEY = '66a2bd400a3142779b266718b958dd11' # ============================================================================== # FINDFACE SECURITY SETTINGS # ============================================================================== # SERVICE_EXTERNAL_ADDRESS is prioritized for FFSecurity webhooks and Genetec plugin. # EXTERNAL_ADDRESS is used instead if SERVICE_EXTERNAL_ADDRESS is not provided. # You must provide either SERVICE_EXTERNAL_ADDRESS or EXTERNAL_ADDRESS in order # to be able to work with FFSecurity webhooks and Genetec plugin. SERVICE_EXTERNAL_ADDRESS = 'http://192.168.0.101' # EXTERNAL_ADDRESS is used to access objects created inside FFSecurity via external links. EXTERNAL_ADDRESS = '' # - Base FFSecurity settings - # enable permissions system ENABLE_ACL = True FFSECURITY = { # auth config # available options: face, password, face_and_password, face_or_password 'AUTH_TYPE': 'face_or_password', # 180 days by default 'MAXIMUM_SESSION_LENGTH': 15552000, # findface-video-worker authorization token 'VIDEO_DETECTOR_TOKEN': '5d02eb46700c032e148fda119da09c32', # optional objects to detect 'ENABLE_CARS': False, 'ENABLE_BODIES': False, # base face matching confidence threshold 'FACE_CONFIDENCE_THRESHOLD': 0.723, # model: [kiwi_320] # base body matching confidence threshold 'BODY_CONFIDENCE_THRESHOLD': 0.65, # model: [andariel] # base car matching confidence threshold 'CAR_CONFIDENCE_THRESHOLD': 0.65, # model: [alonso] # episodes specific matching threshold that is used to join faces in an episode 'FACE_EPISODES_THRESHOLD': 0.688, # FAR = 1.00E-06 # model: [kiwi_320] 'BODY_EPISODES_THRESHOLD': 0.61, # model: [andariel] 'CAR_EPISODES_THRESHOLD': 0.61, # model: [alonso] # minimum confidence for license plate number, country and region identification 'MIN_CAR_LICENSE_PLATE_CONFIDENCE': 0.2, # model: [carattr.license_plate.v0] # NOTE. quality settings below do not apply to new events, # change video manager job's `filter_min_quality` (camera setting) to filter events # minimum face quality sufficient to add it to a card and use object in counter 'MINIMUM_FACE_QUALITY': 0.45, # model: [quality.v1] # minimum body quality sufficient to add it to a card and use object in counter 'MINIMUM_BODY_QUALITY': 0.6, # model: [pedattr.quality.v0] # minimum car quality sufficient to add it to a card and use object in counter 'MINIMUM_CAR_QUALITY': 0.65, # model: [carattr.quality.v0] # use additional features for extra confidence when matching cars by emben 'EXTRA_CAR_MATCHING': { 'color': {'enabled': False, 'min_confidence': 0}, 'body': {'enabled': False, 'min_confidence': 0}, 'make': {'enabled': False, 'min_confidence': 0}, 'model': {'enabled': False, 'min_confidence': 0}, 'special_vehicle_type': {'enabled': False, 'min_confidence': 0}, }, # do not save unmatched events (GDPR support) 'IGNORE_UNMATCHED': False, # blur all unmatched objects on the full frame of the matched event (GDPR support) 'BLUR_UNMATCHED_OBJECTS': False, # full frame jpeg quality when `BLUR_UNMATCHED_OBJECTS` is enabled 'BLURRED_FULLFRAME_JPEG_QUALITY': 85, # matched face events older than EVENTS_MAX_MATCHED_AGE will be automatically # deleted (every night at 1:17 am by default) 'FACE_EVENTS_MAX_MATCHED_AGE': 30, # same as above but for unmatched face events 'FACE_EVENTS_MAX_UNMATCHED_AGE': 30, # same as EVENTS_MAX_MATCHED_AGE but for matched full frame face images only (thumbnails won't be deleted) 'FACE_EVENTS_MAX_FULLFRAME_MATCHED_AGE': 30, # same as above but for unmatched full frame face images only (thumbnails won't be deleted) 'FACE_EVENTS_MAX_FULLFRAME_UNMATCHED_AGE': 30, # same as above but for car events 'CAR_EVENTS_MAX_MATCHED_AGE': 30, 'CAR_EVENTS_MAX_UNMATCHED_AGE': 30, 'CAR_EVENTS_MAX_FULLFRAME_MATCHED_AGE': 30, 'CAR_EVENTS_MAX_FULLFRAME_UNMATCHED_AGE': 30, # same as above but for body events 'BODY_EVENTS_MAX_MATCHED_AGE': 30, 'BODY_EVENTS_MAX_UNMATCHED_AGE': 30, 'BODY_EVENTS_MAX_FULLFRAME_MATCHED_AGE': 30, 'BODY_EVENTS_MAX_FULLFRAME_UNMATCHED_AGE': 30, # same as above but for counter records 'COUNTER_RECORDS_MAX_AGE': 30, # same as above but for areas records 'AREA_ACTIVATIONS_MAX_AGE': 30, # same as above but for cluster events (if no cluster events left in cluster, it is deleted too) 'FACE_CLUSTER_EVENTS_MAX_AGE': 90, 'BODY_CLUSTER_EVENTS_MAX_AGE': 90, 'CAR_CLUSTER_EVENTS_MAX_AGE': 90, # same as above but for audit logs 'AUDIT_LOGS_MAX_AGE': 0, # VMS video chunks will be deleted older than VMS_VIDEOS_MAX_AGE 'VMS_VIDEOS_MAX_AGE': 7, # when closing episode, delete all events except the best episode event 'EPISODE_KEEP_ONLY_BEST_EVENT': False, # NTLS licence server url 'NTLS_HTTP_URL': 'http://127.0.0.1:3185', # findface-video-worker face posting address, # it must be set to either FFSecurity EXTERNAL_ADDRESS (by default) # or findface-facerouter url (in some specific cases) 'ROUTER_URL': 'http://127.0.0.1', # send serialized cards, card-lists, camera and camera groups in webhooks 'VERBOSE_WEBHOOKS': False, # jpeg quality used when saving thumbnails 'THUMBNAIL_JPEG_QUALITY': 75, # FFServer services urls 'VIDEO_MANAGER_ADDRESS': 'http://127.0.0.1:18810', 'SF_API_ADDRESS': 'http://127.0.0.1:18411', 'FFCOUNTER_ADDRESS': 'http://127.0.0.1:18300', 'LIVENESS_API_ADDRESS': 'http://127.0.0.1:18301', 'VIDEO_STORAGE_ADDRESS': 'http://127.0.0.1:18611', # upload video archives to this path, it differs from media root 'VIDEO_ARCHIVE_UPLOAD_PATH': '/var/lib/findface-security/uploads/videos/', # additional events features # make sure that corresponding extractors are licensed # and enabled at findface-extraction-api config file # available features: gender, age, emotions, beard, glasses, medmask 'FACE_EVENTS_FEATURES': [], # available features: color, clothes 'BODY_EVENTS_FEATURES': [], # available features are: description, license_plate, special_vehicle_type 'CAR_EVENTS_FEATURES': [], # feature specific confidence thresholds 'LIVENESS_THRESHOLD': 0.445, # model: [liveness.pacs.v0] 'EMOTIONS_THRESHOLD': 0.25, # model: [emotions.v1] 'BEARD_THRESHOLD': 0.7, # model: [beard.v0] # deduplicate objects on multi-camera counters 'COUNTERS_DEDUP_OPTIONS': { 'face': { 'enabled': False, 'threshold': 0.723, # model: [kiwi_320] }, 'body': { 'enabled': False, 'threshold': 0.65, # model: [andariel] }, 'car': { 'enabled': False, 'threshold': 0.65, # model: [alonso] }, }, # counters full frame saving options: # `always` - save always # `detect` - save only if faces or silhouettes have been detected # `never` - never save full frames 'COUNTERS_SAVE_FULLFRAME': 'always', 'COUNTERS_FULLFRAME_JPEG_QUALITY': 75, 'COUNTERS_THUMBNAIL_JPEG_QUALITY': 75, # required percentage of bbox intersection with ROI 'COUNTERS_ROI_INTERSECTION_THRESHOLD': 0.75, # deduplicate objects on multi-camera areas 'AREA_DEDUP_OPTIONS': { 'enabled': False, 'threshold': 0.65, # model: [andariel] }, # areas full frame saving options: # `always` - save always # `never` - never save full frames 'AREAS_SAVE_FULLFRAME': 'always', 'AREAS_THUMBNAIL_JPEG_QUALITY': 75, 'AREAS_FULLFRAME_JPEG_QUALITY': 75, # required percentage of bbox intersection with ROI 'AREAS_ROI_INTERSECTION_THRESHOLD': 0.75, 'AREAS_CONDITION_FAILURE_TOLERANCE': 3, 'AREAS_CAMERA_FAILURE_TOLERANCE': 6, # screenshot handler timeout 'SCREENSHOT_HANDLER_TIMEOUT': 15, # max camera frames_dropped percent 'MAX_CAMERA_DROPPED_FRAMES': {'yellow': 0.1, 'red': 0.3}, # max camera objects failed percent 'MAX_CAMERA_FAILED_OBJECTS': {'yellow': 0.1, 'red': 0.3}, # Counter health status config: # max percent of camera records with errors 'MAX_COUNTER_ERROR_RECORDS': {'yellow': 0.3, 'red': 0.5}, # time window for computing health status (in seconds) 'COUNTER_HEALTH_STATUS_TIME_WINDOW': 30, # -- Clusters configuration -- 'ENABLE_NIGHT_CLUSTERIZATION': False, 'ENABLE_REALTIME_CLUSTERIZATION': False, # rrule (recurrence rule) for scheduling clusters clusterization 'CLUSTERIZATION_SCHEDULE': 'RRULE:FREQ=DAILY;INTERVAL=1;WKST=MO;BYHOUR=0;BYMINUTE=0', # clusterize only selected objects types (for realtime and nightly clusterization) # available are: face, body, car 'CLUSTERIZE_OBJECT_TYPES': ['face'], # skip clusterization if unpinned cluster events count is greater than this value 'CLUSTERIZATION_MAX_CLUSTER_EVENTS': None, # cluster event to cluster matching confidence threshold 'FACE_CLUSTER_CONFIDENCE_THRESHOLD': 0.723, # model: [kiwi_320] 'BODY_CLUSTER_CONFIDENCE_THRESHOLD': 0.65, # model: [andariel] 'CAR_CLUSTER_CONFIDENCE_THRESHOLD': 0.65, # model: [alonso] # minimum required event quality for cluster creation 'FACE_CLUSTER_EVENT_MIN_QUALITY': 0.45, # model: [quality.v1] 'BODY_CLUSTER_EVENT_MIN_QUALITY': 0.6, # model: [pedattr.quality.v0] 'CAR_CLUSTER_EVENT_MIN_QUALITY': 0.73, # model: [carattr.quality.v0] # minimum required number events in episode for cluster creation 'FACE_CLUSTER_EVENT_MIN_EPISODE_EVENTS': 1, 'BODY_CLUSTER_EVENT_MIN_EPISODE_EVENTS': 1, 'CAR_CLUSTER_EVENT_MIN_EPISODE_EVENTS': 1, # coefficient of dependence of the clustering threshold on the person event's quality 'FACE_CLUSTER_SOFT_CLUSTERIZATION_COEFFICIENT': 0.1, 'BODY_CLUSTER_SOFT_CLUSTERIZATION_COEFFICIENT': 0.1, 'CAR_CLUSTER_SOFT_CLUSTERIZATION_COEFFICIENT': 0.1, # match with clusters when no card objects matches found 'MATCH_CLUSTERS': False, # create auto cards for unmatched clusters 'CREATE_AUTO_CARDS': False, # pinned clusters keep their id and events after reclusterization 'CLUSTERS_AUTO_PIN_HEURISTICS': { 'face': { # pin clusters with `value` minimum cluster events 'min_events': {'enabled': True, 'value': 10}, # cluster's centroid similarity confidence is less then 'max_centroid_similarity_threshold': {'enabled': True, 'value': 0.55}, # minimum average event's quality 'min_average_events_quality': {'enabled': True, 'value': 0.45}, }, 'body': {}, 'car': {}, }, # always pin clusters with matched events (not affected by heuristics above) 'PIN_MATCHED_CLUSTERS': False, # maximum concurrent video manager jobs for video archives processing 'MAX_VIDEO_ARCHIVE_JOBS': 3, # reports image saving options 'REPORT_THUMBNAIL_JPEG_QUALITY': 75, 'REPORT_THUMBNAIL_MAX_HEIGHT': 100, 'REPORT_FULLFRAME_JPEG_QUALITY': 75, 'REPORT_FULLFRAME_MAX_HEIGHT': 250, # authorization token for POST /events/{face, car, body}/add 'EVENTS_CREATION_API_TOKEN': '5d02eb46700c032e148fda119da09c32', 'EVENTS_CREATION_API_SERIALIZE_EVENTS': False, # save audit logs 'ENABLE_AUDIT_LOGS': True, # -- Startup tests -- # required services availability test 'SERVICES_AVAILABILITY_TEST': True, # -- FFSecurity Onvif -- # auth credentials for ffsecurity_onvif # ONVIF_CREDENTIALS: [ # { # "hostnames": ["192.168.1.64", "2a00:1370:8117:ab87:a614:37ff:fe49:2683"], # "login": "admin", # "password": "admin123" # } # ], 'ONVIF_CREDENTIALS': [], # list of all hostnames that will be ignored during Onvif service discovery # ONVIF_IGNORE_LIST: ["192.168.1.217"], 'ONVIF_IGNORE_LIST': [], # -- Optional parameters -- # Regular expression to filter files uploaded to card-attachments. All files are allowed by default. # For example, to allow only files with png extension - specify r'.*.png$' or r'.*(.png|.jpg)$' # to allow png and jpg extensions. You can specify any valid Python regular expression. 'CARD_ATTACHMENTS_FILENAME_REGEXP': None, # maximum event age in seconds than could be added to an episode. 'FACE_EPISODE_SEARCH_INTERVAL': 60, 'BODY_EPISODE_SEARCH_INTERVAL': 60, 'CAR_EPISODE_SEARCH_INTERVAL': 60, # maximum episode duration (episode is closed after) 'EPISODE_MAX_DURATION': 300, # if no new event added to an episode during this timeout, episode will be closed. 'EPISODE_EVENT_TIMEOUT': 30, # maximum created thumbnail width 'THUMBNAIL_MAX_WIDTH': 320, # url of the backend which is used for social network search. # contact support for additional information. 'SOCIAL_BACKEND': None, # additional social backend headers. 'SOCIAL_HEADERS': {}, # unacknowledged events notification interval 'UNACKNOWLEDGED_NOTIFY_INTERVAL': 1, # -- Overprotect media -- # Set to True to run all media requests (photos, attachments) through the django application for acl checks. # Enabling this setting slightly increases security but has severe negative effects on performance. # You will also have to mark /uploads/ location as 'internal' in nginx config 'OVERPROTECT_MEDIA': False, # -- External VMS integration settings -- # cleanup settings 'EXTERNAL_VMS_EVENTS_MAX_AGE': 0, 'EXTERNAL_VMS_SEND_EVENTS_STATUS_MAX_AGE': 0, 'EXTERNAL_VMS': { 'ENABLED': False, 'PLUGIN_ADDRESS': 'http://127.0.0.1:18333', 'TOKEN': 'VmsPluginToken PLUGIN_TOKEN', 'EVENT_SENDER': { 'ENABLED': False, 'ALLOWED_TYPES': ['face'], 'SENDER_TASKS': 1, 'MAX_SEND_ATTEMPTS': 1, 'MIN_EVENT_SEND_TIMEOUT': 0.1, 'MAX_EVENT_SEND_TIMEOUT': 100, 'RESPONSE_TIMEOUT': 10, }, }, # -- Custom model fields -- # Edit CUSTOM_FIELDS -> `human_card` section to customize human card fields. # Edit CUSTOM_FIELDS -> `car_card` section to customize car card fields. # Edit CUSTOM_FIELDS -> `face_object` section to customize face object fields. # Edit CUSTOM_FIELDS -> `car_object` section to customize car object fields. # Edit CUSTOM_FIELDS -> `body_object` section to customize body object fields. # Below is an example with every field type possible. # 'CUSTOM_FIELDS': { # 'human_card': { # 'items': [ # { # 'name': 'personid', # 'default': '', # 'label': 'PersonID', # 'display': ['list', 'form'], # 'description': 'Sigur person ID', # 'editable': False # }, # { # 'name': 'firstname', # 'default': '', # 'label': 'First Name', # 'display': ['list', 'form'], # 'description': 'Sigur first name', # 'editable': False # }, # { # 'name': 'lastname', # 'default': '', # 'label': 'Last Name', # 'display': ['list', 'form'], # 'description': 'Sigur last name', # 'editable': False # }, # { # 'name': 'version', # 'default': '', # 'label': 'Version', # 'display': ['list', 'form'], # 'description': 'Sigur photo version', # 'editable': False # } # ], # 'filters': [ # { # 'name': 'personid', # 'label': 'Sigur person ID filter', # 'field': 'personid' # } # ] # }, # 'car_card': {}, # same fields are available # 'face_object': { # 'items': [ # { # "field_name": "tag_name_1", # "type": "string", # "default": "change_me" # }, # { # "field_name": "tag_name_2", # "type": "uint", # "default": 123 # }, # { # "field_name": "tag_name_3", # "type": "bool", # "default": True # }, # ] # } # }, } # -- Authorization configuration dictionary -- FFSECURITY_AUTH_CONFIG = { 'FACE_AUTH_CONFIDENCE': 0.723, # model: [kiwi_320] # 3 settings below are for front-end only # session renew works only with face or face_or_password authorization type 'NEED_SESSION_RENEW': False, 'RENEW_SESSION_INTERVAL': 0, 'MAXIMUM_RENEW_ATTEMPTS': 2, } # - User interface configuration dictionary - FFSECURITY_UI_CONFIG = { # Adjustable confidence threshold presets for objects matching. # Please consult with our support before changing. "counter_records": {"proximity_display": {"enabled": True, "min_count": 2}}, "objects": { "faces": { "features": { "gender": ["male", "female"], "age": {"age_gte": "", "age_lte": ""}, "emotions": ["angry", "disgust", "fear", "happy", "sad", "surprise", "neutral"], "glasses": ["none", "eye", "sun"], "beard": ["none", "beard"], "liveness": ["real", "fake"], "medmask": ["none", "incorrect", "correct"], }, "confidence_display": [ {"confidence": 0.00, "color": "#000000", "label": {"ru": "Очень низкий", "en": "Very Low"}}, {"confidence": 0.65, "color": "#FF0300", "label": {"ru": "Низкий", "en": "Low"}}, {"confidence": 0.704, "color": "#FFB700", "label": {"ru": "Пониженный", "en": "Slightly Low"}}, {"confidence": 0.723, "color": "#B8FA00", "label": {"ru": "Нормальный", "en": "Moderate"}}, {"confidence": 0.75, "color": "#7EFF2B", "label": {"ru": "Повышенный", "en": "Slightly High"}}, {"confidence": 0.80, "color": "#4DFF60", "label": {"ru": "Высокий", "en": "High"}}, {"confidence": 0.85, "color": "#1DFF96", "label": {"ru": "Очень высокий", "en": "Very High"}}, ], }, "cars": { "features": { "color": [ "beige", "black", "blue", "brown", "cyan", "gold", "green", "grey", "orange", "pink", "purple", "red", "silver", "violet", "white", "yellow", ], "body": [ "suv", "sedan", "crossover", "convertible", "coupe", "wagon", "cab", "minibus", "minivan", "limousine", ], "make": [ "ac", "acura", "adler", "alfa_romeo", "alpina", "am_general", "amc", "aro", "asia", "aston_martin", "audi", "austin", "austin_healey", "avtokam", "baic", "bajaj", "bentley", "blakely", "bmw", "borgward", "bradley", "brilliance", "bugatti", "buick", "bus", "byd", "cadillac", "can_am", "chana", "changan", "changfeng", "changhe", "chery", "chevrolet", "chrysler", "citroen", "dacia", "dadi", "daewoo", "daihatsu", "daimler", "dallara", "datsun", "derways", "dkw", "dodge", "dongfeng", "doninvest", "ds", "dw_hower", "eagle", "excalibur", "faw", "ferrari", "fiat", "fisker", "ford", "foton", "gaz", "geely", "genesis", "geo", "gmc", "great_wall", "hafei", "haima", "hanomag", "haval", "hawtai", "holden", "honda", "horch", "huanghai", "hudson", "hummer", "hyundai", "ig", "infiniti", "international", "iran_khodro", "isuzu", "jac", "jaguar", "jeep", "jinbei", "jmc", "kamaz", "kia", "lamborghini", "lancia", "land_rover", "landwind", "lexus", "lifan", "lincoln", "lotus", "luaz", "luxgen", "mahindra", "maruti", "maserati", "maybach", "mazda", "mclaren", "mercedes", "mercury", "metrocab", "mg", "mini", "mitsubishi", "mitsuoka", "morgan", "morris", "moscvich", "nash", "nissan", "oldsmobile", "opel", "packard", "peugeot", "plymouth", "polaris", "pontiac", "porsche", "proton", "puch", "ram", "rambler", "ravon", "renault", "rimac", "rolls_royce", "rover", "saab", "samsung", "saturn", "scion", "seat", "shanghai_maple", "shuanghuan", "simca", "skoda", "smart", "smz", "spyker", "ssang_yong", "steyr", "studebaker", "subaru", "sunbeam", "suzuki", "tagaz", "talbot", "tata", "tatra", "tesla", "think", "tianma", "tianye", "toyota", "trabant", "triumph", "uaz", "vauxhall", "vaz", "volkswagen", "volvo", "vortex", "wanderer", "wartburg", "willis", "willys", "xinkai", "zaz", "zenvo", "zil", "zis", "zotye", "zx", ], "model": {"url": "/static/car_models.json"}, "license_plate_number": "", "license_plate_country": [ "unknown", "AM", "BR", "BY", "GE", "IN", "KG", "SA", "KZ", "RU", "UA", "AE", "UZ", "VN", ], "license_plate_region": ["unknown", "DXB", "SHJ", "ADH", "AJM", "UAK", "RAK", "FUJ"], "special_vehicle_type": ["not_special", "ambulance", "police", "rescue_service", "taxi"], }, "confidence_display": [ # model: [alonso] {"confidence": 0.00, "color": "#000000", "label": {"ru": "Очень низкий", "en": "Very Low"}}, {"confidence": 0.30, "color": "#FF0300", "label": {"ru": "Низкий", "en": "Low"}}, {"confidence": 0.45, "color": "#FFB700", "label": {"ru": "Пониженный", "en": "Slightly Low"}}, {"confidence": 0.65, "color": "#B8FA00", "label": {"ru": "Нормальный", "en": "Moderate"}}, {"confidence": 0.75, "color": "#7EFF2B", "label": {"ru": "Повышенный", "en": "Slightly High"}}, {"confidence": 0.85, "color": "#4DFF60", "label": {"ru": "Высокий", "en": "High"}}, {"confidence": 0.90, "color": "#1DFF96", "label": {"ru": "Очень высокий", "en": "Very High"}}, ], }, "bodies": { "features": { "headwear": ["hat", "hood", "none"], "upper_clothes": ["long_sleeves", "short_sleeves", "without_sleeves"], "detailed_upper_clothes": ["jacket", "coat", "sleeveless", "sweatshirt", "t-shirt", "shirt", "dress"], "top_color": [ "white", "black", "grey", "brown", "red", "orange", "yellow", "green", "lightblue", "blue", "purple", "pink", "beige", "violet", ], "lower_clothes": ["pants", "obscured", "skirt", "shorts"], "bottom_color": [ "white", "black", "grey", "brown", "red", "orange", "yellow", "green", "lightblue", "blue", "purple", "pink", "beige", "violet", ], }, "confidence_display": [ # model: [andariel] {"confidence": 0.00, "color": "#000000", "label": {"ru": "Очень низкий", "en": "Very Low"}}, {"confidence": 0.50, "color": "#FF0300", "label": {"ru": "Низкий", "en": "Low"}}, {"confidence": 0.60, "color": "#FFB700", "label": {"ru": "Пониженный", "en": "Slightly Low"}}, {"confidence": 0.65, "color": "#B8FA00", "label": {"ru": "Нормальный", "en": "Moderate"}}, {"confidence": 0.80, "color": "#7EFF2B", "label": {"ru": "Повышенный", "en": "Slightly High"}}, {"confidence": 0.85, "color": "#4DFF60", "label": {"ru": "Высокий", "en": "High"}}, {"confidence": 0.90, "color": "#1DFF96", "label": {"ru": "Очень высокий", "en": "Very High"}}, ], }, }, "available_video_wall_features": {"faces": True, "cars": True, "bodies": True, "gdpr": False}, "vms": { "enabled": False, "video_player": False, "timeline_objects": { "events": { "faces": { "enabled": False, "limit": 100, }, "cars": { "enabled": False, "limit": 100, }, }, }, }, } # -- Server configuration -- # consult support before changing these settings. IPC_BACKEND_TYPE = 'nats' IPC_CONFIG = { 'nats': { 'servers': ['nats://127.0.0.1:4222'], } } ETCD_CONFIG = { 'host': 'localhost', 'port': 2379, } # per worker thread pool size. ASGI_THREADS = 32 UVICORN_SETTINGS = { # worker processes count, # 'auto' sets it to logical cpu count, but not more than 8. 'workers': 'auto', 'host': 'localhost', 'port': 8002, # websocket worker processes count, # 'auto' sets it to logical cpu count, but not more than 4. 'ws-workers': 'auto', 'ws-host': 'localhost', 'ws-port': 8003, } # disable unused services to increase # overall system performance in some cases. SERVICES = { "ffsecurity": { "episodes": True, "webhooks": True, # use queue manager to prevent drops of video archive events "video_archive_events_manager": False, } } # -- Other settings -- # The number of threads in the night clusterization. # Not recommended values are greater than the number of cores in the processor. # Consult with support before changing this value. NUMPY_OMP_NUM_THREADS = 'auto' # ============================================================================== # FINDFACE SECURITY PLUGINS # ============================================================================== # Uncomment lines below to enable plugins. Please consult documentation for # a plugin specific settings. # =============== Axxon ================ # INSTALLED_APPS.append('ffsecurity_axxon') # AXXON = [ # { # 'name': 'server_name', # 'api': 'http://example.com/', # 'rtsp': 'rtsp://example.com:554/', # 'user': 'user', # 'password': 'password', # } # ] # FFSECURITY_UI_CONFIG['card'] = { # 'video': True, # } # =============== Genetec ================ # INSTALLED_APPS.append('ffsecurity_genetec') # ================ Sigur ================= # keep in mind, that SIGUR plugin also uses CUSTOM_FIELDS and THUMBNAIL_MAX_WIDTH settings # INSTALLED_APPS.append('ffsecurity_sigur') # SIGUR = { # 'LOGIN': 'admin', # 'PASSWORD': 'admin', # 'MF_SELECTOR': 'biggest', # what to do with several faces in sigur cluster photo; allowed ['biggest', 'reject'] # 'ONLY_RT_EVENTS': True, # only events with bs_type == realtime, # 'EVENT_DELAY': 0.004 # minimum time between two events of same cluster in seconds. # # If interval between two events with same cluster is less, than this value, second event will be dropped # } # ======= CryptoPRO authentication ======= # INSTALLED_APPS.append('ffsecurity_cproauth') # REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] = [ # 'ffsecurity.auth.TokenAuthentication', # 'ffsecurity_cproauth.auth.CryptoProOrTokenAuthentication' # ] # ============== Puppeteer =============== # INSTALLED_APPS.append('ffsecurity_puppeteer') # PUPPETEER_CONFIG = { # 'UNSAVED_RESULTS_DELETION_TIMEOUT': 3600, # maximum lifetime of search results not saved involuntarily # 'REMOTE_MONITORING_SYNC_INTERVAL': 600, # monitoring data synchronization interval, seconds # 'ENABLE_DAILY_SEARCH': True, # daily search activation (default False) # 'DAILY_SEARCH_PUSH_HOUR': 2, # daily search cards synchronization hour # 'DAILY_SEARCH_PULL_HOUR': 6, # hour in which results of daily search will be obtained # 'puppets': [ # { # 'id': 'first_puppet', # puppet ID # 'url': 'http://1.1.1.1:8010/', # puppet URL # 'token': 'first_puppet_token', # use pwgen -s 64 1 (should match the token in puppet) # 'facen_model': 'kiwi_320' # face model in puppet # }, # { # 'id': 'second_puppet', # 'url': 'http://1.1.1.1:8010/', # 'token': 'second_puppet_token', # # # if remote installation has a different face model than the one used in FFSecurity - # # you need to specify its name and ExtractionAPI URL where the corresponding face model is specified # 'facen_model': 'grapefruit_480', # 'extractor': 'http://127.0.0.1:18667', # }, # ] # } # # ================= Vns ================== # A plugin for using FindFace Security as a puppeteer server # INSTALLED_APPS.append('ffsecurity_vns') # VNS_CONFIG = { # 'USERS': { # 'user1': 'token1', # 'user2': 'token2' # }, # 'MONITORING_THRESHOLD': 0.75, # 'DAILY': { # 'ENABLED': False, # 'THRESHOLD': 0.75, # 'START_TIME': "00:00:00" # } # }