Created using Colaboratory

single_channel
Glenn Jocher 2 years ago
parent d0b616e41e
commit 9552827157

@ -57,9 +57,10 @@
"metadata": { "metadata": {
"id": "wbvMlHd_QwMG", "id": "wbvMlHd_QwMG",
"colab": { "colab": {
"base_uri": "https://localhost:8080/" "base_uri": "https://localhost:8080/",
"height": 1000
}, },
"outputId": "d7b7b0a6-6a29-4e6d-e404-8d67d2be86e2" "outputId": "19bbf989-d9fa-419d-8948-aaba39db8ddb"
}, },
"source": [ "source": [
"# Pip install method (recommended)\n", "# Pip install method (recommended)\n",
@ -67,14 +68,14 @@
"import ultralytics\n", "import ultralytics\n",
"ultralytics.checks()" "ultralytics.checks()"
], ],
"execution_count": null, "execution_count": 1,
"outputs": [ "outputs": [
{ {
"output_type": "stream", "output_type": "stream",
"name": "stderr", "name": "stderr",
"text": [ "text": [
"Ultralytics YOLOv8.0.1 🚀 Python-3.8.16 torch-1.13.0+cu116 CUDA:0 (Tesla T4, 15110MiB)\n", "Ultralytics YOLOv8.0.4 🚀 Python-3.8.16 torch-1.13.1+cu116 CUDA:0 (Tesla T4, 15110MiB)\n",
"Setup complete ✅ (2 CPUs, 12.7 GB RAM, 23.1/78.2 GB disk)\n" "Setup complete ✅ (2 CPUs, 12.7 GB RAM, 23.0/166.8 GB disk)\n"
] ]
} }
] ]
@ -100,7 +101,7 @@
"source": [ "source": [
"# 1. Predict\n", "# 1. Predict\n",
"\n", "\n",
"YOLOv8 may be used directly in the Command Line Interface (CLI) with a `yolo` command. `yolo` can be used for a variety of tasks and modes and accepts additional arguments, i.e. `imgsz=640`. See a full list of available `yolo` [arguments](https://docs.ultralytics.com/config/) in the YOLOv8 [Docs](https://docs.ultralytics.com).\n" "YOLOv8 may be used directly in the Command Line Interface (CLI) with a `yolo` command for a variety of tasks and modes and accepts additional arguments, i.e. `imgsz=640`. See a full list of available `yolo` [arguments](https://docs.ultralytics.com/config/) in the YOLOv8 [Docs](https://docs.ultralytics.com).\n"
] ]
}, },
{ {
@ -154,7 +155,7 @@
}, },
"source": [ "source": [
"# 2. Val\n", "# 2. Val\n",
"Validate a model's accuracy on the [COCO](https://cocodataset.org/#home) dataset's `val` or `test` splits. The latest YOLOv8 [models](https://github.com/ultralytics/ultralytics/releases) are downloaded automatically the first time they are used." "Validate a model's accuracy on the [COCO](https://cocodataset.org/#home) dataset's `val` or `test` splits. The latest YOLOv8 [models](https://github.com/ultralytics/ultralytics#models) are downloaded automatically the first time they are used."
] ]
}, },
{ {
@ -290,7 +291,7 @@
"\n", "\n",
"<p align=\"\"><a href=\"https://roboflow.com/?ref=ultralytics\"><img width=\"1000\" src=\"https://github.com/ultralytics/assets/raw/main/yolov8/banner-integrations.png\"/></a></p>\n", "<p align=\"\"><a href=\"https://roboflow.com/?ref=ultralytics\"><img width=\"1000\" src=\"https://github.com/ultralytics/assets/raw/main/yolov8/banner-integrations.png\"/></a></p>\n",
"\n", "\n",
"Train YOLOv8 on detection, segmentation and classification datasets." "Train YOLOv8 on [Detection](https://docs.ultralytics.com/tasks/detection/), [Segmentation](https://docs.ultralytics.com/tasks/detection/) and [Classification](https://docs.ultralytics.com/tasks/detection/) datasets."
] ]
}, },
{ {
@ -461,20 +462,22 @@
"\n", "\n",
"Export a YOLOv8 model to any supported format with the `format` argument, i.e. `format=onnx`.\n", "Export a YOLOv8 model to any supported format with the `format` argument, i.e. `format=onnx`.\n",
"\n", "\n",
"Format | `format=...**bold text**` | Model\n", "\n",
"--- | --- | ---\n", "| Format | `format=` | Model |\n",
"PyTorch | - | yolov8n.pt\n", "|----------------------------------------------------------------------------|--------------------|---------------------------|\n",
"TorchScript | `torchscript` | yolov8n.torchscript\n", "| [PyTorch](https://pytorch.org/) | - | `yolov8n.pt` |\n",
"ONNX | `onnx` | yolov8n.onnx\n", "| [TorchScript](https://pytorch.org/docs/stable/jit.html) | `torchscript` | `yolov8n.torchscript` |\n",
"OpenVINO | `openvino` | yolov8n_openvino_model/\n", "| [ONNX](https://onnx.ai/) | `onnx` | `yolov8n.onnx` |\n",
"TensorRT | `engine` | yolov8n.engine\n", "| [OpenVINO](https://docs.openvino.ai/latest/index.html) | `openvino` | `yolov8n_openvino_model/` |\n",
"CoreML | `coreml` | yolov8n.mlmodel\n", "| [TensorRT](https://developer.nvidia.com/tensorrt) | `engine` | `yolov8n.engine` |\n",
"TensorFlow SavedModel | `saved_model` | yolov8n_saved_model/\n", "| [CoreML](https://github.com/apple/coremltools) | `coreml` | `yolov8n.mlmodel` |\n",
"TensorFlow GraphDef | `pb` | yolov8n.pb\n", "| [TensorFlow SavedModel](https://www.tensorflow.org/guide/saved_model) | `saved_model` | `yolov8n_saved_model/` |\n",
"TensorFlow Lite | `tflite` | yolov8n.tflite\n", "| [TensorFlow GraphDef](https://www.tensorflow.org/api_docs/python/tf/Graph) | `pb` | `yolov8n.pb` |\n",
"TensorFlow Edge TPU | `edgetpu` | yolov8n_edgetpu.tflite\n", "| [TensorFlow Lite](https://www.tensorflow.org/lite) | `tflite` | `yolov8n.tflite` |\n",
"TensorFlow.js | `tfjs` | yolov8n_web_model/\n", "| [TensorFlow Edge TPU](https://coral.ai/docs/edgetpu/models-intro/) | `edgetpu` | `yolov8n_edgetpu.tflite` |\n",
"PaddlePaddle | `paddle` | yolov8n_paddle_model/" "| [TensorFlow.js](https://www.tensorflow.org/js) | `tfjs` | `yolov8n_web_model/` |\n",
"| [PaddlePaddle](https://github.com/PaddlePaddle) | `paddle` | `yolov8n_paddle_model/` |\n",
"\n"
], ],
"metadata": { "metadata": {
"id": "nPZZeNrLCQG6" "id": "nPZZeNrLCQG6"
@ -540,7 +543,7 @@
"results = model.train(data='coco128.yaml', epochs=3) # train the model\n", "results = model.train(data='coco128.yaml', epochs=3) # train the model\n",
"results = model.val() # evaluate model performance on the validation set\n", "results = model.val() # evaluate model performance on the validation set\n",
"results = model('https://ultralytics.com/images/bus.jpg') # predict on an image\n", "results = model('https://ultralytics.com/images/bus.jpg') # predict on an image\n",
"success = YOLO('yolov8n.pt').export(format='onnx') # export a model to ONNX format" "success = model.export(format='onnx') # export the model to ONNX format"
], ],
"metadata": { "metadata": {
"id": "bpF9-vS_DAaf" "id": "bpF9-vS_DAaf"
@ -553,7 +556,9 @@
"source": [ "source": [
"# 6. Tasks\n", "# 6. Tasks\n",
"\n", "\n",
"YOLOv8 can train, val, predict and export models for the 3 primary tasks in vision AI: detection, segmentation and classification." "YOLOv8 can train, val, predict and export models for the 3 primary tasks in vision AI: detection, segmentation and classification.\n",
"\n",
"<img width=\"1024\" src=\"https://user-images.githubusercontent.com/26833433/212094133-6bb8c21c-3d47-41df-a512-81c5931054ae.png\">\n"
], ],
"metadata": { "metadata": {
"id": "Phm9ccmOKye5" "id": "Phm9ccmOKye5"
@ -564,7 +569,7 @@
"source": [ "source": [
"## 1. Detection\n", "## 1. Detection\n",
"\n", "\n",
"Detection models have no suffix and are the default YOLOv8 models, i.e. `yolov8n.pt`" "YOLOv8 _detection_ models have no suffix and are the default YOLOv8 models, i.e. `yolov8n.pt` and are pretrained on COCO. See [Detection Docs](https://docs.ultralytics.com/tasks/detection/) for full details.\n"
], ],
"metadata": { "metadata": {
"id": "yq26lwpYK1lq" "id": "yq26lwpYK1lq"
@ -591,7 +596,7 @@
"source": [ "source": [
"## 2. Segmentation\n", "## 2. Segmentation\n",
"\n", "\n",
"Segmentation models use the `-seg` suffix, i.e. `yolov8n-seg.pt`" "YOLOv8 _segmentation_ models use the `-seg` suffix, i.e. `yolov8n-seg.pt` and are pretrained on COCO. See [Segmentation Docs](https://docs.ultralytics.com/tasks/segmentation/) for full details.\n"
], ],
"metadata": { "metadata": {
"id": "7ZW58jUzK66B" "id": "7ZW58jUzK66B"
@ -618,7 +623,7 @@
"source": [ "source": [
"## 3. Classification\n", "## 3. Classification\n",
"\n", "\n",
"Classification models use the `-cls` suffix, i.e. `yolov8n-cls.pt`" "YOLOv8 _classification_ models use the `-cls` suffix, i.e. `yolov8n-cls.pt` and are pretrained on ImageNet. See [Classification Docs](https://docs.ultralytics.com/tasks/detection/) for full details.\n"
], ],
"metadata": { "metadata": {
"id": "ax3p94VNK9zR" "id": "ax3p94VNK9zR"

Loading…
Cancel
Save