neo-ZMES - Public Beta

Discussion topics related to mobile applications and ZoneMinder Event Server (including machine learning)
juan11perez
Posts: 64
Joined: Tue Apr 27, 2021 3:41 am

Re: neo-ZMES - Public Beta

Post by juan11perez »

yes I see it. thank you.
I'll build nvidia and give a test.
juan11perez
Posts: 64
Joined: Tue Apr 27, 2021 3:41 am

Re: neo-ZMES - Public Beta

Post by juan11perez »

Good day trying to get face recognition running it throughs the following error:

Code: Select all

root@UNRAID:/config/hook# python3 ./zm_train_faces.py 
Traceback (most recent call last):
  File "./zm_train_faces.py", line 32, in <module>
    zmesc = proc_conf(args=args, conf_globals=g)
TypeError: process_config() missing 1 required positional argument: 'type_'
root@UNRAID:/config/hook# 
tsp84
Posts: 227
Joined: Thu Dec 24, 2020 4:04 am

Re: neo-ZMES - Public Beta

Post by tsp84 »

Just pushed a fix
juan11perez
Posts: 64
Joined: Tue Apr 27, 2021 3:41 am

Re: neo-ZMES - Public Beta

Post by juan11perez »

Thank you. now this

Code: Select all

root@UNRAID:/config/hook# python3 ./zm_train_faces.py 
Traceback (most recent call last):
  File "./zm_train_faces.py", line 34, in <module>
    g.config = zmesc.config
AttributeError: 'tuple' object has no attribute 'config'
root@UNRAID:/config/hook# 
tsp84
Posts: 227
Joined: Thu Dec 24, 2020 4:04 am

Re: neo-ZMES - Public Beta

Post by tsp84 »

Sorry, Just pushed again. Hopefully it works as intended, on my ZMES host I don't have face recognition library installed, I use the mlapi one.
juan11perez
Posts: 64
Joined: Tue Apr 27, 2021 3:41 am

Re: neo-ZMES - Public Beta

Post by juan11perez »

Apologies. Still some errors

Code: Select all

root@UNRAID:/config/hook# python3 ./zm_train_faces.py 
11/20/21 13:31:37.624475 zmes_face_train[4644] DBG1 new_yaml.py:242->[config:init: the supplied config file exists -> '/etc/zm/objectconfig.yml']
11/20/21 13:31:37.712563 zmes_face_train[4644] DBG1 new_yaml.py:265->[config::init: default configuration built (no secrets or substitution vars replaced, yet!)]
11/20/21 13:31:37.713321 zmes_face_train[4644] DBG1 new_yaml.py:170->[config:zmes:proc: 39 built in default keys added to the 'base' config -> ['force_mpd', 'same_model_high_conf', 'skip_mons', 'force_live', 'sanitize_str', 'version', 'basic_user', 'basic_password', 'image_path', 'max_detection_size', 'delete_after_analyze', 'write_debug_image', 'write_image_to_zm', 'hass_enabled', 'hass_people', 'hass_notify', 'hass_cooldown', 'push_err_device', 'push_jpg', 'push_jpg_key', 'push_gif', 'push_gif_key', 'push_debug_device', 'push_cooldown', 'mqtt_topic', 'mqtt_broker', 'mqtt_port', 'tls_cert', 'tls_key', 'fp16_target', 'alpr_api_type', 'alpr_url', 'openalpr_recognize_vehicle', 'openalpr_country', 'openalpr_state', 'openalpr_min_confidence', 'smart_fs_thresh', 'frame_strategy', 'same_model_sequence_strategy']]
11/20/21 13:31:37.713589 zmes_face_train[4644] DBG1 new_yaml.py:114->[config:zmes:proc: substituting '{{variables}}' for the 'base' config keys]
11/20/21 13:31:37.714377 zmes_face_train[4644] DBG1 new_yaml.py:136->[config:zmes: successfully replaced 3 default sub vars in the base config -> ['coral_models', 'yolo4_models', 'base_data_path']]
11/20/21 13:31:37.71471 zmes_face_train[4644] DBG1 new_yaml.py:285->[config:zmes: the configured secrets file exists and is a file -> '/etc/zm/zm_secrets.yml']
11/20/21 13:31:37.715005 zmes_face_train[4644] DBG1 new_yaml.py:291->[config:zmes: starting '{[secrets]}' substitution]
11/20/21 13:31:37.721072 zmes_face_train[4644] DBG1 new_yaml.py:324->[config:zmes: successfully replaced 17 secrets in the base config -> ['HA_TOKEN', 'ML_PASSWORD', 'PUSHOVER_PASS', 'ZM_USER', 'PLATEREC_ALPR_KEY', 'ZM_PORTAL', 'HA_SERVER', 'PUSHOVER_APP_TOKEN', 'MQTT_USERNAME', 'PUSHOVER_USER_KEY', 'mlapi_one_key', 'ZM_API_PORTAL', 'PUSHOVER_USER', 'PUSHOVER_ERR_TOKEN', 'ZM_PASSWORD', 'ML_USER', 'MQTT_PASSWORD']]
11/20/21 13:31:37.721438 zmes_face_train[4644] DBG1 new_yaml.py:329->[config:zmes: there are 2 secrets configured that have no substitution candidates in the base config or the secrets file -> ['AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY']]
11/20/21 13:31:37.723005 zmes_face_train[4644] DBG1 new_yaml.py:358->[config:zmes: starting '{{variable}}' substitution]
11/20/21 13:31:37.727308 zmes_face_train[4644] DBG1 new_yaml.py:375->[config:zmes: successfully replaced 51 sub vars in the base config -> ['platerec_stats', 'match_past_detections', 'object_min_confidence', 'cpu_max_lock_wait', 'face_detection_pattern', 'tpu_face_weights_mobilenetv2', 'same_model_sequence_strategy', 'known_images_path', 'face_upsample_times', 'tpu_object_labels', 'tpu_min_confidence', 'unknown_images_path', 'show_models', 'platerec_min_dscore', 'gpu_max_lock_wait', 'openalpr_cmdline_params', 'yolo4_object_processor', 'face_recog_dist_threshold', 'face_num_jitters', 'past_det_max_diff_area', 'save_unknown_faces_leeway_pixels', 'model_sequence', 'tpu_tf2_mobilenetv2', 'max_detection_size', 'yolo4_object_framework', 'tpu_efficientdet_lite3', 'platerec_min_score', 'save_unknown_faces', 'cpu_max_processes', 'face_train_model', 'smart_fps_thresh', 'frame_strategy', 'tpu_object_weights_mobilenetv2', 'tpu_max_lock_wait', 'contained_area', 'face_detection_framework', 'object_detection_pattern', 'yolo4_object_weights', 'frame_set', 'face_model', 'tpu_max_processes', 'yolo4_object_config', 'alpr_detection_pattern', 'openalpr_cmdline_binary', 'openalpr_cmdline_min_confidence', 'gpu_max_processes', 'alpr_key', 'tpu_object_weights_mobiledet', 'tpu_object_framework', 'yolo4_object_labels', 'disable_locks']]
11/20/21 13:31:37.728691 zmes_face_train[4644] DBG1 new_yaml.py:187->[config:zmes:proc: Base config has been built, all properly configured {[secrets]} and {{vars}} have been replaced! Remember you must manually build per monitor overrode configurations]
11/20/21 13:31:37.892783 zmes_face_train[4644] DBG1 ZMLog:336->[ZM Log:(buffer)->'Setting up signal handlers for log rotation and log interrupt']
11/20/21 13:31:37.893071 zmes_face_train[4644] DBG1 ZMLog:336->[Connected to ZoneMinder Logging system with user 'root' -> '/var/log/zm/zmes_face_train.log']
11/20/21 13:31:37.893459 zmes_face_train[4644] DBG1 face_train_dlib:53->[mlapi:face-train: 'Bruno' is a directory. Processing all images inside it]
11/20/21 13:31:37.893679 zmes_face_train[4644] DBG1 face_train_dlib:58->[mlapi:face-train: loading face from  Bruno/1eab29d6-6a5f-412e-a99b-4926d398f6b9.jpg]
11/20/21 13:31:37.894689 zmes_face_train[4644] DBG1 face_train_dlib:71->[mlapi:face-train: resizing to 0]
11/20/21 13:31:37.894912 zmes_face_train[4644] ERR face_train_dlib:127->[mlapi:face-train: Error initializing face recognition: OpenCV(4.5.4) /root/opencv/modules/imgproc/src/resize.cpp:4054: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
]
11/20/21 13:31:37.895825 zmes_face_train[4644] ERR __init__:1069->['std.err' --> Traceback (most recent call last):
   File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/face_train_dlib.py", line 72, in train
      known_face = imutils.resize(known_face, width=size) 
   File "/usr/local/lib/python3.8/dist-packages/imutils/convenience.py", line 91, in resize
      resized = cv2.resize(image, dim, interpolation=inter) 
 cv2 . error :  OpenCV(4.5.4) /root/opencv/modules/imgproc/src/resize.cpp:4054: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
 
During handling of the above exception, another exception occurred:
 Traceback (most recent call last):
   File "./zm_train_faces.py", line 37, in <module>
      train.FaceTrain(globs=g).train(size=args['size']) 
   File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/face_train_dlib.py", line 128, in train
      raise ValueError('Error opening known faces directory. Is the path correct?') 
 ValueError :  Error opening known faces directory. Is the path correct?]
