YOLO Vision 2026:

脑肿瘤数据集#

在 Colab 中打开脑肿瘤数据集

Ultralytics Brain Tumor 数据集是一个包含 1,116 张医学图像的目标检测数据集(其中 893 张用于训练,223 张用于验证),来源于 MRI 和 CT 扫描,分为 2 个类别:negative(无肿瘤)和 positive(有肿瘤)。它让你能够训练计算机视觉模型来定位扫描中的脑部肿瘤,从而在医疗保健应用中支持早期诊断和治疗规划。



Watch: Brain Tumor Detection using Ultralytics Platform with Ultralytics YOLO26 | Object Detection 🚀

数据集结构#

脑部肿瘤数据集包含 1,116 张图像,由 brain-tumor.yaml 配置定义并分为两个预定义的子集:

拆分图像注释
训练893
验证223

每张图像都标注了以下 2 个类别之一:

  • negative:无脑部肿瘤的图像
  • positive:显示脑部肿瘤的图像

该数据集会在你首次训练时从 Ultralytics GitHub 资源自动下载(4.21 MB),因此无需手动设置。

浏览Ultralytics 平台上的 Brain Tumor以查看带有标注叠加层的图像,在图表标签页中查看类别分布和边界框热图,并将其克隆以在云端训练你自己的模型。

应用#

使用计算机视觉进行脑部肿瘤检测可以实现早期诊断、治疗规划和肿瘤进展监测。通过分析 MRI 或 CT 扫描,检测模型能够精确定位肿瘤,从而支持及时的医疗干预和个性化治疗。

医疗专业人员可以利用此技术来:

  • 减少诊断时间并提高准确性
  • 通过精确定位肿瘤来辅助手术规划
  • 监测治疗在一段时间内的有效性
  • 支持肿瘤学和神经学研究

数据集 YAML#

YAML 文件定义了数据集配置,包括路径、类别和其他相关信息。对于脑部肿瘤数据集,brain-tumor.yaml 文件维护在 https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/brain-tumor.yaml

ultralytics/cfg/datasets/brain-tumor.yaml
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license

# Brain-tumor dataset by Ultralytics
# Documentation: https://docs.ultralytics.com/datasets/detect/brain-tumor
# Example usage: yolo train data=brain-tumor.yaml
# parent
# ├── ultralytics
# └── datasets
#     └── brain-tumor ← downloads here (4.21 MB)

# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
path: brain-tumor # dataset root dir
train: images/train # train images (relative to 'path') 893 images
val: images/val # val images (relative to 'path') 223 images

# Classes
names:
  0: negative
  1: positive

# Download script/URL (optional)
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/brain-tumor.zip

用法#

若要在脑部肿瘤数据集上使用 640 的图像尺寸训练 YOLO26 模型 100 个轮次,请利用所提供的代码片段。有关可用参数的详细列表,请参考模型的训练页面。

训练示例
from ultralytics import YOLO

# Load a model
model = YOLO("yolo26n.pt")  # load a pretrained model (recommended for training)

# Train the model
results = model.train(data="brain-tumor.yaml", epochs=100, imgsz=640)
推理示例
from ultralytics import YOLO

# Load a model
model = YOLO("path/to/best.pt")  # load a brain-tumor fine-tuned model

# Inference using the model
results = model.predict("https://ultralytics.com/assets/brain-tumor-sample.jpg")

样本图像和标注#

脑肿瘤数据集包含有或无肿瘤的 MRI 和 CT 脑部扫描图像。以下是来自该数据集的标注图像示例。

Brain tumor dataset sample image

  • 马赛克图像:此训练批次展示了马赛克数据集图像。马赛克在训练期间将多张图像组合成一张,从而增加了批次多样性,以便模型能更好地泛化到不同的肿瘤大小、形状和位置,适用于医学图像分析

引用与致谢#

该数据集在 AGPL-3.0 License 下发布。

如果你在研究或开发工作中使用此数据集,请进行适当引用:

引用
@dataset{Ultralytics_Brain_Tumor_Dataset_2023,
    author = {Ultralytics},
    title = {Brain Tumor Detection Dataset},
    year = {2023},
    publisher = {Ultralytics},
    url = {https://docs.ultralytics.com/datasets/detect/brain-tumor/}
}

常见问题解答#

  • 脑部肿瘤数据集包含 1,116 张图像,分为两个子集:包含 893 张图像的训练集和包含 223 张图像的验证集,每张图像都配有成对的标注。这种结构化的划分支持开发用于检测脑部肿瘤的强大且准确的计算机视觉模型。有关更多信息,请参阅数据集结构部分。

  • 脑部肿瘤数据集有 2 个类别:negative(无脑部肿瘤的图像)和 positive(显示脑部肿瘤的图像)。这种二元标注使检测模型既能定位肿瘤,又能标记没有肿瘤的扫描结果。

  • 当你第一次使用 data="brain-tumor.yaml" 进行训练时,脑部肿瘤数据集(4.21 MB)会自动从 Ultralytics GitHub 资产下载——无需手动下载。你可以在检测数据集概览中浏览相关数据集。

  • 你可以使用 Python 和 CLI 方法在脑肿瘤数据集上训练 YOLO26 模型,设定 100 个 epoch 和 640px 的图像大小。以下是两者的示例:

    训练示例
    from ultralytics import YOLO
    
    # Load a model
    model = YOLO("yolo26n.pt")  # load a pretrained model (recommended for training)
    
    # Train the model
    results = model.train(data="brain-tumor.yaml", epochs=100, imgsz=640)

    有关可用参数的详细列表,请参阅训练页面。

  • 在人工智能项目中使用脑部肿瘤数据集可以实现脑部肿瘤的早期诊断和治疗规划。它有助于通过计算机视觉自动识别脑部肿瘤,促进准确和及时的医疗干预,并支持个性化的治疗策略。该应用在改善患者预后和医疗效率方面具有巨大潜力。有关 AI 在医疗保健中应用的更多见解,请参阅Ultralytics 的医疗解决方案

  • 可以使用 Python 或 CLI 方法对微调后的 YOLO26 模型进行推理。以下是示例:

    推理示例
    from ultralytics import YOLO
    
    # Load a model
    model = YOLO("path/to/best.pt")  # load a brain-tumor fine-tuned model
    
    # Inference using the model
    results = model.predict("https://ultralytics.com/assets/brain-tumor-sample.jpg")
  • 脑部肿瘤数据集的 YAML 配置文件可在 brain-tumor.yaml 处找到。该文件包含训练和评估该数据集上的模型所需的路径、类别和其他附加相关信息。

评论