|
from pathlib import Path
|
|
import sys
|
|
|
|
|
|
FILE = Path(__file__).resolve()
|
|
|
|
ROOT = FILE.parent
|
|
|
|
if ROOT not in sys.path:
|
|
sys.path.append(str(ROOT))
|
|
|
|
ROOT = ROOT.relative_to(Path.cwd())
|
|
|
|
|
|
IMAGE = 'Image'
|
|
VIDEO = 'Video'
|
|
WEBCAM = 'Webcam'
|
|
RTSP = 'RTSP'
|
|
YOUTUBE = 'YouTube'
|
|
|
|
SOURCES_LIST = [IMAGE, VIDEO, WEBCAM, RTSP, YOUTUBE]
|
|
|
|
|
|
IMAGES_DIR = ROOT / 'images'
|
|
DEFAULT_IMAGE = IMAGES_DIR / 'office_4.jpg'
|
|
DEFAULT_DETECT_IMAGE = IMAGES_DIR / 'office_4_detected.jpg'
|
|
|
|
|
|
VIDEO_DIR = ROOT / 'videos'
|
|
VIDEOS_DICT = {
|
|
'video_1': VIDEO_DIR / 'video_1.mp4',
|
|
'video_2': VIDEO_DIR / 'video_2.mp4',
|
|
'video_3': VIDEO_DIR / 'video_3.mp4',
|
|
}
|
|
|
|
|
|
MODEL_DIR = ROOT / 'weights'
|
|
DETECTION_MODEL = MODEL_DIR / 'yolov8n.pt'
|
|
|
|
|
|
|
|
|
|
SEGMENTATION_MODEL = MODEL_DIR / 'yolov8n-seg.pt'
|
|
|
|
|
|
WEBCAM_PATH = 0
|
|
|