python配合yolov11开发分类训练软件

  1. 上一篇文件写了用yolo分类模型开发分类软件,这边文章在上个分类软件的基础上加入训练功能
  2. 环境配置:pycharm,PySide6 6.6.1 ,PySide6-Addons 6.6.1,PySide6-Essentials 6.6.1,torch 2.3.1+cu121,torchaudio 2.3.1+cu121,torchvision 0.18.1+cu121,onnx 1.16.1,onnxruntime 1.17.3,opencv-contrib-python 4.10.0.82,opencv-python 4.10.0.82,opencv-python-headless 4.7.0.72
  3. 分类使用的数据集,halcon的pill分类demo的数据集

    4.软件界面

    5.核心代码
bash 复制代码
    def TrainThrExecut(self):
        _monitor_train.TrainSimple = True
        imagedealwith._image_deal_with.Model = YOLO(imagedealwith._image_deal_with.TrainPreprocessModelPath)
        results = imagedealwith._image_deal_with.Model.train(
            data=imagedealwith._image_deal_with.TrainDataFolderPath,
            project=imagedealwith._image_deal_with.TrainDataSaveFolderPath,
            epochs=200,
            batch=4,
            imgsz=224,
            amp=False)
        print(results)
        sucess = imagedealwith._image_deal_with.Model.export(format='onnx')
        _monitor_train.TrainSimple = False
        imagedealwith._image_deal_with.ImageDealWithStatus = ImageDealWithStatusEnu.Inference
        self.pbtn_training.setText("Train")
        pass

    def MonitorTrainLogCallback(self,message):
        if(len(message)>0):
            self.tedit_training_message.append(message)
        pass

    def MonitorTrainLossCallback(self,message):
        if (len(message) > 0):
            self.tedit_training_loss.setText(message)
            pass
        pass

    def MonitorTrainEpochCallback(self,message):
        if (len(message) > 0):
            self.ledit_training_epoch.setText('epoch:'+message)
        pass

6.训练过程

相关推荐
8***235515 分钟前
SQL Server2022版+SSMS安装教程(保姆级)
后端·python·flask
Sally_xy20 分钟前
Python 虚拟环境
开发语言·chrome·python
serve the people32 分钟前
tensorflow tf.function 的两种执行模式(计算图执行 vs Eager 执行)的关键差异
人工智能·python·tensorflow
拾贰_C36 分钟前
[python ]anaconda
开发语言·python
serve the people39 分钟前
tensorflow中的计算图是什么
人工智能·python·tensorflow
子午39 分钟前
【动物识别系统】Python+TensorFlow+Django+人工智能+深度学习+卷积神经网络算法
人工智能·python·深度学习
7ioik43 分钟前
新增的类以及常用的方法有哪些?
java·开发语言·python
星川皆无恙1 小时前
大数据爬虫可视化分析:基于Python的豆瓣书籍可视化分析系统的设计与实现
大数据·爬虫·python·架构·pycharm·django
生而为虫1 小时前
30.正则表达式的应用
python·正则表达式·django·flask·fastapi·tornado
☆光之梦☆1 小时前
openGauss企业级开源数据库:架构设计原理与核心特性深度拆解
数据库·python