Add colab template and minor fixes (#137)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,6 +1,16 @@
|
||||
# Welcome to Ultralytics YOLO
|
||||
<div align="center">
|
||||
<a href="https://ultralytics.com/yolov5" target="_blank">
|
||||
<img width="1024" src="https://user-images.githubusercontent.com/26833433/210431393-39c997b8-92a7-4957-864f-1f312004eb54.png"></a>
|
||||
<br>
|
||||
<a href="https://bit.ly/yolov5-paperspace-notebook"><img src="https://assets.paperspace.io/img/gradient-badge.svg" alt="Run on Gradient"></a>
|
||||
<a href="https://colab.research.google.com/github/glenn-jocher/glenn-jocher.github.io/blob/main/tutorial.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>
|
||||
<a href="https://www.kaggle.com/ultralytics/yolov5"><img src="https://kaggle.com/static/images/open-in-kaggle.svg" alt="Open In Kaggle"></a>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
Welcome to the Ultralytics YOLO documentation landing page! Ultralytics YOLOv8 is the latest version of the YOLO (You
|
||||
# Welcome to Ultralytics YOLOv8
|
||||
|
||||
Welcome to the Ultralytics YOLOv8 documentation landing page! Ultralytics YOLOv8 is the latest version of the YOLO (You
|
||||
Only Look Once) object detection and image segmentation model developed by Ultralytics. This page serves as the starting
|
||||
point for exploring the various resources available to help you get started with YOLOv8 and understand its features and
|
||||
capabilities.
|
||||
|
@ -47,7 +47,7 @@ dnn: False # use OpenCV DNN for ONNX inference
|
||||
plots: True # show plots during training
|
||||
|
||||
# Prediction settings --------------------------------------------------------------------------------------------------
|
||||
source: "ultralytics/assets" # source directory for images or videos
|
||||
source: null # source directory for images or videos
|
||||
show: False # show results if possible
|
||||
save_txt: False # save results as .txt file
|
||||
save_conf: False # save results with confidence scores
|
||||
|
@ -224,4 +224,5 @@ class YOLO:
|
||||
args.pop("device", None)
|
||||
args.pop("project", None)
|
||||
args.pop("name", None)
|
||||
args.pop("batch_size", None)
|
||||
args.pop("batch", None)
|
||||
args.pop("epochs", None)
|
||||
|
@ -2,7 +2,7 @@ import hydra
|
||||
import torch
|
||||
|
||||
from ultralytics.yolo.engine.predictor import BasePredictor
|
||||
from ultralytics.yolo.utils import DEFAULT_CONFIG, ops
|
||||
from ultralytics.yolo.utils import DEFAULT_CONFIG, ROOT, ops
|
||||
from ultralytics.yolo.utils.checks import check_imgsz
|
||||
from ultralytics.yolo.utils.plotting import Annotator, colors, save_one_box
|
||||
|
||||
@ -83,8 +83,9 @@ class DetectionPredictor(BasePredictor):
|
||||
|
||||
@hydra.main(version_base=None, config_path=str(DEFAULT_CONFIG.parent), config_name=DEFAULT_CONFIG.name)
|
||||
def predict(cfg):
|
||||
cfg.model = cfg.model or "n.pt"
|
||||
cfg.model = cfg.model or "yolov8n.pt"
|
||||
cfg.imgsz = check_imgsz(cfg.imgsz, min_dim=2) # check image size
|
||||
cfg.source = cfg.source or ROOT / "assets"
|
||||
predictor = DetectionPredictor(cfg)
|
||||
predictor()
|
||||
|
||||
|
Reference in New Issue
Block a user