Adding python files
This commit is contained in:
52
src/gui/tabs/training_tab.py
Normal file
52
src/gui/tabs/training_tab.py
Normal file
@@ -0,0 +1,52 @@
|
||||
"""
|
||||
Training tab for the microscopy object detection application.
|
||||
Handles model training with YOLO.
|
||||
"""
|
||||
|
||||
from PySide6.QtWidgets import QWidget, QVBoxLayout, QLabel, QGroupBox
|
||||
|
||||
from src.database.db_manager import DatabaseManager
|
||||
from src.utils.config_manager import ConfigManager
|
||||
from src.utils.logger import get_logger
|
||||
|
||||
|
||||
logger = get_logger(__name__)
|
||||
|
||||
|
||||
class TrainingTab(QWidget):
|
||||
"""Training tab for model training."""
|
||||
|
||||
def __init__(
|
||||
self, db_manager: DatabaseManager, config_manager: ConfigManager, parent=None
|
||||
):
|
||||
super().__init__(parent)
|
||||
self.db_manager = db_manager
|
||||
self.config_manager = config_manager
|
||||
|
||||
self._setup_ui()
|
||||
|
||||
def _setup_ui(self):
|
||||
"""Setup user interface."""
|
||||
layout = QVBoxLayout()
|
||||
|
||||
# Placeholder
|
||||
group = QGroupBox("Training")
|
||||
group_layout = QVBoxLayout()
|
||||
label = QLabel(
|
||||
"Training functionality will be implemented here.\n\n"
|
||||
"Features:\n"
|
||||
"- Dataset selection\n"
|
||||
"- Training parameter configuration\n"
|
||||
"- Real-time training progress\n"
|
||||
"- Loss and metric visualization"
|
||||
)
|
||||
group_layout.addWidget(label)
|
||||
group.setLayout(group_layout)
|
||||
|
||||
layout.addWidget(group)
|
||||
layout.addStretch()
|
||||
self.setLayout(layout)
|
||||
|
||||
def refresh(self):
|
||||
"""Refresh the tab."""
|
||||
pass
|
||||
Reference in New Issue
Block a user