-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.py
54 lines (42 loc) · 1.34 KB
/
settings.py
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from pathlib import Path
import sys
# Get the absolute path of the current file
file_path = Path(__file__).resolve()
# Get the parent directory of the current file
root_path = file_path.parent
# Add the root path to the sys.path list if it is not already there
if root_path not in sys.path:
sys.path.append(str(root_path))
# Get the relative path of the root directory with respect to the current working directory
ROOT = root_path.relative_to(Path.cwd())
# Sources
IMAGE = 'Image'
#VIDEO = 'Video'
WEBCAM = 'Webcam'
#RTSP = 'RTSP'
#YOUTUBE = 'YouTube'
SOURCES_LIST = [IMAGE, WEBCAM]
# Images config
IMAGES_DIR = ROOT / 'images'
DEFAULT_IMAGE = IMAGES_DIR / 'def.jfif'
DEFAULT_DETECT_IMAGE = IMAGES_DIR / 'def1.jpg'
# Videos config
VIDEO_DIR = ROOT / 'videos'
VIDEO_1_PATH = VIDEO_DIR / 'video_1.mp4'
VIDEO_2_PATH = VIDEO_DIR / 'video_2.mp4'
VIDEO_3_PATH = VIDEO_DIR / 'video_3.mp4'
VIDEO_4_PATH = VIDEO_DIR / 'video_4.mp4'
VIDEO_5_PATH = VIDEO_DIR / 'video_5.mp4'
VIDEOS_DICT = {
'video_1': VIDEO_1_PATH,
'video_2': VIDEO_2_PATH,
'video_3': VIDEO_3_PATH,
'video_4': VIDEO_4_PATH,
'video_5': VIDEO_5_PATH,
}
# ML Model config
MODEL_DIR = 'C:/Users/MY PC/Desktop/yolov8/yolov8-streamlit-detection-tracking/weights'
DETECTION_MODEL = MODEL_DIR+'yolov8 (1).pkl'
#SEGMENTATION_MODEL = MODEL_DIR+'yolov8n-seg.pt'
# Webcam
WEBCAM_PATH = 0