-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAutoLabellingTool.py
More file actions
55 lines (42 loc) · 2.08 KB
/
Copy pathAutoLabellingTool.py
File metadata and controls
55 lines (42 loc) · 2.08 KB
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
55
"""
AutoLabellingTool.py — 프로그램 첫 화면(런처)
==============================================================================
프로그램을 켜면 가장 먼저 뜨는 화면이다. 여기서 할 일을 고르고, 실제 작업은
각각의 창/프로세스가 맡는다. **이 화면은 모델을 로드하지 않는다** — 그래서
바로 뜬다.
[New Project] 작업 폴더(images · dataset · results) 생성 → project.py
[Open Project] 이미지를 골라 가운데 뷰에 띄운다(그 폴더가 프로젝트면 함께 잡는다)
[Labelling] Model_Development.py 를 별도 프로세스로 실행
[Infer] 추론 설정 창 → batch_infer.main(...) 을 별도 프로세스로 실행
[Compare] 라벨링 ↔ 추론 결과를 나란히 비교
사용법
------
python AutoLabellingTool.py
이 저장소의 다른 진입 스크립트와 달리 고칠 설정값이 없다 — 경로는 모두 화면
에서 지정한다. 현재 프로젝트와 Inference 입력값은 ``~/.auto_labelling_tool.json``
에 기억해 다음 실행 때 복원한다.
==============================================================================
"""
from __future__ import annotations
import sys
from PySide6.QtWidgets import QApplication
from log_utils import get_logger, setup_logging
from ui.launcher_window import LauncherWindow
from ui.theme import DARK_QSS
def main():
log_file = setup_logging()
logger = get_logger(__name__)
logger.info("launcher starting log_file=%s argv=%s", log_file, sys.argv)
app = QApplication(sys.argv)
app.setApplicationName("Auto Labelling Tool")
app.setStyleSheet(DARK_QSS)
win = LauncherWindow()
# 모니터에 맞춰 최대화해 띄운다(최대화를 풀면 화면의 90% 크기로 돌아간다 —
# LauncherWindow._fit_to_screen 참고).
win.showMaximized()
logger.info("launcher window shown maximized size=%dx%d", win.width(), win.height())
exit_code = app.exec()
logger.info("launcher exited code=%s", exit_code)
sys.exit(exit_code)
if __name__ == "__main__":
main()