root@UNRAID:/config/hook# 
tsp84
Posts: 227
Joined: Thu Dec 24, 2020 4:04 am

Re: neo-ZMES - Public Beta

Post by tsp84 »

Weird, I'm looking at the code right now to see what's going on.
tsp84
Posts: 227
Joined: Thu Dec 24, 2020 4:04 am

Re: neo-ZMES - Public Beta

Post by tsp84 »

Just pushed an attempted fix. It's in pyzm so you have to

Code: Select all

sudo pip3 uninstall neo-pyzm
sudo pip3 install git+https://GitHub.com/baudneo/pyzm
# if the pip3 + git doesn't work, you have to recline and use pip3 to install inside the dir.
juan11perez
Posts: 64
Joined: Tue Apr 27, 2021 3:41 am

Re: neo-ZMES - Public Beta

Post by juan11perez »

thank you. that works and it completed training.
now to activate face recognition, i tried (in objectconfig and mlapi)

model_sequence : object, face

and in face

Code: Select all

  face:
    general:
      face_detection_pattern: '{{face_detection_pattern}}'
      # combine results below
      same_model_sequence_strategy: 'union'
    sequence:
      - name: 'Face Detection -> coral::MobileNETv2-SSD 320x320'
        enabled: 'yes'
        face_detection_framework: 'tpu'
        face_weights: '{{tpu_face_weights_mobilenetv2}}'
        face_min_confidence: 0.3
        model_height: 320
        model_width: 320

      - name: 'DLib::Face Detection/Recognition'
        enabled: 'yes'

but still not recognizing. Any other setting?
tsp84
Posts: 227
Joined: Thu Dec 24, 2020 4:04 am

Re: neo-ZMES - Public Beta

Post by tsp84 »

What do the logs say? I need to see if it has any pertinent output.
juan11perez
Posts: 64
Joined: Tue Apr 27, 2021 3:41 am

Re: neo-ZMES - Public Beta

Post by juan11perez »

it's throwing this error

Code: Select all

root@UNRAID:/var/lib/zmeventnotification# sudo -u www-data /var/lib/zmeventnotification/bin/zm_detect.py --config /etc/zm/objectconfig.yml --debug --eventid 228
encrypted_data = {'gAAAAABhmOAoggyHLvqU5XvJyX5ijxtFYQmN5YYNmvLn9uC7BUeNNvzlO7RfLUQlHwlID1LAvcuTKeNqsuVuhgcf84xc1BV7Qw==': 'gAAAAABhmOAoyoZ5r3sbvL0ZFksFfUu2z07WVll4hUljml1sPyLNvKJuqpJ_v_uHZfRSRw0IB-xzQllt9EIf-BR-331M6-NBVQ==', 'gAAAAABhmOAoGcZVmo-oBOfdMn6_528cqYHTaWOHMt-XWboZDzoOcJJZ7hErX724ISTWIh6hZcLZV34UBs7CLOrrg0M3jo7w6g==':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dX28kupnOIRa8mpgSd_2OJJsDEJ0i5fYhPpUUIkdVekIMT9wLYiZkol2Sl2lNx1fwVGew8VFjHeGPi0Q2w==': 'gAAAAABhmOAoKlsKnanR0kjP3US4_AKzMVu8YOba0tryjfFyRT5qAX77kvfbzOFRjGdoOip1zOVZAMCUznRnV7lqcnj1JHgFSt8Ukm_asV_vUYyHmncs62puqyL___BP-gkSTlC0BTm9', 'gAAAAABhmOAogZES-_KIuWLChYWytD2XmdbFGB5HpncNId9rsPM4dy02LGMr0m0MW0ynGtQMLYfBno5CnxoixhuunKfVxBDRyg==': 'gAAAAABhmOAokghoNbuTZVbrUwq9gZRrcwOklT82glnFPwfP4cnm2xk999wOhQkbI_0cOo6P7QEUX2JeYOOqpsrqx3oQl677XQQ3Oed0RK1dN26dmvI8V4E=', 'name': 'mlapi_one'}

11/20/21 15:46:48.383265 zmesdetect_m6[2284] DBG1 new_yaml.py:242->[config:init: the supplied config file exists -> '/etc/zm/objectconfig.yml']

11/20/21 15:46:48.456999 zmesdetect_m6[2284] DBG1 new_yaml.py:265->[config::init: default configuration built (no secrets or substitution vars replaced, yet!)]

11/20/21 15:46:48.458538 zmesdetect_m6[2284] DBG1 new_yaml.py:170->[config:zmes:proc: 39 built in default keys added to the 'base' config -> ['force_mpd', 'same_model_high_conf', 'skip_mons', 'force_live', 'sanitize_str', 'version', 'basic_user', 'basic_password', 'image_path', 'max_detection_size', 'delete_after_analyze', 'write_debug_image', 'write_image_to_zm', 'hass_enabled', 'hass_people', 'hass_notify', 'hass_cooldown', 'push_err_device', 'push_jpg', 'push_jpg_key', 'push_gif', 'push_gif_key', 'push_debug_device', 'push_cooldown', 'mqtt_topic', 'mqtt_broker', 'mqtt_port', 'tls_cert', 'tls_key', 'fp16_target', 'alpr_api_type', 'alpr_url', 'openalpr_recognize_vehicle', 'openalpr_country', 'openalpr_state', 'openalpr_min_confidence', 'smart_fs_thresh', 'frame_strategy', 'same_model_sequence_strategy']]

11/20/21 15:46:48.458848 zmesdetect_m6[2284] DBG1 new_yaml.py:114->[config:zmes:proc: substituting '{{variables}}' for the 'base' config keys]

11/20/21 15:46:48.459633 zmesdetect_m6[2284] DBG1 new_yaml.py:136->[config:zmes: successfully replaced 3 default sub vars in the base config -> ['yolo4_models', 'coral_models', 'base_data_path']]

11/20/21 15:46:48.460012 zmesdetect_m6[2284] DBG1 new_yaml.py:285->[config:zmes: the configured secrets file exists and is a file -> '/etc/zm/zm_secrets.yml']

11/20/21 15:46:48.460339 zmesdetect_m6[2284] DBG1 new_yaml.py:291->[config:zmes: starting '{[secrets]}' substitution]

11/20/21 15:46:48.466247 zmesdetect_m6[2284] DBG1 new_yaml.py:324->[config:zmes: successfully replaced 17 secrets in the base config -> ['MQTT_USERNAME', 'ZM_PORTAL', 'HA_SERVER', 'PUSHOVER_USER', 'ML_PASSWORD', 'ZM_PASSWORD', 'mlapi_one_key', 'PUSHOVER_ERR_TOKEN', 'PUSHOVER_USER_KEY', 'ZM_API_PORTAL', 'PUSHOVER_PASS', 'MQTT_PASSWORD', 'ML_USER', 'PUSHOVER_APP_TOKEN', 'PLATEREC_ALPR_KEY', 'HA_TOKEN', 'ZM_USER']]

11/20/21 15:46:48.466621 zmesdetect_m6[2284] DBG1 new_yaml.py:329->[config:zmes: there are 2 secrets configured that have no substitution candidates in the base config or the secrets file -> ['AWS_SECRET_ACCESS_KEY', 'AWS_ACCESS_KEY_ID']]

11/20/21 15:46:48.468089 zmesdetect_m6[2284] DBG1 new_yaml.py:358->[config:zmes: starting '{{variable}}' substitution]

11/20/21 15:46:48.472483 zmesdetect_m6[2284] DBG1 new_yaml.py:375->[config:zmes: successfully replaced 51 sub vars in the base config -> ['model_sequence', 'gpu_max_processes', 'yolo4_object_weights', 'platerec_min_score', 'face_upsample_times', 'alpr_detection_pattern', 'yolo4_object_config', 'tpu_efficientdet_lite3', 'save_unknown_faces_leeway_pixels', 'tpu_tf2_mobilenetv2', 'face_detection_framework', 'face_model', 'frame_strategy', 'tpu_object_weights_mobiledet', 'tpu_object_framework', 'max_detection_size', 'yolo4_object_labels', 'tpu_object_weights_mobilenetv2', 'show_models', 'face_train_model', 'face_recog_dist_threshold', 'contained_area', 'cpu_max_lock_wait', 'past_det_max_diff_area', 'object_detection_pattern', 'save_unknown_faces', 'object_min_confidence', 'smart_fps_thresh', 'gpu_max_lock_wait', 'openalpr_cmdline_min_confidence', 'disable_locks', 'match_past_detections', 'face_detection_pattern', 'tpu_object_labels', 'unknown_images_path', 'frame_set', 'openalpr_cmdline_binary', 'yolo4_object_framework', 'alpr_key', 'tpu_max_lock_wait', 'yolo4_object_processor', 'cpu_max_processes', 'tpu_min_confidence', 'platerec_stats', 'tpu_face_weights_mobilenetv2', 'same_model_sequence_strategy', 'known_images_path', 'face_num_jitters', 'openalpr_cmdline_params', 'platerec_min_dscore', 'tpu_max_processes']]

11/20/21 15:46:48.473773 zmesdetect_m6[2284] DBG1 new_yaml.py:187->[config:zmes:proc: Base config has been built, all properly configured {[secrets]} and {{vars}} have been replaced! Remember you must manually build per monitor overrode configurations]

11/20/21 15:46:48.474085 zmesdetect_m6[2284] DBG1 zm_detect.py:540->[perf:zmes: building the intial config took 0.090838 ]

11/20/21 15:46:48.474454 zmesdetect_m6[2284] DBG1 new_yaml.py:762->[zmes:api create: building ZM API Session]

11/20/21 15:46:48.478672 zmesdetect_m6[2284] DBG1 api.py:114->[api: SSL certificate verification disabled (encryption enabled, vulnerable to MITM attacks)]

11/20/21 15:46:48.479303 zmesdetect_m6[2284] DBG1 api.py:283->[api: no token found, trying user/pass for login]

11/20/21 15:46:48.538997 zmesdetect_m6[2284] DBG1 api.py:320->[api: detected API ver 2.0+, using token system]

11/20/21 15:46:48.5396 zmesdetect_m6[2284] DBG1 api.py:335->[api: access token expires on: 2021-11-20 17:46:48.539578 (7200s)]

11/20/21 15:46:48.540075 zmesdetect_m6[2284] DBG1 api.py:347->[api: refresh token expires on: 2021-11-21 15:46:48.540065 (86400s)]

11/20/21 15:46:48.560001 zmesdetect_m6[2284] DBG1 new_yaml.py:795->[zmes:api create: ZM API created]

11/20/21 15:46:48.777058 zmesdetect_m6[2284] DBG1 ZMLog:336->[------|  FORKED NEO --- app->Hooks: 7.0.3 - pyzm: 1.0.3 - ES: 7.0.3 - OpenCV:4.5.4 |------]

11/20/21 15:46:48.777432 zmesdetect_m6[2284] DBG1 ZMLog:336->[zmes: Setting up signal handlers for log 'rotation' and log 'interrupt']

11/20/21 15:46:48.628756 zmesdetect_m6[2284] DBG1 zm_detect.py:652->[zmes: this is a 'PAST' (debugging?) event!]

11/20/21 15:46:48.778387 zmesdetect_m6[2284] DBG1 ZMLog:336->[|----------= Encrypted Route Name: 'mlapi_one' | Gateway URL: 'http://192.168.1.100:5002/api/v1' | Weight: 0 =----------|]

11/20/21 15:46:48.630825 zmesdetect_m6[2284] DBG1 zm_detect.py:103->[zmes:mlapi:login: No need to login, access token is valid for 1950.797875881195 sec]

11/20/21 15:46:48.734389 zmesdetect_m6[2284] DBG1 zm_detect.py:318->[
** Gateway URL: 'http://192.168.1.100:5002/api/v1/detect/object?type=object' using auth_header={'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGc......'} 
**** params={'delete': True, 'response_format': 'zm_detect'}
****** JSON: stream: 228 - mid: 6 - reason: None - stream options: {'frame_strategy': 'first', 'frame_set': 'snapshot, alarm, snapshot', 'contig_frames_before_error': 2, 'delay_between_attempts': 2.143256, 'max_attempts': 3, 'delay_between_snapshots': 1, 'smart_fps_thresh': '5', 'save_frames': 'no', 'save_frames_dir': None, 'PAST_EVENT': True} - files: {}
]

11/20/21 15:46:48.780053 zmesdetect_m6[2284] DBG1 ZMLog:336->[Connected to ZoneMinder Logging system with user 'www-data' -> '/var/log/zm/zmesdetect_m6.log']

11/20/21 15:46:49.870582 zmesdetect_m6[2284] DBG1 zm_detect:383->[zmes:mlapi: parsed JSON detection data in multipart response]

11/20/21 15:46:49.870994 zmesdetect_m6[2284] DBG1 zm_detect:379->[zmes:mlapi: parsed the matched image from bytes to a jpeg encoded array in multipart response]

11/20/21 15:46:49.886294 zmesdetect_m6[2284] DBG1 zm_detect:763->[perf:zmes:mlapi: Monitor: office (6)->'Event': 228 mlapi detection took: 1.253375]

11/20/21 15:46:49.886784 zmesdetect_m6[2284] DBG1 pyzm_utils:1336->['success'->  True  ]

11/20/21 15:46:49.887097 zmesdetect_m6[2284] DBG1 pyzm_utils:1297->[--- --- ---]
11/20/21 15:46:49.88742 zmesdetect_m6[2284] DBG1 pyzm_utils:1298->['matched_data'->  labels-->['person']  ]
11/20/21 15:46:49.887703 zmesdetect_m6[2284] DBG1 pyzm_utils:1298->['matched_data'->  model_names-->['coral']  ]
11/20/21 15:46:49.888028 zmesdetect_m6[2284] DBG1 pyzm_utils:1298->['matched_data'->  confidences-->[0.7578125]  ]
11/20/21 15:46:49.888337 zmesdetect_m6[2284] DBG1 pyzm_utils:1298->['matched_data'->  frame_id-->s-61  ]
11/20/21 15:46:49.888653 zmesdetect_m6[2284] DBG1 pyzm_utils:1298->['matched_data'->  type-->['object']  ]
11/20/21 15:46:49.888969 zmesdetect_m6[2284] DBG1 pyzm_utils:1298->['matched_data'->  boxes-->[[410, 360, 1600, 1069]]  ]
11/20/21 15:46:49.889277 zmesdetect_m6[2284] DBG1 pyzm_utils:1298->['matched_data'->  image_dimensions-->{'original': [1080, 1920], 'resized': None}  ]
11/20/21 15:46:49.889598 zmesdetect_m6[2284] DBG1 pyzm_utils:1298->['matched_data'->  polygons-->[{'name': 'full_image', 'value': [[0, 0], [1920, 0], [1920, 1080], [0, 1080]], 'pattern': None}]  ]
11/20/21 15:46:49.889855 zmesdetect_m6[2284] DBG1 pyzm_utils:1298->['matched_data'->  error_boxes-->[[1549, 875, 1914, 1076]]  ]
11/20/21 15:46:49.890108 zmesdetect_m6[2284] DBG1 pyzm_utils:1298->['matched_data'->  image--><uint-8 encoded jpg>  ]

11/20/21 15:46:49.890181 zmesdetect_m6[2284] INF zm_detect:862->[zmes:prediction: '[s-61] person(76%)']

11/20/21 15:46:49.890654 zmesdetect_m6[2284] DBG1 zm_detect:864->[zmes:prediction:JSON: {"frame_id": "61", "labels": ["person"], "confidences": [0.7578125], "boxes": [[410, 360, 1600, 1069]], "image_dimensions": {"original": [1080, 1920], "resized": null}}]

11/20/21 15:46:49.892862 zmesdetect_m6[2284] DBG1 zm_detect:1223->[zmes: writing objects.json and objdetect.jpg to '/var/cache/zoneminder/events/6/2021-11-20/228']

11/20/21 15:46:49.906989 zmesdetect_m6[2284] ERR zm_detect:1258->[zmes: Error trying to obtain push_user: 'view_only_username' token for external push script, token will not be provided.
401 Client Error: Unauthorized for url: http://192.168.1.100:8088/zm/api/host/login.json]
curl: (7) Failed to connect to localhost port 8080: Connection refused

11/20/21 15:46:49.924974 zmesdetect_m6[2284] ERR zm_detect:1325->[zmes: ERROR while executing the custom push script /var/lib/zmeventnotification/bin/gotify_zmes.sh -> 
Command '['/usr/bin/bash', '/var/lib/zmeventnotification/bin/gotify_zmes.sh', '228', '6', 'office', '[s-61] :detected:person(76%) Motion: All', 'start', 'token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNjM3NDA4ODA4LCJleHAiOjE2Mzc0MTYwMDgsInVzZXIiOiJqdWFuIiwidHlwZSI6ImFjY2VzcyJ9.VSZZE-u_COnNIgsDCVEqnaCc-2BWBiC3amE71e5Xxb0', '/var/cache/zoneminder/events/6/2021-11-20/228']' returned non-zero exit status 1.]

11/20/21 15:46:49.926133 zmesdetect_m6[2284] DBG2 zm_detect:1395->[api:make_req: 'put'->http://192.168.1.100:8088/zm/api/events/228.json payload={'Event[Notes]': '[s-61] :detected:person(76%) Motion: All'} query={'token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNjM3NDA4ODA4LCJleHAiOjE2Mzc0MTYwMDgsInVzZXIiOiJqdWFuIiwidHlwZSI6ImFjY2VzcyJ9.VSZZE-u_COnNIgsDCVEqnaCc-2BWBiC3amE71e5Xxb0...'}]

11/20/21 15:46:49.939608 zmesdetect_m6[2284] DBG1 zm_detect:1406->[zmes: replaced old note -> '[s-17] :detected:person(74%) Motion: All' with new note -> '[s-61] :detected:person(76%) Motion: All']

11/20/21 15:46:49.941067 zmesdetect_m6[2284] DBG1 zm_detect:1606->[perf:zmes:FINAL: 'Monitor': office (6)->'Event': 228-->'Frame ID':61 [PAST event] [total:1.557539] [detection:1.253375] [after core detection: 0.053279] ]

11/20/21 15:46:49.942539 zmesdetect_m6[2284] DBG1 zm_detect:1607->[ZM Log: Closing all log handlers NOW]
root@UNRAID:/var/lib/zmeventnotification# 
seems it's trying to connect back on 8080, but inside docker i use 80


edit

ok i turned off gotify script (whhich is throwing an error) and now no errors, but no face detection

Code: Select all

root@UNRAID:/var/lib/zmeventnotification# sudo -u www-data /var/lib/zmeventnotification/bin/zm_detect.py --config /etc/zm/objectconfig.yml --debug --eventid 228
encrypted_data = {'gAAAAABhmOFPLIesNRcXVZBC0GkCgRm15ReCJL2CBDgq4gTg--7sBeC1YG1dVjOs8_9c1F2mNRc_S3Omr33KbR2oEq0xp4Ep6g==': 'gAAAAABhmOFPCzHljEVO7akfIrAOiJcwz_i09074b2PtDq6gTzeuOUUDDzXQWdqPnpC8kIe72jMDy-QDXRV5jSjSKQhy75TeLw==', 'gAAAAABhmOFPcf8NuWYec0AxUfklve5aVGcQJH-kX6_gxdtpWME4_7SncRf3ZLMMZzVotUwH5cC0_5JWStJNPlcpjR4tejHsng==': 'gAAAAABhmOFPhWRqXB6X_geMzQaHAwjh5a5RZdNJAj09-YK4vg-jEqqGBzexsasgQaVuxii-40kG-2mmtmoxzjZSFrE23X9V8g==', 'gAAAAABhmOFP2yccnvIJqiTwdmYjFgEslSdvKLj13vF9G2YJulbUEq8u7mu6cyFe1Jt9VmIyucEUD1Kj0-8Mh_JE9SQO8dW_AcNiWLI6O-UWUV6sm6CSzWo=': 'gAAA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ZvZhWTAZiVJ', 'gAAAAABhmOFPMoE1jPHsNTjZyZkts11pbQ1D661ruKhIL_0rh8DcDZTPjQXnsAPmOd0ADUwFyDqnYP1KEVmaai7whoNW8wVgiA==': 'gAAAAABhmOFPn6cD3gqaxmJAyx7mA98eTul0LyheaZVeFE-xd-RU9qMFEtBCz8ra0MzZ8RWkoo68WLqUK5vOR0qMvPtCWzgbEsski3kArA9vuNDJ0K8fY9c=', 'name': 'mlapi_one'}

11/20/21 15:51:43.034626 zmesdetect_m6[5373] DBG1 new_yaml.py:242->[config:init: the supplied config file exists -> '/etc/zm/objectconfig.yml']

11/20/21 15:51:43.108547 zmesdetect_m6[5373] DBG1 new_yaml.py:265->[config::init: default configuration built (no secrets or substitution vars replaced, yet!)]

11/20/21 15:51:43.10934 zmesdetect_m6[5373] DBG1 new_yaml.py:170->[config:zmes:proc: 39 built in default keys added to the 'base' config -> ['force_mpd', 'same_model_high_conf', 'skip_mons', 'force_live', 'sanitize_str', 'version', 'basic_user', 'basic_password', 'image_path', 'max_detection_size', 'delete_after_analyze', 'write_debug_image', 'write_image_to_zm', 'hass_enabled', 'hass_people', 'hass_notify', 'hass_cooldown', 'push_err_device', 'push_jpg', 'push_jpg_key', 'push_gif', 'push_gif_key', 'push_debug_device', 'push_cooldown', 'mqtt_topic', 'mqtt_broker', 'mqtt_port', 'tls_cert', 'tls_key', 'fp16_target', 'alpr_api_type', 'alpr_url', 'openalpr_recognize_vehicle', 'openalpr_country', 'openalpr_state', 'openalpr_min_confidence', 'smart_fs_thresh', 'frame_strategy', 'same_model_sequence_strategy']]

11/20/21 15:51:43.109639 zmesdetect_m6[5373] DBG1 new_yaml.py:114->[config:zmes:proc: substituting '{{variables}}' for the 'base' config keys]

11/20/21 15:51:43.110468 zmesdetect_m6[5373] DBG1 new_yaml.py:136->[config:zmes: successfully replaced 3 default sub vars in the base config -> ['coral_models', 'base_data_path', 'yolo4_models']]

11/20/21 15:51:43.110833 zmesdetect_m6[5373] DBG1 new_yaml.py:285->[config:zmes: the configured secrets file exists and is a file -> '/etc/zm/zm_secrets.yml']

11/20/21 15:51:43.111165 zmesdetect_m6[5373] DBG1 new_yaml.py:291->[config:zmes: starting '{[secrets]}' substitution]

11/20/21 15:51:43.117062 zmesdetect_m6[5373] DBG1 new_yaml.py:324->[config:zmes: successfully replaced 17 secrets in the base config -> ['HA_SERVER', 'PUSHOVER_USER_KEY', 'PUSHOVER_ERR_TOKEN', 'HA_TOKEN', 'PLATEREC_ALPR_KEY', 'ZM_API_PORTAL', 'MQTT_PASSWORD', 'ML_USER', 'MQTT_USERNAME', 'ZM_PORTAL', 'ZM_PASSWORD', 'mlapi_one_key', 'PUSHOVER_APP_TOKEN', 'PUSHOVER_PASS', 'ML_PASSWORD', 'PUSHOVER_USER', 'ZM_USER']]

11/20/21 15:51:43.117415 zmesdetect_m6[5373] DBG1 new_yaml.py:329->[config:zmes: there are 2 secrets configured that have no substitution candidates in the base config or the secrets file -> ['AWS_SECRET_ACCESS_KEY', 'AWS_ACCESS_KEY_ID']]

11/20/21 15:51:43.118991 zmesdetect_m6[5373] DBG1 new_yaml.py:358->[config:zmes: starting '{{variable}}' substitution]

11/20/21 15:51:43.123387 zmesdetect_m6[5373] DBG1 new_yaml.py:375->[config:zmes: successfully replaced 51 sub vars in the base config -> ['tpu_efficientdet_lite3', 'yolo4_object_processor', 'match_past_detections', 'face_detection_pattern', 'frame_set', 'tpu_object_labels', 'face_detection_framework', 'smart_fps_thresh', 'disable_locks', 'tpu_max_lock_wait', 'known_images_path', 'yolo4_object_framework', 'alpr_key', 'openalpr_cmdline_binary', 'openalpr_cmdline_params', 'platerec_stats', 'cpu_max_processes', 'yolo4_object_labels', 'tpu_object_framework', 'object_detection_pattern', 'face_recog_dist_threshold', 'frame_strategy', 'tpu_object_weights_mobiledet', 'face_model', 'tpu_object_weights_mobilenetv2', 'gpu_max_processes', 'tpu_min_confidence', 'model_sequence', 'same_model_sequence_strategy', 'gpu_max_lock_wait', 'face_num_jitters', 'save_unknown_faces', 'face_upsample_times', 'past_det_max_diff_area', 'unknown_images_path', 'platerec_min_score', 'cpu_max_lock_wait', 'show_models', 'save_unknown_faces_leeway_pixels', 'platerec_min_dscore', 'tpu_tf2_mobilenetv2', 'contained_area', 'object_min_confidence', 'max_detection_size', 'yolo4_object_config', 'alpr_detection_pattern', 'openalpr_cmdline_min_confidence', 'yolo4_object_weights', 'tpu_face_weights_mobilenetv2', 'tpu_max_processes', 'face_train_model']]

11/20/21 15:51:43.124686 zmesdetect_m6[5373] DBG1 new_yaml.py:187->[config:zmes:proc: Base config has been built, all properly configured {[secrets]} and {{vars}} have been replaced! Remember you must manually build per monitor overrode configurations]

11/20/21 15:51:43.12502 zmesdetect_m6[5373] DBG1 zm_detect.py:540->[perf:zmes: building the intial config took 0.090411 ]

11/20/21 15:51:43.131009 zmesdetect_m6[5373] DBG1 new_yaml.py:762->[zmes:api create: building ZM API Session]

11/20/21 15:51:43.136526 zmesdetect_m6[5373] DBG1 api.py:114->[api: SSL certificate verification disabled (encryption enabled, vulnerable to MITM attacks)]

11/20/21 15:51:43.137172 zmesdetect_m6[5373] DBG1 api.py:283->[api: no token found, trying user/pass for login]

11/20/21 15:51:43.197128 zmesdetect_m6[5373] DBG1 api.py:320->[api: detected API ver 2.0+, using token system]

11/20/21 15:51:43.1976 zmesdetect_m6[5373] DBG1 api.py:335->[api: access token expires on: 2021-11-20 17:51:43.197584 (7200s)]

11/20/21 15:51:43.19797 zmesdetect_m6[5373] DBG1 api.py:347->[api: refresh token expires on: 2021-11-21 15:51:43.197961 (86400s)]

11/20/21 15:51:43.220269 zmesdetect_m6[5373] DBG1 new_yaml.py:795->[zmes:api create: ZM API created]

11/20/21 15:51:43.452168 zmesdetect_m6[5373] DBG1 ZMLog:336->[------|  FORKED NEO --- app->Hooks: 7.0.3 - pyzm: 1.0.3 - ES: 7.0.3 - OpenCV:4.5.4 |------]

11/20/21 15:51:43.45252 zmesdetect_m6[5373] DBG1 ZMLog:336->[zmes: Setting up signal handlers for log 'rotation' and log 'interrupt']

11/20/21 15:51:43.293856 zmesdetect_m6[5373] DBG1 zm_detect.py:652->[zmes: this is a 'PAST' (debugging?) event!]

11/20/21 15:51:43.453454 zmesdetect_m6[5373] DBG1 ZMLog:336->[|----------= Encrypted Route Name: 'mlapi_one' | Gateway URL: 'http://192.168.1.100:5002/api/v1' | Weight: 0 =----------|]

11/20/21 15:51:43.295622 zmesdetect_m6[5373] DBG1 zm_detect.py:103->[zmes:mlapi:login: No need to login, access token is valid for 2245.4626722335815 sec]

11/20/21 15:51:43.395976 zmesdetect_m6[5373] DBG1 zm_detect.py:318->[
** Gateway URL: 'http://192.168.1.100:5002/api/v1/detect/object?type=object' using auth_header={'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGc......'} 
**** params={'delete': True, 'response_format': 'zm_detect'}
****** JSON: stream: 228 - mid: 6 - reason: None - stream options: {'frame_strategy': 'first', 'frame_set': 'snapshot, alarm, snapshot', 'contig_frames_before_error': 2, 'delay_between_attempts': 2.143256, 'max_attempts': 3, 'delay_between_snapshots': 1, 'smart_fps_thresh': '5', 'save_frames': 'no', 'save_frames_dir': None, 'PAST_EVENT': True} - files: {}
]

11/20/21 15:51:43.455136 zmesdetect_m6[5373] DBG1 ZMLog:336->[Connected to ZoneMinder Logging system with user 'www-data' -> '/var/log/zm/zmesdetect_m6.log']

11/20/21 15:51:44.483415 zmesdetect_m6[5373] DBG1 zm_detect:383->[zmes:mlapi: parsed JSON detection data in multipart response]

11/20/21 15:51:44.483755 zmesdetect_m6[5373] DBG1 zm_detect:379->[zmes:mlapi: parsed the matched image from bytes to a jpeg encoded array in multipart response]

11/20/21 15:51:44.496525 zmesdetect_m6[5373] DBG1 zm_detect:763->[perf:zmes:mlapi: Monitor: office (6)->'Event': 228 mlapi detection took: 1.200536]

11/20/21 15:51:44.496876 zmesdetect_m6[5373] DBG1 pyzm_utils:1336->['success'->  True  ]

11/20/21 15:51:44.497129 zmesdetect_m6[5373] DBG1 pyzm_utils:1297->[--- --- ---]
11/20/21 15:51:44.497367 zmesdetect_m6[5373] DBG1 pyzm_utils:1298->['matched_data'->  labels-->['person']  ]
11/20/21 15:51:44.497603 zmesdetect_m6[5373] DBG1 pyzm_utils:1298->['matched_data'->  model_names-->['coral']  ]
11/20/21 15:51:44.497839 zmesdetect_m6[5373] DBG1 pyzm_utils:1298->['matched_data'->  confidences-->[0.72265625]  ]
11/20/21 15:51:44.498082 zmesdetect_m6[5373] DBG1 pyzm_utils:1298->['matched_data'->  frame_id-->s-9  ]
11/20/21 15:51:44.49832 zmesdetect_m6[5373] DBG1 pyzm_utils:1298->['matched_data'->  type-->['object']  ]
11/20/21 15:51:44.498555 zmesdetect_m6[5373] DBG1 pyzm_utils:1298->['matched_data'->  boxes-->[[358, 252, 1792, 1058]]  ]
11/20/21 15:51:44.498791 zmesdetect_m6[5373] DBG1 pyzm_utils:1298->['matched_data'->  image_dimensions-->{'original': [1080, 1920], 'resized': None}  ]
11/20/21 15:51:44.49904 zmesdetect_m6[5373] DBG1 pyzm_utils:1298->['matched_data'->  polygons-->[{'name': 'full_image', 'value': [[0, 0], [1920, 0], [1920, 1080], [0, 1080]], 'pattern': None}]  ]
11/20/21 15:51:44.499279 zmesdetect_m6[5373] DBG1 pyzm_utils:1298->['matched_data'->  error_boxes-->[[1549, 871, 1914, 1073]]  ]
11/20/21 15:51:44.499511 zmesdetect_m6[5373] DBG1 pyzm_utils:1298->['matched_data'->  image--><uint-8 encoded jpg>  ]

11/20/21 15:51:44.499559 zmesdetect_m6[5373] INF zm_detect:862->[zmes:prediction: '[s-9] person(72%)']

11/20/21 15:51:44.499981 zmesdetect_m6[5373] DBG1 zm_detect:864->[zmes:prediction:JSON: {"frame_id": "9", "labels": ["person"], "confidences": [0.72265625], "boxes": [[358, 252, 1792, 1058]], "image_dimensions": {"original": [1080, 1920], "resized": null}}]

11/20/21 15:51:44.501729 zmesdetect_m6[5373] DBG1 zm_detect:1223->[zmes: writing objects.json and objdetect.jpg to '/var/cache/zoneminder/events/6/2021-11-20/228']

11/20/21 15:51:44.509682 zmesdetect_m6[5373] DBG2 zm_detect:1395->[api:make_req: 'put'->http://192.168.1.100:8088/zm/api/events/228.json payload={'Event[Notes]': '[s-9] :detected:person(72%) Motion: All'} query={'token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNjM3NDA5MTAzLCJleHAiOjE2Mzc0MTYzMDMsInVzZXIiOiJqdWFuIiwidHlwZSI6ImFjY2VzcyJ9.A8mrIKCPKEIpiEBM74AM8auHEx-8ouePomg7_tWp-Ns...'}]

11/20/21 15:51:44.518454 zmesdetect_m6[5373] DBG1 zm_detect:1406->[zmes: replaced old note -> '[s-24] :detected:person(77%) Motion: All' with new note -> '[s-9] :detected:person(72%) Motion: All']

11/20/21 15:51:44.518922 zmesdetect_m6[5373] DBG1 zm_detect:1606->[perf:zmes:FINAL: 'Monitor': office (6)->'Event': 228-->'Frame ID':9 [PAST event] [total:1.484908] [detection:1.200536] [after core detection: 0.021877] ]

11/20/21 15:51:44.519441 zmesdetect_m6[5373] DBG1 zm_detect:1607->[ZM Log: Closing all log handlers NOW]
root@UNRAID:/var/lib/zmeventnotification# 
tsp84
Posts: 227
Joined: Thu Dec 24, 2020 4:04 am

Re: neo-ZMES - Public Beta

Post by tsp84 »

I think I found the issue (for face detection, IDK what's going on with gotify there), I just pushed. Should only be the pyzm package (face_dlib.py file) that needs to be reinstalled.

Code: Select all

11/20/21 04:54:41.697421 zm_mlapi[2128] DBG1 face_dlib:176 [|---------- D-lib Face Detection and Recognition (input image: 800*450) ----------|]
  11/20/21 04:54:41.700137 zm_mlapi[2128] DBG2 face_dlib:110 [dlib:face:portalock: Waiting for 'pyzm_uid1000_GPU_lock']
  11/20/21 04:54:41.703091 zm_mlapi[2128] DBG2 face_dlib:112 [dlib:face:portalock: acquired -> 'pyzm_uid1000_GPU_lock']
  11/20/21 04:54:41.797807 zm_mlapi[2128] DBG1 face_dlib:200 [perf:face:gpu: finding face locations took 97.54 ms]
  11/20/21 04:54:41.800692 zm_mlapi[2128] DBG2 face_dlib:127 [dlib:face:portalock: released -> 'pyzm_uid1000_GPU_lock']
  11/20/21 04:54:41.80324 zm_mlapi[2128] DBG1 face_dlib:212 [perf:face:gpu: computing face recognition distances took 2.76 ms]
  11/20/21 04:54:41.805518 zm_mlapi[2128] DBG2 detect_sequence:1098 [detect: model: 'face' seq: 'DLib::Face Detection/Recognition' found 0 detections -> ]
  11/20/21 04:54:41.807757 zm_mlapi[2128] DBG2 detect_sequence:1395 [detect: no 'face' matches at all in frame: a-98]
Last edited by tsp84 on Sat Nov 20, 2021 12:03 pm, edited 1 time in total.
juan11perez
Posts: 64
Joined: Tue Apr 27, 2021 3:41 am

Re: neo-ZMES - Public Beta

Post by juan11perez »

stll error at the end

Code: Select all

root@UNRAID:/var/lib/zmeventnotification# sudo -u www-data /var/lib/zmeventnotification/bin/zm_detect.py --config /etc/zm/objectconfig.yml --debug --eventid 314
encrypted_data = {'gAAAAABhmOO-rh5ZSDmeG_Eu7AhoDpakEVrsli0_vLR4K3N_WpZK5Zl6wGn6lfRdnG8hvMzt8AN-pyoSzI4CA70rC-A134kyjg==': 'gAAAAABhmOO-JbrWwf98KtDy5VmcncjowbMDe5bCFx5CbQDekD9T_eKeoGQiPTGItHJsS7Fq1AV-dDHKSc_hesZMxJS41Wsidw==', 'gAAAAABhmOO-WQQ3CM82R2Y24THxUIyoEI7GOn4O70qPe03EuF8rG_ueGdFWNUFk1qWzvqaemgUAtfwj3Dl-ZzNT7dtIE5T3gw==': 'gAAAAABhmOO-Tv6AooKmVZKwi_auOZeaIYz3MZCgSZ6oC-_WAxYyiGjTcJuUTxJcjxhky1Qlfn03vemdN1hyXdN0TRc9Z9VkyA==', 'gAAAAABhmOO-sGKnHBMHABbcitYNuxIBg6QCnOV7ohwe4h7SNLkeSxAqW_ltU0MWtGaU00PolhiphttBWg6vNRydauM2Sf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4YKiDXhc4sliX1_sCckTJdI3Cogh8_It_n2kEQ5Bi_LLPG7x9eCoJJ4HSt8', 'gAAAAABhmOO-rnODWm70eyN7EzwfejTJ68gm6K1rRoq6lrD8AuQGkfq86MNbRT01Vthe0ErPdS7idXWN0phGsUgJ6d1j48UzUQ==': 'gAAAAABhmOO-hfFL6OfBEU3jV5uWqzQqlMoiMX-KbeP6HkqCQzPVMsf9alwRSobWCR5PSgwRGDhwZHjGFENH-7lzLTPZWXZxHH7MOg7VDTaJrrKm9ZrZFo0=', 'name': 'mlapi_one'}

11/20/21 16:02:06.487992 zmesdetect_m6[3234] DBG1 new_yaml.py:242->[config:init: the supplied config file exists -> '/etc/zm/objectconfig.yml']

11/20/21 16:02:06.562546 zmesdetect_m6[3234] DBG1 new_yaml.py:265->[config::init: default configuration built (no secrets or substitution vars replaced, yet!)]

11/20/21 16:02:06.563254 zmesdetect_m6[3234] DBG1 new_yaml.py:170->[config:zmes:proc: 39 built in default keys added to the 'base' config -> ['force_mpd', 'same_model_high_conf', 'skip_mons', 'force_live', 'sanitize_str', 'version', 'basic_user', 'basic_password', 'image_path', 'max_detection_size', 'delete_after_analyze', 'write_debug_image', 'write_image_to_zm', 'hass_enabled', 'hass_people', 'hass_notify', 'hass_cooldown', 'push_err_device', 'push_jpg', 'push_jpg_key', 'push_gif', 'push_gif_key', 'push_debug_device', 'push_cooldown', 'mqtt_topic', 'mqtt_broker', 'mqtt_port', 'tls_cert', 'tls_key', 'fp16_target', 'alpr_api_type', 'alpr_url', 'openalpr_recognize_vehicle', 'openalpr_country', 'openalpr_state', 'openalpr_min_confidence', 'smart_fs_thresh', 'frame_strategy', 'same_model_sequence_strategy']]

11/20/21 16:02:06.56355 zmesdetect_m6[3234] DBG1 new_yaml.py:114->[config:zmes:proc: substituting '{{variables}}' for the 'base' config keys]

11/20/21 16:02:06.5643 zmesdetect_m6[3234] DBG1 new_yaml.py:136->[config:zmes: successfully replaced 3 default sub vars in the base config -> ['coral_models', 'yolo4_models', 'base_data_path']]

11/20/21 16:02:06.564663 zmesdetect_m6[3234] DBG1 new_yaml.py:285->[config:zmes: the configured secrets file exists and is a file -> '/etc/zm/zm_secrets.yml']

11/20/21 16:02:06.564996 zmesdetect_m6[3234] DBG1 new_yaml.py:291->[config:zmes: starting '{[secrets]}' substitution]

11/20/21 16:02:06.570798 zmesdetect_m6[3234] DBG1 new_yaml.py:324->[config:zmes: successfully replaced 17 secrets in the base config -> ['PUSHOVER_PASS', 'PUSHOVER_USER_KEY', 'ZM_PORTAL', 'ZM_USER', 'PUSHOVER_ERR_TOKEN', 'ML_PASSWORD', 'mlapi_one_key', 'PUSHOVER_APP_TOKEN', 'PUSHOVER_USER', 'HA_SERVER', 'ZM_API_PORTAL', 'MQTT_PASSWORD', 'ZM_PASSWORD', 'HA_TOKEN', 'MQTT_USERNAME', 'PLATEREC_ALPR_KEY', 'ML_USER']]

11/20/21 16:02:06.571151 zmesdetect_m6[3234] DBG1 new_yaml.py:329->[config:zmes: there are 2 secrets configured that have no substitution candidates in the base config or the secrets file -> ['AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY']]

11/20/21 16:02:06.572609 zmesdetect_m6[3234] DBG1 new_yaml.py:358->[config:zmes: starting '{{variable}}' substitution]

11/20/21 16:02:06.576985 zmesdetect_m6[3234] DBG1 new_yaml.py:375->[config:zmes: successfully replaced 51 sub vars in the base config -> ['platerec_min_score', 'platerec_stats', 'tpu_object_labels', 'yolo4_object_framework', 'tpu_max_lock_wait', 'gpu_max_lock_wait', 'tpu_object_weights_mobilenetv2', 'known_images_path', 'yolo4_object_weights', 'face_train_model', 'openalpr_cmdline_min_confidence', 'tpu_min_confidence', 'disable_locks', 'show_models', 'same_model_sequence_strategy', 'tpu_object_framework', 'tpu_tf2_mobilenetv2', 'max_detection_size', 'platerec_min_dscore', 'frame_strategy', 'save_unknown_faces', 'cpu_max_lock_wait', 'match_past_detections', 'contained_area', 'face_num_jitters', 'face_upsample_times', 'face_recog_dist_threshold', 'tpu_face_weights_mobilenetv2', 'frame_set', 'tpu_object_weights_mobiledet', 'tpu_efficientdet_lite3', 'face_detection_framework', 'alpr_detection_pattern', 'face_model', 'object_min_confidence', 'tpu_max_processes', 'alpr_key', 'past_det_max_diff_area', 'openalpr_cmdline_params', 'face_detection_pattern', 'smart_fps_thresh', 'object_detection_pattern', 'unknown_images_path', 'openalpr_cmdline_binary', 'model_sequence', 'save_unknown_faces_leeway_pixels', 'cpu_max_processes', 'yolo4_object_labels', 'yolo4_object_config', 'gpu_max_processes', 'yolo4_object_processor']]

11/20/21 16:02:06.578289 zmesdetect_m6[3234] DBG1 new_yaml.py:187->[config:zmes:proc: Base config has been built, all properly configured {[secrets]} and {{vars}} have been replaced! Remember you must manually build per monitor overrode configurations]

11/20/21 16:02:06.578595 zmesdetect_m6[3234] DBG1 zm_detect.py:540->[perf:zmes: building the intial config took 0.090621 ]

11/20/21 16:02:06.579039 zmesdetect_m6[3234] DBG1 new_yaml.py:762->[zmes:api create: building ZM API Session]

11/20/21 16:02:06.583192 zmesdetect_m6[3234] DBG1 api.py:114->[api: SSL certificate verification disabled (encryption enabled, vulnerable to MITM attacks)]

11/20/21 16:02:06.58383 zmesdetect_m6[3234] DBG1 api.py:283->[api: no token found, trying user/pass for login]

11/20/21 16:02:06.642574 zmesdetect_m6[3234] DBG1 api.py:320->[api: detected API ver 2.0+, using token system]

11/20/21 16:02:06.64312 zmesdetect_m6[3234] DBG1 api.py:335->[api: access token expires on: 2021-11-20 18:02:06.643089 (7200s)]

11/20/21 16:02:06.643472 zmesdetect_m6[3234] DBG1 api.py:347->[api: refresh token expires on: 2021-11-21 16:02:06.643463 (86400s)]

11/20/21 16:02:06.662292 zmesdetect_m6[3234] DBG1 new_yaml.py:795->[zmes:api create: ZM API created]

11/20/21 16:02:06.90512 zmesdetect_m6[3234] DBG1 ZMLog:336->[------|  FORKED NEO --- app->Hooks: 7.0.3 - pyzm: 1.0.3 - ES: 7.0.3 - OpenCV:4.5.4 |------]

11/20/21 16:02:06.905647 zmesdetect_m6[3234] DBG1 ZMLog:336->[zmes: Setting up signal handlers for log 'rotation' and log 'interrupt']

11/20/21 16:02:06.732113 zmesdetect_m6[3234] DBG1 zm_detect.py:652->[zmes: this is a 'PAST' (debugging?) event!]

11/20/21 16:02:06.907035 zmesdetect_m6[3234] DBG1 ZMLog:336->[|----------= Encrypted Route Name: 'mlapi_one' | Gateway URL: 'http://192.168.1.100:5002/api/v1' | Weight: 0 =----------|]

11/20/21 16:02:06.73386 zmesdetect_m6[3234] DBG1 zm_detect.py:103->[zmes:mlapi:login: No need to login, access token is valid for 2868.900910615921 sec]

11/20/21 16:02:06.831535 zmesdetect_m6[3234] DBG1 zm_detect.py:318->[
** Gateway URL: 'http://192.168.1.100:5002/api/v1/detect/object?type=object' using auth_header={'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGc......'} 
**** params={'delete': True, 'response_format': 'zm_detect'}
****** JSON: stream: 314 - mid: 6 - reason: None - stream options: {'frame_strategy': 'first', 'frame_set': 'snapshot, alarm, snapshot', 'contig_frames_before_error': 2, 'delay_between_attempts': 2.143256, 'max_attempts': 3, 'delay_between_snapshots': 1, 'smart_fps_thresh': '5', 'save_frames': 'no', 'save_frames_dir': None, 'PAST_EVENT': True} - files: {}
]

11/20/21 16:02:06.90909 zmesdetect_m6[3234] DBG1 ZMLog:336->[Connected to ZoneMinder Logging system with user 'www-data' -> '/var/log/zm/zmesdetect_m6.log']

11/20/21 16:02:08.450549 zmesdetect_m6[3234] DBG1 zm_detect:383->[zmes:mlapi: parsed JSON detection data in multipart response]

11/20/21 16:02:08.450984 zmesdetect_m6[3234] DBG1 zm_detect:379->[zmes:mlapi: parsed the matched image from bytes to a jpeg encoded array in multipart response]

11/20/21 16:02:08.470895 zmesdetect_m6[3234] DBG1 zm_detect:763->[perf:zmes:mlapi: Monitor: office (6)->'Event': 314 mlapi detection took: 1.734143]

11/20/21 16:02:08.471545 zmesdetect_m6[3234] DBG1 pyzm_utils:1336->['success'->  True  ]

11/20/21 16:02:08.4719 zmesdetect_m6[3234] DBG1 pyzm_utils:1297->[--- --- ---]
11/20/21 16:02:08.472252 zmesdetect_m6[3234] DBG1 pyzm_utils:1298->['matched_data'->  labels-->['person']  ]
11/20/21 16:02:08.472582 zmesdetect_m6[3234] DBG1 pyzm_utils:1298->['matched_data'->  model_names-->['coral']  ]
11/20/21 16:02:08.472929 zmesdetect_m6[3234] DBG1 pyzm_utils:1298->['matched_data'->  confidences-->[0.7734375]  ]
11/20/21 16:02:08.473263 zmesdetect_m6[3234] DBG1 pyzm_utils:1298->['matched_data'->  frame_id-->s-10  ]
11/20/21 16:02:08.473598 zmesdetect_m6[3234] DBG1 pyzm_utils:1298->['matched_data'->  type-->['object']  ]
11/20/21 16:02:08.473939 zmesdetect_m6[3234] DBG1 pyzm_utils:1298->['matched_data'->  boxes-->[[474, 360, 1632, 1069]]  ]
11/20/21 16:02:08.474276 zmesdetect_m6[3234] DBG1 pyzm_utils:1298->['matched_data'->  image_dimensions-->{'original': [1080, 1920], 'resized': None}  ]
11/20/21 16:02:08.474613 zmesdetect_m6[3234] DBG1 pyzm_utils:1298->['matched_data'->  polygons-->[{'name': 'full_image', 'value': [[0, 0], [1920, 0], [1920, 1080], [0, 1080]], 'pattern': None}]  ]
11/20/21 16:02:08.474955 zmesdetect_m6[3234] DBG1 pyzm_utils:1298->['matched_data'->  error_boxes-->[[1549, 875, 1914, 1076]]  ]
11/20/21 16:02:08.475289 zmesdetect_m6[3234] DBG1 pyzm_utils:1298->['matched_data'->  image--><uint-8 encoded jpg>  ]

11/20/21 16:02:08.475373 zmesdetect_m6[3234] INF zm_detect:862->[zmes:prediction: '[s-10] person(77%)']

11/20/21 16:02:08.475993 zmesdetect_m6[3234] DBG1 zm_detect:864->[zmes:prediction:JSON: {"frame_id": "10", "labels": ["person"], "confidences": [0.7734375], "boxes": [[474, 360, 1632, 1069]], "image_dimensions": {"original": [1080, 1920], "resized": null}}]

11/20/21 16:02:08.479879 zmesdetect_m6[3234] DBG1 zm_detect:1223->[zmes: writing objects.json and objdetect.jpg to '/var/cache/zoneminder/events/6/2021-11-20/314']

11/20/21 16:02:08.498942 zmesdetect_m6[3234] ERR zm_detect:1258->[zmes: Error trying to obtain push_user: 'view_only_username' token for external push script, token will not be provided.
401 Client Error: Unauthorized for url: http://192.168.1.100:8088/zm/api/host/login.json]

11/20/21 16:02:09.568185 zmesdetect_m6[3234] DBG1 zm_detect:1331->[zmes: custom push script returned SUCCESS]

11/20/21 16:02:09.568565 zmesdetect_m6[3234] DBG2 zm_detect:1395->[api:make_req: 'put'->http://192.168.1.100:8088/zm/api/events/314.json payload={'Event[Notes]': '[s-10] :detected:person(77%) Motion: All'} query={'token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNjM3NDA5NzI2LCJleHAiOjE2Mzc0MTY5MjYsInVzZXIiOiJqdWFuIiwidHlwZSI6ImFjY2VzcyJ9.RJsXcZCUkyPPTYEs5XdJCTY9UBoigfgcTtJtwsUrUGU...'}]

11/20/21 16:02:09.578454 zmesdetect_m6[3234] DBG1 zm_detect:1406->[zmes: replaced old note -> '[s-17] :detected:person(74%) Motion: All' with new note -> '[s-10] :detected:person(77%) Motion: All']

11/20/21 16:02:09.579054 zmesdetect_m6[3234] DBG1 zm_detect:1606->[perf:zmes:FINAL: 'Monitor': office (6)->'Event': 314-->'Frame ID':10 [PAST event] [total:3.091593] [detection:1.734143] [after core detection: 1.107337] ]

11/20/21 16:02:09.579868 zmesdetect_m6[3234] DBG1 zm_detect:1607->[ZM Log: Closing all log handlers NOW]
root@UNRAID:/var/lib/zmeventnotification# 

this part

Code: Select all

1/20/21 16:02:08.498942 zmesdetect_m6[3234] ERR zm_detect:1258->[zmes: Error trying to obtain push_user: 'view_only_username' token for external push script, token will not be provided.
401 Client Error: Unauthorized for url: http://192.168.1.100:8088/zm/api/host/login.json]
tsp84
Posts: 227
Joined: Thu Dec 24, 2020 4:04 am

Re: neo-ZMES - Public Beta

Post by tsp84 »

[zmes: Error trying to obtain push_user: 'view_only_username' token for external push script, token will not be provided.
401 Client Error: Unauthorized for url: http://192.168.1.100:8088/zm/api/host/login.json
That is either a username or password error. ZoneMinder is replying saying that the username 'view_only_username' is Unauthorized, Either bad username, bad password, or you need to adjust the privs in the API config within ZM WEB GUI options.

This is how I have my view only user set up
view_only_privs.png
view_only_privs.png (152.52 KiB) Viewed 149602 times
juan11perez
Posts: 64
Joined: Tue Apr 27, 2021 3:41 am

Re: neo-ZMES - Public Beta

Post by juan11perez »

I've given that user full privileges (up to edit where applicable). So it should get the token
Attachments
Screenshot_20211120_161820.png
Screenshot_20211120_161820.png (38.99 KiB) Viewed 149602 times
Post Reply