update: add small models

This commit is contained in:
Your Name 2024-11-15 08:34:08 +01:00
parent 9998ebb874
commit 846fc4d210
7 changed files with 10879 additions and 2 deletions

View File

@ -26,6 +26,8 @@ import threading
from CameraStream import YOLOv8CameraStream # Import the YOLOv8CameraStream class
import cv2
import os
# db_config = {
# 'user': 'dbUser',
# 'password': 'dbPassword',
@ -444,11 +446,14 @@ class Ui_MainWindow(object):
self.camWorkFlowcheckBox = QtWidgets.QCheckBox(self.centralwidget)
self.camWorkFlowcheckBox.setGeometry(QtCore.QRect(700, int(1080/2), 151, 23))
self.camWorkFlowcheckBox.setObjectName("camWorkFlowcheckBox")
self.modelComboBox = QtWidgets.QComboBox(self.centralwidget)
self.modelComboBox.setGeometry(QtCore.QRect(700, int(1080/2)+50, 161, 25))
self.modelComboBox.setObjectName("modelComboBox")
self.startCamBtn = QtWidgets.QPushButton(self.centralwidget)
self.startCamBtn.setGeometry(QtCore.QRect(700, int(1080/2)+50, 161, 25)) #int(1080/2)+100
self.startCamBtn.setGeometry(QtCore.QRect(700, int(1080/2)+100, 161, 25)) #int(1080/2)+100
self.startCamBtn.setObjectName("startCamBtn")
self.stopCamBtn = QtWidgets.QPushButton(self.centralwidget)
self.stopCamBtn.setGeometry(QtCore.QRect(700, int(1080/2)+100, 161, 25))
self.stopCamBtn.setGeometry(QtCore.QRect(700, int(1080/2)+150, 161, 25))
self.stopCamBtn.setObjectName("stopCamBtn")
self.graphicsView = QtWidgets.QGraphicsView(self.centralwidget)
self.graphicsView.setGeometry(QtCore.QRect(10, int(1080/2), 661, int(480*1.05))) # position and size of camera frame # int(640*1.05)
@ -555,6 +560,8 @@ class Ui_MainWindow(object):
self.stopCamBtn.setText(_translate("MainWindow", "Stop Camera"))
self.camWorkFlowcheckBox.setText(_translate("MainWindow", "Camera Workflow"))
# self.camWorkFlowcheckBox.clicked.connect(self.onCheckboxCheck)
self.modelComboBox
def mousePressEvent(self, event):
@ -971,11 +978,22 @@ class CameraStreamApp(QtWidgets.QMainWindow):
self.yolo_stream = None # Initialize YOLOv8CameraStream as None
self.timer = QtCore.QTimer(self)
self.timer.timeout.connect(self.update_frame)
# Populate the model dropdown menu
self.populate_model_dropdown()
self.ui.startCamBtn.clicked.connect(self.start_camera) # start camera if button LoadAuftrag is clicked
self.ui.stopCamBtn.clicked.connect(self.stop_camera) # start camera if button LoadAuftrag is clicked
self.scene = QtWidgets.QGraphicsScene(self)
self.ui.graphicsView.setScene(self.scene)
def populate_model_dropdown(self):
"""Populate the dropdown menu with model files from the models directory."""
models_dir = "models"
model_files = [f for f in os.listdir(models_dir) if f.endswith(".pt")]
self.ui.modelComboBox.clear()
self.ui.modelComboBox.addItems(model_files)
def start_camera(self):
# Start the YOLOv8 camera stream (only if not already started)
if self.yolo_stream is None:

BIN
models/best_8n.pt Normal file

Binary file not shown.

BIN
models/yolov10n_e300.pt Normal file

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
description: Ultralytics YOLOv10n model trained on rf_version2/geisi2-4/data.yaml
author: Ultralytics
date: '2024-09-24T13:16:48.802051'
version: 8.2.100
license: AGPL-3.0 License (https://ultralytics.com/license)
docs: https://docs.ultralytics.com
stride: 32
task: detect
batch: 1
imgsz:
- 640
- 640
names:
0: box
1: hand
2: oring_100_b
3: oring_40_b
4: oring_d105
5: oring_d300_b
6: oring_l1150
7: oring_l380_b
8: oring_l500
9: oring_l600
10: oring_l650_b
11: ring_40mm
12: ring_45mm
13: ring_58mm
14: schraube_sk_m10x25
15: schraube_sk_m10x30
16: schraube_sk_m10x45
17: schraube_sk_m12x20
18: schraube_sk_m12x50
19: table

BIN
models/yolov8n.pt Normal file

Binary file not shown.