# Basic scope for NUC Alerter from lib.redis_bus import RedisBus from lib.telegram import Telegram, MultiTelegram from lib.mysql_driver.mysql_engine import MySQLEngine from lib.query_executor.query_executor import QueryDictExecutor from lib.yaml_config import YamlConfig as Config from lib.basic_logger import log # Create global instance of config config = Config('/etc/spyspace/mvid_conf.yaml') # Create global instance of basic transport redis_host = config.find('redis_host') proxy = config.find('proxy') telebot_black_token = config.find('telebot_black_token') telebot_white_token = config.find('telebot_white_token') telebot_password = config.find('telebot_password') db_host = config.find('mysql/mysql_host') db_user = config.find('mysql/mysql_user') db_password = config.find('mysql/mysql_passwd') db_database = config.find('mysql/mysql_database') bus = RedisBus(host=redis_host) messenger = MultiTelegram(proxy=proxy, blacklist=telebot_black_token, whitelist=telebot_white_token) executor = QueryDictExecutor(MySQLEngine, db_host, user=db_user, password=db_password, database=db_database)
# Basic scope for NUC from lib.yaml_config import YamlConfig as Config from lib.hnsw_features_set import HNSWFeaturesSet from lib.open_vino_handler import OpenVinoHandler from lib.open_vino_model import FaceDetectorModel, FaceReidModel, LandmarksDetector from lib.mysql_driver.mysql_engine import MySQLEngine from lib.query_executor.query_executor import QueryDictExecutor from lib.redis_bus import RedisBus from lib.ram_bus import RamBus from lib.basic_logger import log # Create global instance of config config = Config('/etc/spyspace/mvid_conf.yaml') # Create global instance of basic transport host = config.find('redis_host') queue_size = config.find('redis_queue_size') db_host = config.find('mysql/mysql_host') db_user = config.find('mysql/mysql_user') db_password = config.find('mysql/mysql_passwd') db_database = config.find('mysql/mysql_database') ann_path = config.find('ann_path') ann_max_elements = config.find('ann_max_elements') vino_mode = config.find('vino_mode') cpu_extension = config.find('cpu_extension') detector_model = config.find('intel_fd_model') landmarks_model = config.find('intel_lm_model')
from lib.basic_logger import log from lib.yaml_config import YamlConfig as Config from lib.redis_bus import RedisBus #NB! Import before MySQLEngine to avoid SegmentationFault from lib.query_executor.query_executor import QueryDictExecutor from lib.mysql_driver.mysql_engine import MySQLEngine from lib.get_face_hash import Infer from lib.hnsw_features_set import HNSWFeaturesSet from lib.queries.mysql_queries import mysql_queries as query from mysql.connector.errors import ProgrammingError, InterfaceError, OperationalError, IntegrityError # Create global instance of config project_dir = "/opt/projects/mvid" config = Config('/etc/spyspace/mvid_conf.yaml') # Create global instance of basic transport bus = RedisBus(host=config.find('redis_host')) executor = QueryDictExecutor(MySQLEngine, config.find('mysql_host'), user=config.find('mysql_user'), password=config.find('mysql_passwd'), database="mvideo") features_set = HNSWFeaturesSet(config.find('ann_path'), config.find('ann_max_elements')) infer = Infer()
# Basic scope for NUC from lib.yaml_config import YamlConfig as Config from lib.redis_bus import RedisBus from lib.ping import Ping from lib.mysql_driver.mysql_engine import MySQLEngine from lib.query_executor.query_executor import QueryDictExecutor from lib.queries.mysql_queries import mysql_queries as queries from lib.basic_logger import log # Create global instance of config config = Config('/etc/spyspace/mvid_conf.yaml') db_host = config.find('mysql/mysql_host') db_user = config.find('mysql/mysql_user') db_password = config.find('mysql/mysql_passwd') db_database = config.find('mysql/mysql_database') # Create global instance of basic transport bus = RedisBus(host=config.find('redis_host')) bus2 = RedisBus(host=config.find('redis_host2')) ping = Ping(bus, period=18000) executor = QueryDictExecutor(MySQLEngine, db_host, user=db_user, password=db_password) executor.execute_query(queries, 'use_mvideo_db')
# Basic scope for test from lib.yaml_config import YamlConfig as Config from lib.hnsw_features_set import HNSWFeaturesSet from lib.procrustes_face_aligner import align_face from lib.open_vino_model import FaceDetectorModel, FaceReidModel, LandmarksDetector from lib.mysql_driver.mysql_engine import MySQLEngine from lib.query_executor.query_executor import QueryDictExecutor from lib.redis_bus import RedisBus from lib.telegram import Telegram from lib.basic_logger import log # Create global instance of config project_dir = "/opt/projects/mvid" # project_dir = "/home/tech/PycharmProjects/mvid" config = Config(project_dir + '/scope/data/test_conf.yaml') # Create global instance of basic transport bus = RedisBus() redis = RedisBus() executor = QueryDictExecutor(MySQLEngine, config.find('mysql_host'), user=config.find('mysql_user'), password=config.find('mysql_passwd')) features_set = HNSWFeaturesSet(config.find('ann_path'), config.find('ann_max_elements')) reid_tree = HNSWFeaturesSet(config.find('ann_path'), config.find('ann_max_elements')) detector = FaceDetectorModel() landmark = LandmarksDetector() reid = FaceReidModel() messenger = Telegram(token=config.find('telebot_token'), proxy=config.find('proxy'),
from lib.basic_logger import log from lib.yaml_config import YamlConfig as Config from lib.redis_bus import RedisBus #NB! Import before MySQLEngine to avoid SegmentationFault from lib.query_executor.query_executor import QueryDictExecutor from lib.mysql_driver.mysql_engine import MySQLEngine from lib.queries.mysql_queries import mysql_queries as query from lib.get_face_hash import Infer from lib.hnsw_features_set import HNSWFeaturesSet from mysql.connector.errors import ProgrammingError, InterfaceError, OperationalError, IntegrityError # Create global instance of config project_dir = "/opt/projects/mvid" #project_dir = "/home/tech/PycharmProjects/mvid" config = Config('/etc/spyspace/mvid_conf.yaml') # Create global instance of basic transport bus = RedisBus(host=config.find('redis_host')) executor = QueryDictExecutor(MySQLEngine, config.find('mysql_host'), user=config.find('mysql_user'), password=config.find('mysql_passwd'), database="mvideo") infer = Infer() features_set = HNSWFeaturesSet(config.find('ann_path'), config.find('ann_max_elements'))
from lib.mysql_driver import MySQLEngine from lib.query_executor import QueryDictExecutor from lib.queries import mysql_queries as queries from lib.yaml_config import YamlConfig as Config from lib.basic_logger import log config = Config('/etc/spyspace/mvid_conf.yaml') db_host = config.find('mysql/mysql_host') db_user = config.find('mysql/mysql_user') db_password = config.find('mysql/mysql_passwd') db_database = config.find('mysql/mysql_database') db_port = config.find('mysql/mysql_port') db_max_port_size = config.find('mysql/mysql_max_block_size') executor = QueryDictExecutor(MySQLEngine, db_host, user=db_user, password=db_password, database=db_database, max_block_size=db_max_port_size)
from lib.iou import IouBoxTracker as Tracker from lib.mysql_driver import MySQLEngine from lib.query_executor import QueryDictExecutor from lib.queries import mysql_queries as queries from lib.yaml_config import YamlConfig as Config from lib.basic_logger import log config = Config('/etc/spyspace/mvid_conf.yaml') tracker_threshold = config.find('counter/tracker_threshold') tracker_lag = config.find('counter/tracker_lag') db_host = config.find('mysql/mysql_host') db_user = config.find('mysql/mysql_user') db_password = config.find('mysql/mysql_passwd') db_database = config.find('mysql/mysql_database') db_port = config.find('mysql/mysql_port') db_max_port_size = config.find('mysql/mysql_max_block_size') tracker = Tracker(tracker_threshold, tracker_lag) executor = QueryDictExecutor(MySQLEngine, db_host, user=db_user, password=db_password, database=db_database, max_block_size=db_max_port_size)