{ "cells": [ { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "from ultralyticsplus import YOLO, render_result\n", "import cv2" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Downloading https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt to 'yolov8n.pt'...\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "100%|██████████| 6.23M/6.23M [00:00<00:00, 40.2MB/s]\n" ] } ], "source": [ "# load model\n", "model = YOLO('nakamura196/yolov8s-layout-detection')\n", "\n", "# set model parameters\n", "model.overrides['conf'] = 0.25 # NMS confidence threshold\n", "model.overrides['iou'] = 0.45 # NMS IoU threshold\n", "model.overrides['agnostic_nms'] = False # NMS class-agnostic\n", "model.overrides['max_det'] = 1000 # maximum number of detections per image" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.11" } }, "nbformat": 4, "nbformat_minor": 2 }