-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
31 lines (23 loc) · 781 Bytes
/
main.py
File metadata and controls
31 lines (23 loc) · 781 Bytes
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
import asyncio
import os
import threading
from dotenv import load_dotenv
from TelegramCalling.telegramBot import TelegramBotWithImageSender
from Tracking.Tracking import HumanTracker
load_dotenv('.env')
MODEL_PATH = "Tracking/models/yolo11n_openvino_model"
TRACKER_CONFIG = "Tracking/models/botsort.yaml"
CAMERA_IP = os.environ.get('CAMERA_IP')
TOKEN = os.environ.get('TELEGRAM_TOKEN')
CHAT_ID = os.environ.get('CHAT_ID')
if __name__ == "__main__":
bot = TelegramBotWithImageSender(token=TOKEN, chat_id=CHAT_ID)
if CAMERA_IP is None:
CAMERA_IP = 0
tracker = HumanTracker(
model_path=MODEL_PATH,
tracker_config=TRACKER_CONFIG,
camera_source=CAMERA_IP,
conf_threshold=0.5,
)
asyncio.run(tracker.process_frames(bot))