File size: 1,211 Bytes
f339471 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Football AI Models - Complete Example\n\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Install requirements\n",
"!pip install inference-gpu supervision"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from inference import get_model\n",
"import supervision as sv\n",
"import os\n\n",
"ROBOFLOW_API_KEY = 'YOUR_API_KEY'\n\n",
"# Initialize models\n",
"player_model = get_model(\n",
" model_id='football-players-detection-3zvbc/11',\n",
" api_key=ROBOFLOW_API_KEY\n",
")\n\n",
"field_model = get_model(\n",
" model_id='football-field-detection-f07vi/14',\n",
" api_key=ROBOFLOW_API_KEY\n",
")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
}
},
"nbformat": 4,
"nbformat_minor": 4
} |