尧图网站建设 尧图网络
  • 首页
  • 关于我们
  • 服务项目
  • 案例展示
  • 建站流程
  • 资讯中心
  • 联系我们
首页/资讯中心/详情

菌落微生物检测和识别2:基于深度学习YOLO26神经网络实现菌落微生物检测和识别(含训练代码和数据集)

菌落微生物检测和识别2:基于深度学习YOLO26神经网络实现菌落微生物检测和识别(含训练代码和数据集)
📅 发布时间:2026/8/2 4:04:37

基于深度学习YOLO26神经网络实现菌落微生物检测和识别,其能识别检测出5种菌落微生物检测:names: ['S.aureus', 'E.coli', 'P.aeruginosa', 'C.albicans', 'B.subtilis']

具体图片见如下:

第一步:YOLO26介绍

YOLO26采用了端到端无NMS推理,直接生成预测结果,无需非极大值抑制(NMS)后处理。这种设计减少了延迟,简化了集成,并提高了部署效率。此外,YOLO26移除了分布焦点损失(DFL),从而增强了硬件兼容性,特别是在边缘设备上的表现。

模型还引入了ProgLoss和小目标感知标签分配(STAL),显著提升了小目标检测的精度。这对于物联网、机器人技术和航空影像等应用至关重要。同时,YOLO26采用了全新的MuSGD优化器,结合了SGD和Muon优化技术,提供更稳定的训练和更快的收敛速度。

第二步:YOLO26网络结构

第三步:代码展示

# Ultralytics YOLO 🚀, AGPL-3.0 license from pathlib import Path from ultralytics.engine.model import Model from ultralytics.models import yolo from ultralytics.nn.tasks import ClassificationModel, DetectionModel, OBBModel, PoseModel, SegmentationModel, WorldModel from ultralytics.utils import ROOT, yaml_load class YOLO(Model): """YOLO (You Only Look Once) object detection model.""" def __init__(self, model="yolo11n.pt", task=None, verbose=False): """Initialize YOLO model, switching to YOLOWorld if model filename contains '-world'.""" path = Path(model) if "-world" in path.stem and path.suffix in {".pt", ".yaml", ".yml"}: # if YOLOWorld PyTorch model new_instance = YOLOWorld(path, verbose=verbose) self.__class__ = type(new_instance) self.__dict__ = new_instance.__dict__ else: # Continue with default YOLO initialization super().__init__(model=model, task=task, verbose=verbose) @property def task_map(self): """Map head to model, trainer, validator, and predictor classes.""" return { "classify": { "model": ClassificationModel, "trainer": yolo.classify.ClassificationTrainer, "validator": yolo.classify.ClassificationValidator, "predictor": yolo.classify.ClassificationPredictor, }, "detect": { "model": DetectionModel, "trainer": yolo.detect.DetectionTrainer, "validator": yolo.detect.DetectionValidator, "predictor": yolo.detect.DetectionPredictor, }, "segment": { "model": SegmentationModel, "trainer": yolo.segment.SegmentationTrainer, "validator": yolo.segment.SegmentationValidator, "predictor": yolo.segment.SegmentationPredictor, }, "pose": { "model": PoseModel, "trainer": yolo.pose.PoseTrainer, "validator": yolo.pose.PoseValidator, "predictor": yolo.pose.PosePredictor, }, "obb": { "model": OBBModel, "trainer": yolo.obb.OBBTrainer, "validator": yolo.obb.OBBValidator, "predictor": yolo.obb.OBBPredictor, }, } class YOLOWorld(Model): """YOLO-World object detection model.""" def __init__(self, model="yolov8s-world.pt", verbose=False) -> None: """ Initialize YOLOv8-World model with a pre-trained model file. Loads a YOLOv8-World model for object detection. If no custom class names are provided, it assigns default COCO class names. Args: model (str | Path): Path to the pre-trained model file. Supports *.pt and *.yaml formats. verbose (bool): If True, prints additional information during initialization. """ super().__init__(model=model, task="detect", verbose=verbose) # Assign default COCO class names when there are no custom names if not hasattr(self.model, "names"): self.model.names = yaml_load(ROOT / "cfg/datasets/coco8.yaml").get("names") @property def task_map(self): """Map head to model, validator, and predictor classes.""" return { "detect": { "model": WorldModel, "validator": yolo.detect.DetectionValidator, "predictor": yolo.detect.DetectionPredictor, "trainer": yolo.world.WorldTrainer, } } def set_classes(self, classes): """ Set classes. Args: classes (List(str)): A list of categories i.e. ["person"]. """ self.model.set_classes(classes) # Remove background if it's given background = " " if background in classes: classes.remove(background) self.model.names = classes # Reset method class names # self.predictor = None # reset predictor otherwise old names remain if self.predictor: self.predictor.model.names = classes

