Spaces:
Build error
Build error
Download boxmot/utils/__init__.py from VerokeAI/Object_tracking_boxmot: direct link, hf CLI and curl.
- Browser
- Download file 792 Bytes
-
https://huggingface.co/spaces/VerokeAI/Object_tracking_boxmot/resolve/main/boxmot/utils/__init__.py
- Command line
-
hf download hf://spaces/VerokeAI/Object_tracking_boxmot/boxmot/utils/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/VerokeAI/Object_tracking_boxmot/resolve/main/boxmot/utils/__init__.py
792 Bytes
| # 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") |