Link to this sectionMedical Pills Dataset#
The Ultralytics Medical Pills dataset is a proof-of-concept (POC) object detection dataset of 115 labeled images across a single class, pill — 92 for training and 23 for validation. It is built to demonstrate computer vision models for pharmaceutical applications such as quality control, packaging automation, and sorting.
Watch: How to train an Ultralytics YOLO Model on the Medical Pills Detection Dataset in Google Colab
Link to this sectionデータセットの構造#
Medical Pills データセットには、1つのクラス pill でアノテーションされた115枚の画像が含まれており、medical-pills.yaml 設定で定義された2つのサブセットに分割されています。
| 分割 | 画像 | 説明 |
|---|---|---|
| トレーニング | 92 | モデルトレーニング用のラベル付き画像 |
| バリデーション | 23 | 評価およびベンチマーク用のホールドアウト画像 |
Medical Pills on Ultralytics Platform を探索して、アノテーションのオーバーレイ付き画像を閲覧し、Charts タブでクラス分布やバウンディングボックスのヒートマップを確認したり、クラウド上で独自のモデルをトレーニングするためにクローンしたりできます。
Link to this sectionアプリケーション#
Medical Pills の検出にコンピュータビジョンを活用することで、製薬業界における自動化が可能となり、次のようなタスクをサポートします。
- 製薬仕分け: 錠剤のサイズ、形状、または色に基づいて自動的に仕分けを行い、生産効率を向上させます。
- AIの研究開発: 製薬ユースケースにおけるコンピュータビジョンアルゴリズムの開発およびテストのためのベンチマークとして機能します。
- デジタル在庫システム: 自動錠剤認識を統合し、リアルタイムの在庫監視や補充計画を実現するスマートな在庫ソリューションを構築します。
- 品質管理: 欠陥、不規則性、または汚染を特定することで、錠剤生産の一貫性を確保します。
- 偽造品検出: 視覚的特性を既知の基準と比較・分析することで、潜在的な偽造医薬品の特定を支援します。
Link to this sectionデータセット YAML#
medical-pills.yaml ファイルは、データセットのパス、クラス名、その他のメタデータを含むデータセット設定を定義しています。これは、Ultralytics リポジトリの https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/medical-pills.yaml で管理されています。
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
# Medical-pills dataset by Ultralytics
# Documentation: https://docs.ultralytics.com/datasets/detect/medical-pills
# Example usage: yolo train data=medical-pills.yaml
# parent
# ├── ultralytics
# └── datasets
# └── medical-pills ← downloads here (8.19 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: medical-pills # dataset root dir
train: images/train # train images (relative to 'path') 92 images
val: images/val # val images (relative to 'path') 23 images
# Classes
names:
0: pill
# Download script/URL (optional)
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/medical-pills.zipLink to this section使用方法#
YOLO26n モデルを Medical Pills データセットで100 epochs、画像サイズ640でトレーニングするには、以下の例を使用してください。詳細な引数については、モデルの Training ページを参照してください。
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="medical-pills.yaml", epochs=100, imgsz=640)from ultralytics import YOLO
# Load a model
model = YOLO("path/to/best.pt") # load a fine-tuned model
# Inference using the model
results = model.predict("https://ultralytics.com/assets/medical-pills-sample.jpg")Link to this sectionサンプル画像とアノテーション#
Medical Pills データセットには、錠剤の多様性を示すラベル付き画像が収録されています。以下は、データセット内のラベル付き画像の例です。

- モザイク画像: 表示されているのは、モザイク化されたデータセット画像で構成されるトレーニングバッチです。モザイク化は、複数の画像を1つに統合することでトレーニングの多様性を高め、モデルの汎化性能を向上させます。
Link to this section他のデータセットとの統合#
より包括的な製薬分析を行うには、Medical Pills データセットを、パッケージ識別のための package-seg や、エンドツーエンドのヘルスケアAIソリューションを開発するための brain-tumor のような医療画像データセットといった他の関連データセットと組み合わせることを検討してください。
Link to this section引用と謝辞#
このデータセットはAGPL-3.0ライセンスの下で利用可能です。
研究や開発業務で Medical Pills データセットを使用する場合は、記載されている詳細を使用して引用してください。
@dataset{Jocher_Ultralytics_Datasets_2024,
author = {Jocher, Glenn and Rizwan, Muhammad},
license = {AGPL-3.0},
month = {Dec},
title = {Ultralytics Datasets: Medical-pills Detection Dataset},
url = {https://docs.ultralytics.com/datasets/detect/medical-pills/},
version = {1.0.0},
year = {2024}
}Link to this sectionよくある質問 (FAQ)#
Link to this sectionMedical Pills データセットには、何枚の画像といくつのクラスが含まれていますか?#
Medical Pills データセットには合計115枚の画像が含まれており、トレーニング用に92枚、検証用に23枚が割り当てられています(個別のテストセットは含まれません)。各画像には1つのクラス pill がアノテーションされています。このデータセットは、medical-pills.yaml 設定ファイルで定義された、8.19 MBの自動ダウンロードとして提供されます。
Link to this sectionMedical Pills データセットを使用して、YOLO26 モデルをどのようにトレーニングできますか?#
提供されているPythonまたはCLIメソッドを使用して、画像サイズ640pxでYOLO26モデルを100エポックトレーニングできます。詳細な手順についてはトレーニング例セクションを参照し、モデルの機能に関する詳細はYOLO26ドキュメントを確認してください。
Link to this sectionAIプロジェクトで Medical Pills データセットを使用するメリットは何ですか?#
このデータセットは錠剤検出の自動化を可能にし、偽造防止、品質保証、および製薬プロセスの最適化に貢献します。また、投薬の安全性とサプライチェーンの効率を向上させることができるAIソリューションを開発するための貴重なリソースとしても役立ちます。
Link to this sectionMedical Pills データセットで推論を実行するにはどうすればよいですか?#
推論は、微調整されたYOLO26モデルを使用してPythonまたはCLIメソッドで実行できます。コードスニペットについては推論例セクションを参照し、追加のオプションについては予測モードのドキュメントを参照してください。
Link to this sectionMedical Pills データセットの YAML 設定ファイルはどこで入手できますか?#
YAMLファイルは medical-pills.yaml で入手でき、このデータセットでモデルをトレーニングするために必要なデータセットパス、クラス、および追加の設定詳細が含まれています。