Add cell to export label list

This commit is contained in:
Manuel López Antequera 2025-07-04 21:26:11 +02:00
parent 86a3e31edf
commit 3b0e13bf92

View File

@ -1,5 +1,15 @@
{ {
"cells": [ "cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/mlopezantequera/frigate/blob/dev/notebooks/YOLO_NAS_Pretrained_Export.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
@ -69,11 +79,26 @@
"\n", "\n",
"files.download('yolo_nas_s.onnx')" "files.download('yolo_nas_s.onnx')"
] ]
},
{
"cell_type": "code",
"source": [
"labels = model.get_class_names()\n",
"with open(\"coco-80.txt\", \"w\") as f:\n",
" f.write(\"\\n\".join(labels))\n",
"files.download(\"coco-80.txt\")"
],
"metadata": {
"id": "KEhxK_lzvlqk"
},
"execution_count": null,
"outputs": []
} }
], ],
"metadata": { "metadata": {
"colab": { "colab": {
"provenance": [] "provenance": [],
"include_colab_link": true
}, },
"kernelspec": { "kernelspec": {
"display_name": "Python 3", "display_name": "Python 3",
@ -85,4 +110,4 @@
}, },
"nbformat": 4, "nbformat": 4,
"nbformat_minor": 0 "nbformat_minor": 0
} }