跳至内容

脑肿瘤数据集

A brain tumor detection dataset consists of medical images from MRI or CT scans, containing information about brain tumor presence, location, and characteristics. This dataset is essential for training computer vision algorithms to automate brain tumor identification, aiding in early diagnosis and treatment planning.



观看: 使用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 YOLO 🚀, AGPL-3.0 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

使用方法

To train a YOLO11n model on the brain tumor dataset for 100 epochs with an image size of 640, utilize the provided code snippets. For a detailed list of available arguments, consult the model's Training page.

列车示例

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 许可发布。

常见问题

Ultralytics 文档中提供的脑肿瘤数据集的结构是什么?

脑肿瘤数据集被分为两个子集:训练集由 893 幅带有相应注释的图像组成,测试集由223 幅带有配对注释的图像组成。这种结构化的划分有助于开发稳健、准确的计算机视觉模型来检测脑肿瘤。有关数据集结构的更多信息,请访问数据集结构部分。

How can I train a YOLO11 model on the brain tumor dataset using Ultralytics?

You can train a YOLO11 model on the brain tumor dataset for 100 epochs with an image size of 640px using both Python and CLI methods. Below are the examples for both:

列车示例

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

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

将脑肿瘤数据集用于医疗保健领域的人工智能有什么好处?

在人工智能项目中使用脑肿瘤数据集可以实现脑肿瘤的早期诊断和治疗规划。它有助于通过计算机视觉自动识别脑肿瘤,促进准确及时的医疗干预,并支持个性化治疗策略。这一应用在改善患者预后和提高医疗效率方面具有巨大潜力。

How do I perform inference using a fine-tuned YOLO11 model on the brain tumor dataset?

Inference using a fine-tuned YOLO11 model can be performed with either Python or CLI approaches. Here are the examples:

推理示例

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 中找到。该文件包括在该数据集上训练和评估模型所需的路径、类和其他相关信息。


📅 Created 6 months ago ✏️ Updated 12 days ago

评论