diff --git a/.gitignore b/.gitignore index f99e12a8..7c148445 100644 --- a/.gitignore +++ b/.gitignore @@ -159,3 +159,6 @@ pnnx* # Autogenerated files for tests /ultralytics/assets/ + +# datasets +yolov10-datasets/ diff --git a/README.md b/README.md index 458d101d..12e878de 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,23 @@ yolo settings datasets_dir=. 事前学習済みモデルとして`yolov10x.pt`を使用するので、[公式GitHubのリリース](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10x.pt)からダウンロードして`weights`ディレクトリに配置してください。 -また、学習に使用するデータセットは[`datasets/README.md`](./datasets/README.md)に従い、`datasets`ディレクトリに配置してください。 +学習に使用するデータセットはRoboflowというサービスを使用して作成しています。 + +学習や評価に使用するデータセットは、 + +- [サトウキビ](https://universe.roboflow.com/hoku/sugarcane-3vhxz/dataset/11) +- [パイナップル](https://universe.roboflow.com/hoku/pineapple-thsih/dataset/7) + +にありますが、手動でダウンロードするのは面倒なので`huggingface`にdatasetsをまとめてあります。 + +下記コマンドを実行して、datasetsをダウンロードしてください。 + +```bash +# Make sure you have git-lfs installed (https://git-lfs.com) +git lfs install + +git clone https://huggingface.co/datasets/TechC-SugarCane/yolov10-datasets +``` 学習後の結果は`runs/detect/`に保存されます。 @@ -100,10 +116,10 @@ yolo settings datasets_dir=. ```bash # sugarcane -yolo detect train cfg='cfg/sugarcane.yaml' data=datasets/sugarcane/data.yaml model=weights/yolov10x.pt name='yolov10x-sugarcane' epochs=300 batch=16 imgsz=640 device=0 +yolo detect train cfg='cfg/sugarcane.yaml' data=yolov10-datasets/sugarcane/data.yaml model=weights/yolov10x.pt name='yolov10x-sugarcane' epochs=300 batch=16 imgsz=640 device=0 # pineapple -yolo detect train cfg='cfg/pineapple.yaml' data=datasets/pineapple/data.yaml model=weights/yolov10x.pt name='yolov10x-pineapple' epochs=300 batch=16 imgsz=640 device=0 +yolo detect train cfg='cfg/pineapple.yaml' data=yolov10-datasets/pineapple/data.yaml model=weights/yolov10x.pt name='yolov10x-pineapple' epochs=300 batch=16 imgsz=640 device=0 ``` ※ 上記を実行すると`yolov8n.pt`がダウンロードされますが、AMPというものの確認用に追加されているだけらしいので気にしなくて大丈夫です。 diff --git a/datasets/.gitignore b/datasets/.gitignore deleted file mode 100644 index 116719a0..00000000 --- a/datasets/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# 全てのファイルを除外 -*/* - -# 例外 -!.gitignore -!README.md -!**/data.yaml -!**/README*.txt diff --git a/datasets/README.md b/datasets/README.md deleted file mode 100644 index ad9705f2..00000000 --- a/datasets/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# カスタムデータセット - -Roboflowというサービスを使用してデーターセットを作成しています。 - -学習や評価に使用するデータセットは、 - -- [サトウキビ](https://universe.roboflow.com/hoku/sugarcane-3vhxz/dataset/11) -- [パイナップル](https://universe.roboflow.com/hoku/pineapple-thsih/dataset/7) - -から`YOLO v8`形式でダウンロードし、下記を参考に`train`, `valid`, `test`を各ディレクトリに配置してください。 - -## ディレクトリ構造 - -```plaintext -datasets/ - .gitignore - README.md - sugarcane/ - data.yaml - README.dataset.txt - README.roboflow.txt - train/ - images/ - ... - labels/ - ... - valid/ - images/ - ... - labels/ - ... - test/ - images/ - ... - labels/ - ... - pineapple/ - data.yaml - README.dataset.txt - README.roboflow.txt - train/ - images/ - ... - labels/ - ... - valid/ - images/ - ... - labels/ - ... - test/ - images/ - ... - labels/ - ... -``` diff --git a/datasets/pineapple/README.dataset.txt b/datasets/pineapple/README.dataset.txt deleted file mode 100644 index 39eccf2d..00000000 --- a/datasets/pineapple/README.dataset.txt +++ /dev/null @@ -1,6 +0,0 @@ -# Pineapple > 2023-07-19 9:57am -https://universe.roboflow.com/hoku/pineapple-thsih - -Provided by a Roboflow user -License: MIT - diff --git a/datasets/pineapple/README.roboflow.txt b/datasets/pineapple/README.roboflow.txt deleted file mode 100644 index 1e88fe1d..00000000 --- a/datasets/pineapple/README.roboflow.txt +++ /dev/null @@ -1,27 +0,0 @@ - -Pineapple - v7 2023-07-19 9:57am -============================== - -This dataset was exported via roboflow.com on July 31, 2024 at 3:58 PM GMT - -Roboflow is an end-to-end computer vision platform that helps you -* collaborate with your team on computer vision projects -* collect & organize images -* understand and search unstructured image data -* annotate, and create datasets -* export, train, and deploy computer vision models -* use active learning to improve your dataset over time - -For state of the art Computer Vision training notebooks you can use with this dataset, -visit https://github.com/roboflow/notebooks - -To find over 100k other datasets and pre-trained models, visit https://universe.roboflow.com - -The dataset includes 619 images. -Pineapple are annotated in YOLOv8 format. - -The following pre-processing was applied to each image: - -No image augmentation techniques were applied. - - diff --git a/datasets/pineapple/data.yaml b/datasets/pineapple/data.yaml deleted file mode 100644 index 9860cb24..00000000 --- a/datasets/pineapple/data.yaml +++ /dev/null @@ -1,14 +0,0 @@ -path: datasets/sugarcane # dataset root dir -train: train/images -val: valid/images -test: test/images - -nc: 2 -names: ['pineapple', 'weed'] - -roboflow: - workspace: hoku - project: pineapple-thsih - version: 7 - license: MIT - url: https://universe.roboflow.com/hoku/pineapple-thsih/dataset/7 diff --git a/datasets/sugarcane/README.dataset.txt b/datasets/sugarcane/README.dataset.txt deleted file mode 100644 index beaa3ab7..00000000 --- a/datasets/sugarcane/README.dataset.txt +++ /dev/null @@ -1,6 +0,0 @@ -# sugarcane > 2023-07-19 9:58am -https://universe.roboflow.com/hoku/sugarcane-3vhxz - -Provided by a Roboflow user -License: CC BY 4.0 - diff --git a/datasets/sugarcane/README.roboflow.txt b/datasets/sugarcane/README.roboflow.txt deleted file mode 100644 index 2a8c9dc2..00000000 --- a/datasets/sugarcane/README.roboflow.txt +++ /dev/null @@ -1,27 +0,0 @@ - -sugarcane - v11 2023-07-19 9:58am -============================== - -This dataset was exported via roboflow.com on July 9, 2024 at 5:16 AM GMT - -Roboflow is an end-to-end computer vision platform that helps you -* collaborate with your team on computer vision projects -* collect & organize images -* understand and search unstructured image data -* annotate, and create datasets -* export, train, and deploy computer vision models -* use active learning to improve your dataset over time - -For state of the art Computer Vision training notebooks you can use with this dataset, -visit https://github.com/roboflow/notebooks - -To find over 100k other datasets and pre-trained models, visit https://universe.roboflow.com - -The dataset includes 811 images. -Sugarcane are annotated in YOLOv8 format. - -The following pre-processing was applied to each image: - -No image augmentation techniques were applied. - - diff --git a/datasets/sugarcane/data.yaml b/datasets/sugarcane/data.yaml deleted file mode 100644 index a82f2cb1..00000000 --- a/datasets/sugarcane/data.yaml +++ /dev/null @@ -1,14 +0,0 @@ -path: datasets/sugarcane # dataset root dir -train: train/images -val: valid/images -test: test/images - -nc: 2 -names: ['sugarcane', 'weed'] - -roboflow: - workspace: hoku - project: sugarcane-3vhxz - version: 11 - license: CC BY 4.0 - url: https://universe.roboflow.com/hoku/sugarcane-3vhxz/dataset/11