第四步:统计训练过程的一些指标,相关指标都有

​

第五步:运行预测代码

#coding:utf-8 from ultralytics import YOLO import cv2 # 所需加载的模型目录 path = 'models/best.pt' # 需要检测的图片地址 img_path = "TestFiles/000353.jpg" # 加载预训练模型 # conf 0.25 object confidence threshold for detection # iou 0.7 intersection over union (IoU) threshold for NMS model = YOLO(path, task='detect') results = model.predict(img_path, iou=0.5) # 检测图片 res = results[0].plot() cv2.imshow("YOLO26 Detection", res) cv2.waitKey(0)

第六步:整个工程的内容

包含数据集、训练代码和预测代码

项目完整文件下载请见演示与介绍视频的简介处给出:➷➷➷

https://www.bilibili.com/video/BV1WJGu6eEBV/

相关新闻

  • AI反蒸馏机制误触解析:开发者如何规避Claude模型“降智”风险
  • 深度解析so-vits-svc架构:NSF-HIFIGAN声码器如何实现高质量歌唱语音转换
  • 利用旧电脑与家庭宽带搭建24小时运行的家庭服务器:从Minecraft私服到个人网站

最新新闻

  • Hadoop核心架构与集群搭建实战:从基础原理到环境部署
  • 2026 年兴宾比较好的建房用钢网定做厂家哪家可靠,别再乱选建房辅料!这玩意儿能省一半工时,师傅都偷偷用的好东西 - 领域鉴赏官
  • 流体机械设计核心:从叶轮、蜗壳原理到CFD仿真与工程实践
  • 从单打独斗到军团作战:QM 如何重新定义 AI Agent 的协作范式
  • Vue3 hooks 函数
  • COCI字符串网格DP:BFS优化与状态转移实战解析

日新闻

  • 怀化母婴除甲醛公司测甲醛中心怎么选:康之居母婴除甲醛标准、流程、避坑指南 - 信誉隆金银铂奢回收
  • 三步打造你的终极音乐中心:foobox-cn网络电台功能完整指南
  • Lance湖仓格式:为多模态AI工作流设计的终极数据存储方案

周新闻

  • 怀化母婴除甲醛公司测甲醛中心怎么选:康之居母婴除甲醛标准、流程、避坑指南 - 信誉隆金银铂奢回收
  • 三步打造你的终极音乐中心:foobox-cn网络电台功能完整指南
  • Lance湖仓格式:为多模态AI工作流设计的终极数据存储方案

月新闻

  • ClickHouse版本管理深度实战:4步构建零风险升级与回滚体系
  • Java 23 种设计模式:从踩坑到精通 | 番外:责任链模式 —— 物流审批流程实战
  • 华硕笔记本性能解放指南:G-Helper轻量级控制工具全面解析

关于尧图

  • 公司简介
  • 团队介绍
  • 企业文化
  • 荣誉资质

服务项目

  • 定制开发
  • 电商建站
  • UI 设计
  • 运维服务

快速链接

  • 案例展示
  • 建站流程
  • 常见问题
  • 资讯中心

联系方式

  • 📍北京市朝阳区互联网产业园 A 座 10 层
  • 📞400-888-8888
  • ✉️contact@rkmt.cn
  • 🕐周一至周日 9:00-21:00

© 2024 北京尧图网络科技有限公司 版权所有 | 京 ICP 备 XXXXXXXX 号