脑肿瘤数据集
脑肿瘤检测数据集由核磁共振成像或 CT 扫描的医学图像组成,其中包含有关脑肿瘤存在、位置和特征的信息。该数据集对于训练计算机视觉算法以自动识别脑肿瘤至关重要,有助于医疗应用中的早期诊断和治疗计划。
观看: 使用Ultralytics HUB 检测脑肿瘤
数据集结构
脑肿瘤数据集分为两个子集:
- 训练集:由 893 幅图像组成,每幅图像都附有相应的注释。
- 测试集:包括 223 张图像,每张图像都有配对的注释。
数据集包含两个类别:
- 阴性无脑肿瘤的图像
- 阳性:有脑肿瘤的图像
应用
利用计算机视觉进行脑肿瘤检测可实现早期诊断、制定治疗计划和监测肿瘤进展。通过分析核磁共振成像或 CT 扫描等医学影像数据,计算机视觉系统可帮助准确识别脑肿瘤,有助于及时采取医疗干预措施和个性化治疗策略。
医疗专业人员可以利用这项技术
- 缩短诊断时间,提高准确性
- 通过精确定位肿瘤,协助制定手术计划
- 长期监测治疗效果
- 支持肿瘤学和神经学研究
数据集 YAML
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.05 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: ../datasets/brain-tumor # dataset root dir
train: train/images # train images (relative to 'path') 893 images
val: valid/images # val images (relative to 'path') 223 images
test: # test images (relative to 'path')
# Classes
names:
0: negative
1: positive
# Download script/URL (optional)
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/brain-tumor.zip
使用方法
培训一名 YOLO11模型时,请使用所提供的代码片段。有关可用参数的详细列表,请查阅模型的 "训练"页面。
列车示例
from ultralytics import YOLO
# Load a model
model = YOLO("yolo11n.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data="brain-tumor.yaml", epochs=100, imgsz=640)
# Start training from a pretrained *.pt model
yolo detect train data=brain-tumor.yaml model=yolo11n.pt 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")
# Start prediction with a finetuned *.pt model
yolo detect predict model='path/to/best.pt' imgsz=640 source="https://ultralytics.com/assets/brain-tumor-sample.jpg"
图片和注释示例
脑肿瘤数据集包含大量医学图像,包括有肿瘤和无肿瘤的脑部扫描图像。以下是数据集中的图像示例,并附有各自的注释。
- 镶嵌图像:这里显示的是由镶嵌数据集图像组成的训练批次。镶嵌是一种训练技术,可将多幅图像合并为一幅,从而增强批次多样性。这种方法有助于提高模型对大脑扫描中各种肿瘤大小、形状和位置的概括能力。
这个例子突出了脑肿瘤数据集中图像的多样性和复杂性,强调了在医学图像分析的训练阶段加入镶嵌技术的优势。
引文和致谢
该数据集根据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/}
}
常见问题
Ultralytics 文档中提供的脑肿瘤数据集的结构是什么?
脑肿瘤数据集被分为两个子集:训练集由893 幅带有相应注释的图像组成,测试集由223 幅带有配对注释的图像组成。这种结构化的划分有助于开发稳健、准确的计算机视觉模型来检测脑肿瘤。有关数据集结构的更多信息,请访问数据集结构部分。
如何使用Ultralytics 在脑肿瘤数据集上训练YOLO11 模型?
您可以使用Python 和CLI 两种方法,在图像大小为 640px 的脑肿瘤数据集上训练YOLO11 模型 100 个 epochs。以下是这两种方法的示例:
列车示例
from ultralytics import YOLO
# Load a model
model = YOLO("yolo11n.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data="brain-tumor.yaml", epochs=100, imgsz=640)
# Start training from a pretrained *.pt model
yolo detect train data=brain-tumor.yaml model=yolo11n.pt epochs=100 imgsz=640
有关可用参数的详细列表,请参阅培训页面。
将脑肿瘤数据集用于医疗保健领域的人工智能有什么好处?
在人工智能项目中使用脑肿瘤数据集可以实现脑肿瘤的早期诊断和治疗规划。它有助于通过计算机视觉自动识别脑肿瘤,促进准确及时的医疗干预,并支持个性化治疗策略。这一应用在改善患者预后和提高医疗效率方面潜力巨大。有关人工智能在医疗保健领域应用的更多见解,请参阅Ultralytics 的医疗保健解决方案。
如何在脑肿瘤数据集上使用微调后的YOLO11 模型进行推理?
使用微调后的YOLO11 模型进行推理,可以采用Python 或CLI 方法。下面是一些例子:
推理示例
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")
# Start prediction with a finetuned *.pt model
yolo detect predict model='path/to/best.pt' imgsz=640 source="https://ultralytics.com/assets/brain-tumor-sample.jpg"
在哪里可以找到脑肿瘤数据集的 YAML 配置?
脑肿瘤数据集的 YAML 配置文件可在brain-tumor.yaml 中找到。该文件包括在该数据集上训练和评估模型所需的路径、类和其他相关信息。