ultralytics 8.0.177 add https://youtube.com/ultralytics videos to Docs (#4875)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Muhammad Rizwan Munawar <62513924+RizwanMunawar@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
e73447effb
commit
dd2262e89a
30 changed files with 453 additions and 161 deletions
|
|
@ -11,10 +11,17 @@
|
|||
|
||||
## Step 1: Install the Required Libraries
|
||||
|
||||
Clone the repository and install the dependencies:
|
||||
Clone the repository, install dependencies and `cd` to this local directory for commands in Step 2.
|
||||
|
||||
```bash
|
||||
# Clone ultralytics repo
|
||||
git clone https://github.com/ultralytics/ultralytics
|
||||
|
||||
# Install dependencies
|
||||
pip install sahi ultralytics
|
||||
|
||||
# cd to local directory
|
||||
cd ultralytics/examples/YOLOv8-SAHI-Inference-Video
|
||||
```
|
||||
|
||||
## Step 2: Run the Inference with SAHI using Ultralytics YOLOv8
|
||||
|
|
|
|||
|
|
@ -21,6 +21,10 @@ def run(weights='yolov8n.pt', source='test.mp4', view_img=False, save_img=False,
|
|||
exist_ok (bool): Overwrite existing files.
|
||||
"""
|
||||
|
||||
# Check source path
|
||||
if not Path(source).exists():
|
||||
raise FileNotFoundError(f"Source path '{source}' does not exist.")
|
||||
|
||||
yolov8_model_path = f'models/{weights}'
|
||||
download_yolov8s_model(yolov8_model_path)
|
||||
detection_model = AutoDetectionModel.from_pretrained(model_type='yolov8',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue