Spaces:
Sleeping
Sleeping
File size: 792 Bytes
e1832f4 |
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 |
# Mikel Broström 🔥 Yolo Tracking 🧾 AGPL-3.0 license
import os
import sys
from pathlib import Path
import numpy as np
# global logger
from loguru import logger
import threading
FILE = Path(__file__).resolve()
ROOT = FILE.parents[2] # root directory
DATA = ROOT / 'data'
BOXMOT = ROOT / "boxmot"
EXAMPLES = ROOT / "tracking"
TRACKER_CONFIGS = ROOT / "boxmot" / "configs"
WEIGHTS = ROOT / "tracking" / "weights"
REQUIREMENTS = ROOT / "requirements.txt"
NUM_THREADS = min(8, max(1, os.cpu_count() - 1)) # number of BoxMOT multiprocessing threads
def only_main_thread(record):
# Check if the current thread is the main thread
return threading.current_thread().name == "MainThread"
logger.remove()
logger.add(sys.stderr, filter=only_main_thread, colorize=True, level="INFO") |