-
Notifications
You must be signed in to change notification settings - Fork 268
Add notice to notebook about running on linux #2163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
samfreund
merged 6 commits into
PhotonVision:main
from
boomermath:rknn-conversion-notebook-linux-note
Nov 2, 2025
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
903be7c
Add notice to notebook about running on linux
boomermath a011104
Add note in PV docs about OPI notebook only running on Linux
boomermath 249babf
Add note in PV docs about Kaggle
boomermath b084ef6
Edit notes/docs about Kaggle support
boomermath a3c7bb9
Edit quotes
boomermath a766d0e
Add venv rubik conversion note
boomermath File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,82 +1,84 @@ | ||
| { | ||
| "cells": [ | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": { | ||
| "id": "1tMAqVl4p58r" | ||
| }, | ||
| "source": [ | ||
| "## YOLO to Rubik TFlite Conversion" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": { | ||
| "id": "nAbygyUYp58s" | ||
| }, | ||
| "source": [ | ||
| "#### Requirements\n", | ||
| "\n", | ||
| "This notebook can be run on Colab. However, Colab has some incompatibility issues that result in needing to restart the notebook in the middle of the run. This is normal, and after restarting you should rerun the below cell.\n", | ||
| "\n", | ||
| "Prior to running the notebook, it is necessary to make an account on [Qualcomm's AI Hub](https://app.aihub.qualcomm.com/account/), and obtain your API token. Then, replace <YOUR_API_TOKEN> with your API token in the cell below.\n", | ||
| "\n", | ||
| "Documentation for the Qualcomm AI Hub can be found [here](https://app.aihub.qualcomm.com/docs/index.html).\n", | ||
| "\n", | ||
| "You should also have a PyTorch model (ending in `.pt`) that's been uploaded to the runtime that you intend to convert. After uploading, copy it's absolute path by right-clicking on the file, and replace /PATH/TO/WEIGHTS.\n", | ||
| "\n", | ||
| "**NOTE: your API key will be listed in the output, and should therefore be redacted if the output is shared.**\n", | ||
| "\n", | ||
| "Once the run has finished, open the AI Hub link, and download the tflite model for the job you just ran.\n", | ||
| "\n", | ||
| "If you want to use this notebook to convert a yolo11 model, you'll need to replace all instances of `yolov8` in the cell below with `yolov11`." | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": null, | ||
| "metadata": { | ||
| "colab": { | ||
| "base_uri": "https://localhost:8080/", | ||
| "height": 1000 | ||
| }, | ||
| "id": "aX3JcSFKp58s", | ||
| "outputId": "f2cdadd2-c448-4d8c-c681-c19decef7f3e" | ||
| }, | ||
| "outputs": [], | ||
| "source": [ | ||
| "# This installs Python package\n", | ||
| "!pip install qai-hub-models[yolov8_det]\n", | ||
| "# sets up AI Hub enviroment\n", | ||
| "!qai-hub configure --api_token <YOUR_API_TOKEN>\n", | ||
| "# Converts the model to be ran on RB3Gen2\n", | ||
| "!yes | python -m qai_hub_models.models.yolov8_det.export --quantize w8a8 --device=\"RB3 Gen 2 (Proxy)\" --ckpt-name /PATH/TO/WEIGHTS --device-os linux --target-runtime tflite --output-dir .\n" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": { | ||
| "id": "0I2cXQO4p58s" | ||
| }, | ||
| "source": [ | ||
| "Modified from https://github.com/ramalamadingdong/yolo-rb3gen2-trainer/blob/main/AI_Hub_Quanitization_RB3Gen2.ipynb" | ||
| ] | ||
| } | ||
| ], | ||
| "metadata": { | ||
| "cells": [ | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": { | ||
| "id": "1tMAqVl4p58r" | ||
| }, | ||
| "source": [ | ||
| "## YOLO to Rubik TFlite Conversion" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": { | ||
| "id": "nAbygyUYp58s" | ||
| }, | ||
| "source": [ | ||
| "#### Requirements\n", | ||
| "\n", | ||
| "This notebook can be run on Colab. However, Colab has some incompatibility issues that result in needing to restart the notebook in the middle of the run. This is normal, and after restarting you should rerun the below cell.\n", | ||
| "\n", | ||
| "If you aren't using Google Colab, we recommend creating a [Python venv](https://docs.python.org/3/library/venv.html) so that the packages installed for conversion do not conflict with your existing setup.\n", | ||
| "\n", | ||
| "Prior to running the notebook, it is necessary to make an account on [Qualcomm's AI Hub](https://app.aihub.qualcomm.com/account/), and obtain your API token. Then, replace <YOUR_API_TOKEN> with your API token in the cell below.\n", | ||
| "\n", | ||
| "Documentation for the Qualcomm AI Hub can be found [here](https://app.aihub.qualcomm.com/docs/index.html).\n", | ||
| "\n", | ||
| "You should also have a PyTorch model (ending in `.pt`) that's been uploaded to the runtime that you intend to convert. After uploading, copy it's absolute path by right-clicking on the file, and replace /PATH/TO/WEIGHTS.\n", | ||
| "\n", | ||
| "**NOTE: your API key will be listed in the output, and should therefore be redacted if the output is shared.**\n", | ||
| "\n", | ||
| "Once the run has finished, open the AI Hub link, and download the tflite model for the job you just ran.\n", | ||
| "\n", | ||
| "If you want to use this notebook to convert a yolo11 model, you'll need to replace all instances of `yolov8` in the cell below with `yolov11`." | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": null, | ||
| "metadata": { | ||
| "colab": { | ||
| "provenance": [] | ||
| }, | ||
| "kernelspec": { | ||
| "display_name": "Python 3", | ||
| "language": "python", | ||
| "name": "python3" | ||
| "base_uri": "https://localhost:8080/", | ||
| "height": 1000 | ||
| }, | ||
| "language_info": { | ||
| "name": "python", | ||
| "version": "3.11.7" | ||
| } | ||
| "id": "aX3JcSFKp58s", | ||
| "outputId": "f2cdadd2-c448-4d8c-c681-c19decef7f3e" | ||
| }, | ||
| "outputs": [], | ||
| "source": [ | ||
| "# This installs Python package\n", | ||
| "!pip install qai-hub-models[yolov8_det]\n", | ||
| "# sets up AI Hub enviroment\n", | ||
| "!qai-hub configure --api_token <YOUR_API_TOKEN>\n", | ||
| "# Converts the model to be ran on RB3Gen2\n", | ||
| "!yes | python -m qai_hub_models.models.yolov8_det.export --quantize w8a8 --device=\"RB3 Gen 2 (Proxy)\" --ckpt-name /PATH/TO/WEIGHTS --device-os linux --target-runtime tflite --output-dir .\n" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": { | ||
| "id": "0I2cXQO4p58s" | ||
| }, | ||
| "source": [ | ||
| "Modified from https://github.com/ramalamadingdong/yolo-rb3gen2-trainer/blob/main/AI_Hub_Quanitization_RB3Gen2.ipynb" | ||
| ] | ||
| } | ||
| ], | ||
| "metadata": { | ||
| "colab": { | ||
| "provenance": [] | ||
| }, | ||
| "kernelspec": { | ||
| "display_name": "Python 3", | ||
| "language": "python", | ||
| "name": "python3" | ||
| }, | ||
| "nbformat": 4, | ||
| "nbformat_minor": 0 | ||
| "language_info": { | ||
| "name": "python", | ||
| "version": "3.11.7" | ||
| } | ||
| }, | ||
| "nbformat": 4, | ||
| "nbformat_minor": 0 | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.