From e3adcbeec19a53a861928e8e7fd18de8d950d3f0 Mon Sep 17 00:00:00 2001 From: Nick Herrig Date: Thu, 8 Feb 2024 15:30:32 -0500 Subject: [PATCH] Move cookbooks to new webpage and configure html file --- ...to-detect-objects-in-a-specific-zone.ipynb | 0 ...pervision-assets-for-experimentation.ipynb | 104 ------------------ ...w-to-utilize-oriented-bounding-boxes.ipynb | 0 ...to-display-bounding-boxes-on-a-video.ipynb | 0 docs/theme/cookbooks.html | 3 +- 5 files changed, 2 insertions(+), 105 deletions(-) delete mode 100644 cookbooks/how-to-detect-objects-in-a-specific-zone.ipynb delete mode 100644 cookbooks/how-to-use-supervision-assets-for-experimentation.ipynb delete mode 100644 cookbooks/how-to-utilize-oriented-bounding-boxes.ipynb rename {cookbooks => docs/notebooks}/how-to-display-bounding-boxes-on-a-video.ipynb (100%) diff --git a/cookbooks/how-to-detect-objects-in-a-specific-zone.ipynb b/cookbooks/how-to-detect-objects-in-a-specific-zone.ipynb deleted file mode 100644 index e69de29b..00000000 diff --git a/cookbooks/how-to-use-supervision-assets-for-experimentation.ipynb b/cookbooks/how-to-use-supervision-assets-for-experimentation.ipynb deleted file mode 100644 index 37a2e6f3..00000000 --- a/cookbooks/how-to-use-supervision-assets-for-experimentation.ipynb +++ /dev/null @@ -1,104 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# How To Use Supervision Assets for Experimentation\n", - "\n", - "When experimenting with interesting and useful features of the Supervision package, its important to have some sort of image or video data to experiment with. Luckily for us, Supervision ships with [Assets](https://supervision.roboflow.com/latest/assets/)! Assets is a collection of videos that you can utilize to start experimenting with the various features Supervision has to offer. Let's take a look at how to use this resource.\n", - "\n", - "## Installation Methods\n", - "\n", - "To start utilizing assets let's install them with pip.\n", - "\n", - "### Install with pip\n", - "\n", - "To install the assets with pip, let's first create a virtual enviornment. It's generally a best practice to create a virtual environment so that your projects deppendencies are isolated. Let's create one below and source it. " - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "vscode": { - "languageId": "shellscript" - } - }, - "outputs": [], - "source": [ - "#!/bin/bash\n", - "!python -m venv venv\n", - "!source venv/bin/activate" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now that we've got a virtual enviornment installed and sourced, let's install the pip package with the assets \"extra\" package." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "vscode": { - "languageId": "shellscript" - } - }, - "outputs": [], - "source": [ - "!pip install \"supervision[assets]\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "From here we can download and utilize a video asset directly from a python script! Note below that we're utilizing the method `download_assets` to download the `VideoAssets.SUBWAY` video to our local directory. This method returns the file path, so we can then utilize this path for additional experimentation. Let's use the `Video` method from `Ipython.display` to show the video in our notebook." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from supervision.assets import download_assets, VideoAssets\n", - "from IPython.display import Video\n", - "\n", - "path_to_video = download_assets(VideoAssets.SUBWAY)\n", - "Video(path_to_video)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "We're now equipted with a video asset from Supervision to run some experiements! For more information on availble video assets, visit the [Supervision API Reference](https://supervision.roboflow.com/latest/assets/#videoassets). Happy building!" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "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.11.7" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/cookbooks/how-to-utilize-oriented-bounding-boxes.ipynb b/cookbooks/how-to-utilize-oriented-bounding-boxes.ipynb deleted file mode 100644 index e69de29b..00000000 diff --git a/cookbooks/how-to-display-bounding-boxes-on-a-video.ipynb b/docs/notebooks/how-to-display-bounding-boxes-on-a-video.ipynb similarity index 100% rename from cookbooks/how-to-display-bounding-boxes-on-a-video.ipynb rename to docs/notebooks/how-to-display-bounding-boxes-on-a-video.ipynb diff --git a/docs/theme/cookbooks.html b/docs/theme/cookbooks.html index 3ebf1344..430a8cc8 100644 --- a/docs/theme/cookbooks.html +++ b/docs/theme/cookbooks.html @@ -12,7 +12,8 @@

-

+

+