Link to this section脑肿瘤数据集#
脑肿瘤检测数据集由来自 MRI 或 CT 扫描的医学图像组成,包含有关脑肿瘤是否存在、位置及特征的信息。该数据集对于训练 计算机视觉 算法以实现脑肿瘤识别自动化至关重要,有助于在 医疗保健应用 中实现早期诊断和治疗计划制定。
Watch: Brain Tumor Detection using Ultralytics Platform with Ultralytics YOLO26 | Object Detection 🚀
Link to this section数据集结构#
脑肿瘤数据集分为两个子集:
- 训练集:包含 893 张图像,每张图像均附带相应的标注。
- 测试集:包含 223 张图像,每张图像均有配对的标注。
该数据集包含两类:
- 阴性 (Negative):无脑肿瘤的图像
- 阳性 (Positive):有脑肿瘤的图像
Link to this section应用#
使用计算机视觉进行脑肿瘤检测的应用可实现 早期诊断、治疗规划以及对肿瘤进展的监测。通过分析 MRI 或 CT 扫描等医学影像数据,计算机视觉系统 有助于准确识别脑肿瘤,从而辅助及时的医疗干预和个性化治疗策略。
医疗专业人员可以利用此技术来:
- 减少诊断时间并提高准确性
- 通过精确定位肿瘤来辅助手术规划
- 监测治疗在一段时间内的有效性
- 支持肿瘤学和神经学研究
Link to this section数据集 YAML#
YAML(Yet Another Markup Language)文件用于定义数据集配置。它包含有关数据集路径、类别及其他相关信息的内容。对于脑肿瘤数据集,brain-tumor.yaml 文件托管在 https://github.com/ultralytics/ultralytics/blob/main/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.zipLink to this section用法#
若要在脑肿瘤数据集上训练 YOLO26 模型,设定 100 个 epoch 且图像大小为 640,请利用提供的代码片段。有关可用参数的详细列表,请参阅模型的 训练 页面。
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")Link to this section样本图像和标注#
脑肿瘤数据集包含广泛的医学图像,涵盖了带有和不带有肿瘤的脑部扫描。以下展示了数据集中的图像示例,以及它们各自的标注。

- 马赛克图像:此处显示的是包含马赛克数据集图像的训练批次。马赛克(Mosaicing)是一种训练技术,将多张图像合并为一张,以增强批次的多样性。该方法有助于提高模型在脑部扫描中针对各种肿瘤大小、形状和位置的泛化能力。
此示例突显了脑肿瘤数据集中图像的多样性和复杂性,强调了在训练阶段纳入马赛克技术对于 医学图像分析 的优势。
Link to this section引用与致谢#
该数据集根据 AGPL-3.0 许可证 发布。
如果你在研究或开发工作中使用此数据集,请进行适当引用:
@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/}
}Link to this section常见问题解答#
Link to this sectionUltralytics 文档中提供的脑肿瘤数据集结构是什么?#
脑肿瘤数据集分为两个子集:训练集包含 893 张带相应标注的图像,而测试集包含 223 张带配对标注的图像。这种结构化划分有助于开发稳健且准确的计算机视觉模型来检测脑肿瘤。有关数据集结构的更多信息,请访问 数据集结构 部分。
Link to this section如何使用 Ultralytics 在脑肿瘤数据集上训练 YOLO26 模型?#
你可以使用 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)有关可用参数的详细列表,请参考 训练 页面。
Link to this section将脑肿瘤数据集用于医疗保健领域的 AI 有什么好处?#
在 AI 项目中使用脑肿瘤数据集可以实现脑肿瘤的早期诊断和治疗规划。它通过计算机视觉帮助实现脑肿瘤识别自动化,促进准确及时的医疗干预,并支持个性化治疗策略。该应用在改善患者预后和医疗效率方面具有巨大潜力。有关 AI 在医疗保健中应用的更多见解,请参阅 Ultralytics 的医疗保健解决方案。
Link to this section如何使用微调后的 YOLO26 模型在脑肿瘤数据集上执行推理?#
可以使用 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")Link to this section在哪里可以找到脑肿瘤数据集的 YAML 配置?#
脑肿瘤数据集的 YAML 配置文件可在 brain-tumor.yaml 找到。此文件包含训练和评估该数据集模型所需的路径、类别和其他相关信息。