{"cells":[{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":3966,"status":"ok","timestamp":1683282908185,"user":{"displayName":"Deshpande Ms. Gauri Harish --","userId":"01361348429335733319"},"user_tz":-330},"id":"-E7HJfGWXpsX","outputId":"ce101e7c-0879-4b3a-d9ea-4dc3822178fe"},"outputs":[{"output_type":"stream","name":"stdout","text":["Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n"]}],"source":["from google.colab import drive\n","drive.mount('/content/drive')"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":633,"status":"ok","timestamp":1683282914065,"user":{"displayName":"Deshpande Ms. Gauri Harish --","userId":"01361348429335733319"},"user_tz":-330},"id":"JGJspIl90XhV","outputId":"c1b677b7-1b61-40d3-cc2b-67e12fb9bc37"},"outputs":[{"output_type":"stream","name":"stdout","text":["Fri May 5 10:35:14 2023 \n","+-----------------------------------------------------------------------------+\n","| NVIDIA-SMI 525.85.12 Driver Version: 525.85.12 CUDA Version: 12.0 |\n","|-------------------------------+----------------------+----------------------+\n","| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |\n","| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |\n","| | | MIG M. |\n","|===============================+======================+======================|\n","| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |\n","| N/A 40C P8 9W / 70W | 0MiB / 15360MiB | 0% Default |\n","| | | N/A |\n","+-------------------------------+----------------------+----------------------+\n"," \n","+-----------------------------------------------------------------------------+\n","| Processes: |\n","| GPU GI CI PID Type Process name GPU Memory |\n","| ID ID Usage |\n","|=============================================================================|\n","| No running processes found |\n","+-----------------------------------------------------------------------------+\n"]}],"source":["!nvidia-smi"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":5954,"status":"ok","timestamp":1683282924369,"user":{"displayName":"Deshpande Ms. Gauri Harish --","userId":"01361348429335733319"},"user_tz":-330},"id":"nD-uPyQ_2jiN","outputId":"c8e09005-ce9a-464d-bfda-acffbb8bb9b6"},"outputs":[{"output_type":"stream","name":"stdout","text":["Cloning into 'yolov7'...\n","remote: Enumerating objects: 579, done.\u001b[K\n","remote: Total 579 (delta 0), reused 0 (delta 0), pack-reused 579\u001b[K\n","Receiving objects: 100% (579/579), 38.53 MiB | 32.39 MiB/s, done.\n","Resolving deltas: 100% (281/281), done.\n","/content/yolov7\n","Branch 'fix/problems_associated_with_the_latest_versions_of_pytorch_and_numpy' set up to track remote branch 'fix/problems_associated_with_the_latest_versions_of_pytorch_and_numpy' from 'origin'.\n","Switched to a new branch 'fix/problems_associated_with_the_latest_versions_of_pytorch_and_numpy'\n","Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n","Requirement already satisfied: matplotlib>=3.2.2 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 4)) (3.7.1)\n","Requirement already satisfied: numpy>=1.18.5 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 5)) (1.22.4)\n","Requirement already satisfied: opencv-python>=4.1.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 6)) (4.7.0.72)\n","Requirement already satisfied: Pillow>=7.1.2 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 7)) (8.4.0)\n","Requirement already satisfied: PyYAML>=5.3.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 8)) (6.0)\n","Requirement already satisfied: requests>=2.23.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 9)) (2.27.1)\n","Requirement already satisfied: scipy>=1.4.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 10)) (1.10.1)\n","Requirement already satisfied: torch!=1.12.0,>=1.7.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 11)) (2.0.0+cu118)\n","Requirement already satisfied: torchvision!=0.13.0,>=0.8.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 12)) (0.15.1+cu118)\n","Requirement already satisfied: tqdm>=4.41.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 13)) (4.65.0)\n","Requirement already satisfied: protobuf<4.21.3 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 14)) (3.20.3)\n","Requirement already satisfied: tensorboard>=2.4.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 17)) (2.12.2)\n","Requirement already satisfied: pandas>=1.1.4 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 21)) (1.5.3)\n","Requirement already satisfied: seaborn>=0.11.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 22)) (0.12.2)\n","Requirement already satisfied: ipython in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 34)) (7.34.0)\n","Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 35)) (5.9.5)\n","Requirement already satisfied: thop in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 36)) (0.1.1.post2209072238)\n","Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (1.0.7)\n","Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (1.4.4)\n","Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (23.1)\n","Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (3.0.9)\n","Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (0.11.0)\n","Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (4.39.3)\n","Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (2.8.2)\n","Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->-r requirements.txt (line 9)) (2.0.12)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->-r requirements.txt (line 9)) (3.4)\n","Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->-r requirements.txt (line 9)) (1.26.15)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->-r requirements.txt (line 9)) (2022.12.7)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch!=1.12.0,>=1.7.0->-r requirements.txt (line 11)) (3.12.0)\n","Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch!=1.12.0,>=1.7.0->-r requirements.txt (line 11)) (3.1.2)\n","Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch!=1.12.0,>=1.7.0->-r requirements.txt (line 11)) (1.11.1)\n","Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch!=1.12.0,>=1.7.0->-r requirements.txt (line 11)) (2.0.0)\n","Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch!=1.12.0,>=1.7.0->-r requirements.txt (line 11)) (4.5.0)\n","Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch!=1.12.0,>=1.7.0->-r requirements.txt (line 11)) (3.1)\n","Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch!=1.12.0,>=1.7.0->-r requirements.txt (line 11)) (3.25.2)\n","Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch!=1.12.0,>=1.7.0->-r requirements.txt (line 11)) (16.0.2)\n","Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (67.7.2)\n","Requirement already satisfied: google-auth-oauthlib<1.1,>=0.5 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (1.0.0)\n","Requirement already satisfied: absl-py>=0.4 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (1.4.0)\n","Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (1.8.1)\n","Requirement already satisfied: wheel>=0.26 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (0.40.0)\n","Requirement already satisfied: grpcio>=1.48.2 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (1.54.0)\n","Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (0.7.0)\n","Requirement already satisfied: werkzeug>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (2.3.0)\n","Requirement already satisfied: google-auth<3,>=1.6.3 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (2.17.3)\n","Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (3.4.3)\n","Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas>=1.1.4->-r requirements.txt (line 21)) (2022.7.1)\n","Requirement already satisfied: pexpect>4.3 in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 34)) (4.8.0)\n","Requirement already satisfied: jedi>=0.16 in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 34)) (0.18.2)\n","Requirement already satisfied: traitlets>=4.2 in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 34)) (5.7.1)\n","Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 34)) (3.0.38)\n","Requirement already satisfied: matplotlib-inline in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 34)) (0.1.6)\n","Requirement already satisfied: decorator in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 34)) (4.4.2)\n","Requirement already satisfied: pickleshare in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 34)) (0.7.5)\n","Requirement already satisfied: pygments in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 34)) (2.14.0)\n","Requirement already satisfied: backcall in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 34)) (0.2.0)\n","Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r requirements.txt (line 17)) (5.3.0)\n","Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r requirements.txt (line 17)) (0.3.0)\n","Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r requirements.txt (line 17)) (4.9)\n","Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r requirements.txt (line 17)) (1.16.0)\n","Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from google-auth-oauthlib<1.1,>=0.5->tensorboard>=2.4.1->-r requirements.txt (line 17)) (1.3.1)\n","Requirement already satisfied: parso<0.9.0,>=0.8.0 in /usr/local/lib/python3.10/dist-packages (from jedi>=0.16->ipython->-r requirements.txt (line 34)) (0.8.3)\n","Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.10/dist-packages (from pexpect>4.3->ipython->-r requirements.txt (line 34)) (0.7.0)\n","Requirement already satisfied: wcwidth in /usr/local/lib/python3.10/dist-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython->-r requirements.txt (line 34)) (0.2.6)\n","Requirement already satisfied: MarkupSafe>=2.1.1 in /usr/local/lib/python3.10/dist-packages (from werkzeug>=1.0.1->tensorboard>=2.4.1->-r requirements.txt (line 17)) (2.1.2)\n","Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch!=1.12.0,>=1.7.0->-r requirements.txt (line 11)) (1.3.0)\n","Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in /usr/local/lib/python3.10/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r requirements.txt (line 17)) (0.5.0)\n","Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<1.1,>=0.5->tensorboard>=2.4.1->-r requirements.txt (line 17)) (3.2.2)\n"]}],"source":["!git clone https://github.com/SkalskiP/yolov7.git\n","%cd yolov7\n","!git checkout fix/problems_associated_with_the_latest_versions_of_pytorch_and_numpy\n","!pip install -r requirements.txt"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":1000},"executionInfo":{"elapsed":56170,"status":"ok","timestamp":1682254655284,"user":{"displayName":"Aditya","userId":"02056965916683687180"},"user_tz":-330},"id":"ovKgrVN8ygdW","outputId":"ee244866-5ff7-4038-e070-90f3649cf1b0"},"outputs":[{"name":"stdout","output_type":"stream","text":["Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n","Collecting roboflow\n"," Downloading roboflow-1.0.5-py3-none-any.whl (56 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m56.2/56.2 kB\u001b[0m \u001b[31m2.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: opencv-python>=4.1.2 in /usr/local/lib/python3.9/dist-packages (from roboflow) (4.7.0.72)\n","Collecting cycler==0.10.0\n"," Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)\n","Collecting pyparsing==2.4.7\n"," Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.8/67.8 kB\u001b[0m \u001b[31m5.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: chardet==4.0.0 in /usr/local/lib/python3.9/dist-packages (from roboflow) (4.0.0)\n","Collecting idna==2.10\n"," Downloading idna-2.10-py2.py3-none-any.whl (58 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.8/58.8 kB\u001b[0m \u001b[31m7.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hCollecting requests-toolbelt\n"," Downloading requests_toolbelt-0.10.1-py2.py3-none-any.whl (54 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m54.5/54.5 kB\u001b[0m \u001b[31m6.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: certifi==2022.12.7 in /usr/local/lib/python3.9/dist-packages (from roboflow) (2022.12.7)\n","Collecting wget\n"," Downloading wget-3.2.zip (10 kB)\n"," Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n","Requirement already satisfied: PyYAML>=5.3.1 in /usr/local/lib/python3.9/dist-packages (from roboflow) (6.0)\n","Requirement already satisfied: requests in /usr/local/lib/python3.9/dist-packages (from roboflow) (2.27.1)\n","Requirement already satisfied: matplotlib in /usr/local/lib/python3.9/dist-packages (from roboflow) (3.7.1)\n","Requirement already satisfied: urllib3>=1.26.6 in /usr/local/lib/python3.9/dist-packages (from roboflow) (1.26.15)\n","Requirement already satisfied: numpy>=1.18.5 in /usr/local/lib/python3.9/dist-packages (from roboflow) (1.22.4)\n","Requirement already satisfied: python-dateutil in /usr/local/lib/python3.9/dist-packages (from roboflow) (2.8.2)\n","Requirement already satisfied: tqdm>=4.41.0 in /usr/local/lib/python3.9/dist-packages (from roboflow) (4.65.0)\n","Requirement already satisfied: Pillow>=7.1.2 in /usr/local/lib/python3.9/dist-packages (from roboflow) (8.4.0)\n","Requirement already satisfied: six in /usr/local/lib/python3.9/dist-packages (from roboflow) (1.16.0)\n","Requirement already satisfied: kiwisolver>=1.3.1 in /usr/local/lib/python3.9/dist-packages (from roboflow) (1.4.4)\n","Collecting python-dotenv\n"," Downloading python_dotenv-1.0.0-py3-none-any.whl (19 kB)\n","Requirement already satisfied: importlib-resources>=3.2.0 in /usr/local/lib/python3.9/dist-packages (from matplotlib->roboflow) (5.12.0)\n","Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.9/dist-packages (from matplotlib->roboflow) (1.0.7)\n","Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.9/dist-packages (from matplotlib->roboflow) (4.39.3)\n","Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.9/dist-packages (from matplotlib->roboflow) (23.1)\n","Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.9/dist-packages (from requests->roboflow) (2.0.12)\n","Requirement already satisfied: zipp>=3.1.0 in /usr/local/lib/python3.9/dist-packages (from importlib-resources>=3.2.0->matplotlib->roboflow) (3.15.0)\n","Building wheels for collected packages: wget\n"," Building wheel for wget (setup.py) ... \u001b[?25l\u001b[?25hdone\n"," Created wheel for wget: filename=wget-3.2-py3-none-any.whl size=9676 sha256=fb7c73dc6b1d2ea0c0d18e8468b05b690d18cc58ab223d50609f6ab21f90c98d\n"," Stored in directory: /root/.cache/pip/wheels/04/5f/3e/46cc37c5d698415694d83f607f833f83f0149e49b3af9d0f38\n","Successfully built wget\n","Installing collected packages: wget, python-dotenv, pyparsing, idna, cycler, requests-toolbelt, roboflow\n"," Attempting uninstall: pyparsing\n"," Found existing installation: pyparsing 3.0.9\n"," Uninstalling pyparsing-3.0.9:\n"," Successfully uninstalled pyparsing-3.0.9\n"," Attempting uninstall: idna\n"," Found existing installation: idna 3.4\n"," Uninstalling idna-3.4:\n"," Successfully uninstalled idna-3.4\n"," Attempting uninstall: cycler\n"," Found existing installation: cycler 0.11.0\n"," Uninstalling cycler-0.11.0:\n"," Successfully uninstalled cycler-0.11.0\n","Successfully installed cycler-0.10.0 idna-2.10 pyparsing-2.4.7 python-dotenv-1.0.0 requests-toolbelt-0.10.1 roboflow-1.0.5 wget-3.2\n"]},{"data":{"application/vnd.colab-display-data+json":{"pip_warning":{"packages":["cycler","pyparsing"]}}},"metadata":{},"output_type":"display_data"},{"name":"stdout","output_type":"stream","text":["loading Roboflow workspace...\n","loading Roboflow project...\n","Downloading Dataset Version Zip in fish-pYTORCH-11 to yolov7pytorch: 100% [181781981 / 181781981] bytes\n"]},{"name":"stderr","output_type":"stream","text":["Extracting Dataset Version Zip to fish-pYTORCH-11 in yolov7pytorch:: 100%|██████████| 5962/5962 [00:02<00:00, 2706.68it/s]\n"]}],"source":["# downloading dataset from roboflow\n","\n","!pip install roboflow\n","\n","from roboflow import Roboflow\n","rf = Roboflow(api_key=\"13lan6RXdL1vpsbFUM8L\")\n","project = rf.workspace(\"daniel-5cnur\").project(\"fish-pytorch\")\n","dataset = project.version(11).download(\"yolov7\")"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":1038,"status":"ok","timestamp":1683282975269,"user":{"displayName":"Deshpande Ms. Gauri Harish --","userId":"01361348429335733319"},"user_tz":-330},"id":"bUbmy674bhpD","outputId":"9e1557c3-21e4-43a1-e27c-3ed095d9f064"},"outputs":[{"output_type":"stream","name":"stdout","text":["/content/yolov7\n","--2023-05-05 10:36:15-- https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7_training.pt\n","Resolving github.com (github.com)... 140.82.112.4\n","Connecting to github.com (github.com)|140.82.112.4|:443... connected.\n","HTTP request sent, awaiting response... 302 Found\n","Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/511187726/13e046d1-f7f0-43ab-910b-480613181b1f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230505%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230505T103615Z&X-Amz-Expires=300&X-Amz-Signature=12ac614d1959b736702dd3e887956ee0236c76df66d05ee703683debb26358e2&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=511187726&response-content-disposition=attachment%3B%20filename%3Dyolov7_training.pt&response-content-type=application%2Foctet-stream [following]\n","--2023-05-05 10:36:15-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/511187726/13e046d1-f7f0-43ab-910b-480613181b1f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230505%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230505T103615Z&X-Amz-Expires=300&X-Amz-Signature=12ac614d1959b736702dd3e887956ee0236c76df66d05ee703683debb26358e2&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=511187726&response-content-disposition=attachment%3B%20filename%3Dyolov7_training.pt&response-content-type=application%2Foctet-stream\n","Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...\n","Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.\n","HTTP request sent, awaiting response... 200 OK\n","Length: 75628875 (72M) [application/octet-stream]\n","Saving to: ‘yolov7_training.pt’\n","\n","yolov7_training.pt 100%[===================>] 72.12M 217MB/s in 0.3s \n","\n","2023-05-05 10:36:16 (217 MB/s) - ‘yolov7_training.pt’ saved [75628875/75628875]\n","\n"]}],"source":["%cd /content/yolov7\n","!wget https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7_training.pt"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"background_save":true,"base_uri":"https://localhost:8080/"},"id":"1iqOPKjr22mL","outputId":"09aa80d1-6f27-4f7e-91ae-c66c41bf7a87"},"outputs":[{"name":"stdout","output_type":"stream","text":["/content/yolov7\n","2023-04-23 12:57:39.851981: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n","To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n","2023-04-23 12:57:40.936247: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n","YOLOR 🚀 b2a7de9 torch 2.0.0+cu118 CUDA:0 (Tesla T4, 15101.8125MB)\n","\n","Namespace(weights='yolov7_training.pt', cfg='', data='/content/yolov7/fish-pYTORCH-11/data.yaml', hyp='data/hyp.scratch.p5.yaml', epochs=75, batch_size=16, img_size=[640, 640], rect=False, resume=False, nosave=False, notest=False, noautoanchor=False, evolve=False, bucket='', cache_images=False, image_weights=False, device='', multi_scale=False, single_cls=False, adam=False, sync_bn=False, local_rank=-1, workers=8, project='runs/train', entity=None, name='exp', exist_ok=False, quad=False, linear_lr=False, label_smoothing=0.0, upload_dataset=False, bbox_interval=-1, save_period=-1, artifact_alias='latest', freeze=[0], v5_metric=False, world_size=1, global_rank=-1, save_dir='runs/train/exp', total_batch_size=16)\n","\u001b[34m\u001b[1mtensorboard: \u001b[0mStart with 'tensorboard --logdir runs/train', view at http://localhost:6006/\n","\u001b[34m\u001b[1mhyperparameters: \u001b[0mlr0=0.01, lrf=0.1, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.3, cls_pw=1.0, obj=0.7, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.2, scale=0.9, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.15, copy_paste=0.0, paste_in=0.15, loss_ota=1\n","\u001b[34m\u001b[1mwandb: \u001b[0mInstall Weights & Biases for YOLOR logging with 'pip install wandb' (recommended)\n","Overriding model.yaml nc=80 with nc=31\n","\n"," from n params module arguments \n"," 0 -1 1 928 models.common.Conv [3, 32, 3, 1] \n"," 1 -1 1 18560 models.common.Conv [32, 64, 3, 2] \n"," 2 -1 1 36992 models.common.Conv [64, 64, 3, 1] \n"," 3 -1 1 73984 models.common.Conv [64, 128, 3, 2] \n"," 4 -1 1 8320 models.common.Conv [128, 64, 1, 1] \n"," 5 -2 1 8320 models.common.Conv [128, 64, 1, 1] \n"," 6 -1 1 36992 models.common.Conv [64, 64, 3, 1] \n"," 7 -1 1 36992 models.common.Conv [64, 64, 3, 1] \n"," 8 -1 1 36992 models.common.Conv [64, 64, 3, 1] \n"," 9 -1 1 36992 models.common.Conv [64, 64, 3, 1] \n"," 10 [-1, -3, -5, -6] 1 0 models.common.Concat [1] \n"," 11 -1 1 66048 models.common.Conv [256, 256, 1, 1] \n"," 12 -1 1 0 models.common.MP [] \n"," 13 -1 1 33024 models.common.Conv [256, 128, 1, 1] \n"," 14 -3 1 33024 models.common.Conv [256, 128, 1, 1] \n"," 15 -1 1 147712 models.common.Conv [128, 128, 3, 2] \n"," 16 [-1, -3] 1 0 models.common.Concat [1] \n"," 17 -1 1 33024 models.common.Conv [256, 128, 1, 1] \n"," 18 -2 1 33024 models.common.Conv [256, 128, 1, 1] \n"," 19 -1 1 147712 models.common.Conv [128, 128, 3, 1] \n"," 20 -1 1 147712 models.common.Conv [128, 128, 3, 1] \n"," 21 -1 1 147712 models.common.Conv [128, 128, 3, 1] \n"," 22 -1 1 147712 models.common.Conv [128, 128, 3, 1] \n"," 23 [-1, -3, -5, -6] 1 0 models.common.Concat [1] \n"," 24 -1 1 263168 models.common.Conv [512, 512, 1, 1] \n"," 25 -1 1 0 models.common.MP [] \n"," 26 -1 1 131584 models.common.Conv [512, 256, 1, 1] \n"," 27 -3 1 131584 models.common.Conv [512, 256, 1, 1] \n"," 28 -1 1 590336 models.common.Conv [256, 256, 3, 2] \n"," 29 [-1, -3] 1 0 models.common.Concat [1] \n"," 30 -1 1 131584 models.common.Conv [512, 256, 1, 1] \n"," 31 -2 1 131584 models.common.Conv [512, 256, 1, 1] \n"," 32 -1 1 590336 models.common.Conv [256, 256, 3, 1] \n"," 33 -1 1 590336 models.common.Conv [256, 256, 3, 1] \n"," 34 -1 1 590336 models.common.Conv [256, 256, 3, 1] \n"," 35 -1 1 590336 models.common.Conv [256, 256, 3, 1] \n"," 36 [-1, -3, -5, -6] 1 0 models.common.Concat [1] \n"," 37 -1 1 1050624 models.common.Conv [1024, 1024, 1, 1] \n"," 38 -1 1 0 models.common.MP [] \n"," 39 -1 1 525312 models.common.Conv [1024, 512, 1, 1] \n"," 40 -3 1 525312 models.common.Conv [1024, 512, 1, 1] \n"," 41 -1 1 2360320 models.common.Conv [512, 512, 3, 2] \n"," 42 [-1, -3] 1 0 models.common.Concat [1] \n"," 43 -1 1 262656 models.common.Conv [1024, 256, 1, 1] \n"," 44 -2 1 262656 models.common.Conv [1024, 256, 1, 1] \n"," 45 -1 1 590336 models.common.Conv [256, 256, 3, 1] \n"," 46 -1 1 590336 models.common.Conv [256, 256, 3, 1] \n"," 47 -1 1 590336 models.common.Conv [256, 256, 3, 1] \n"," 48 -1 1 590336 models.common.Conv [256, 256, 3, 1] \n"," 49 [-1, -3, -5, -6] 1 0 models.common.Concat [1] \n"," 50 -1 1 1050624 models.common.Conv [1024, 1024, 1, 1] \n"," 51 -1 1 7609344 models.common.SPPCSPC [1024, 512, 1] \n"," 52 -1 1 131584 models.common.Conv [512, 256, 1, 1] \n"," 53 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n"," 54 37 1 262656 models.common.Conv [1024, 256, 1, 1] \n"," 55 [-1, -2] 1 0 models.common.Concat [1] \n"," 56 -1 1 131584 models.common.Conv [512, 256, 1, 1] \n"," 57 -2 1 131584 models.common.Conv [512, 256, 1, 1] \n"," 58 -1 1 295168 models.common.Conv [256, 128, 3, 1] \n"," 59 -1 1 147712 models.common.Conv [128, 128, 3, 1] \n"," 60 -1 1 147712 models.common.Conv [128, 128, 3, 1] \n"," 61 -1 1 147712 models.common.Conv [128, 128, 3, 1] \n"," 62[-1, -2, -3, -4, -5, -6] 1 0 models.common.Concat [1] \n"," 63 -1 1 262656 models.common.Conv [1024, 256, 1, 1] \n"," 64 -1 1 33024 models.common.Conv [256, 128, 1, 1] \n"," 65 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n"," 66 24 1 65792 models.common.Conv [512, 128, 1, 1] \n"," 67 [-1, -2] 1 0 models.common.Concat [1] \n"," 68 -1 1 33024 models.common.Conv [256, 128, 1, 1] \n"," 69 -2 1 33024 models.common.Conv [256, 128, 1, 1] \n"," 70 -1 1 73856 models.common.Conv [128, 64, 3, 1] \n"," 71 -1 1 36992 models.common.Conv [64, 64, 3, 1] \n"," 72 -1 1 36992 models.common.Conv [64, 64, 3, 1] \n"," 73 -1 1 36992 models.common.Conv [64, 64, 3, 1] \n"," 74[-1, -2, -3, -4, -5, -6] 1 0 models.common.Concat [1] \n"," 75 -1 1 65792 models.common.Conv [512, 128, 1, 1] \n"," 76 -1 1 0 models.common.MP [] \n"," 77 -1 1 16640 models.common.Conv [128, 128, 1, 1] \n"," 78 -3 1 16640 models.common.Conv [128, 128, 1, 1] \n"," 79 -1 1 147712 models.common.Conv [128, 128, 3, 2] \n"," 80 [-1, -3, 63] 1 0 models.common.Concat [1] \n"," 81 -1 1 131584 models.common.Conv [512, 256, 1, 1] \n"," 82 -2 1 131584 models.common.Conv [512, 256, 1, 1] \n"," 83 -1 1 295168 models.common.Conv [256, 128, 3, 1] \n"," 84 -1 1 147712 models.common.Conv [128, 128, 3, 1] \n"," 85 -1 1 147712 models.common.Conv [128, 128, 3, 1] \n"," 86 -1 1 147712 models.common.Conv [128, 128, 3, 1] \n"," 87[-1, -2, -3, -4, -5, -6] 1 0 models.common.Concat [1] \n"," 88 -1 1 262656 models.common.Conv [1024, 256, 1, 1] \n"," 89 -1 1 0 models.common.MP [] \n"," 90 -1 1 66048 models.common.Conv [256, 256, 1, 1] \n"," 91 -3 1 66048 models.common.Conv [256, 256, 1, 1] \n"," 92 -1 1 590336 models.common.Conv [256, 256, 3, 2] \n"," 93 [-1, -3, 51] 1 0 models.common.Concat [1] \n"," 94 -1 1 525312 models.common.Conv [1024, 512, 1, 1] \n"," 95 -2 1 525312 models.common.Conv [1024, 512, 1, 1] \n"," 96 -1 1 1180160 models.common.Conv [512, 256, 3, 1] \n"," 97 -1 1 590336 models.common.Conv [256, 256, 3, 1] \n"," 98 -1 1 590336 models.common.Conv [256, 256, 3, 1] \n"," 99 -1 1 590336 models.common.Conv [256, 256, 3, 1] \n","100[-1, -2, -3, -4, -5, -6] 1 0 models.common.Concat [1] \n","101 -1 1 1049600 models.common.Conv [2048, 512, 1, 1] \n","102 75 1 328704 models.common.RepConv [128, 256, 3, 1] \n","103 88 1 1312768 models.common.RepConv [256, 512, 3, 1] \n","104 101 1 5246976 models.common.RepConv [512, 1024, 3, 1] \n","105 [102, 103, 104] 1 195976 models.yolo.IDetect [31, [[12, 16, 19, 36, 40, 28], [36, 75, 76, 55, 72, 146], [142, 110, 192, 243, 459, 401]], [256, 512, 1024]]\n","/usr/local/lib/python3.9/dist-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3483.)\n"," return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]\n","Model Summary: 415 layers, 37358376 parameters, 37358376 gradients, 105.6 GFLOPS\n","\n","Transferred 557/566 items from yolov7_training.pt\n","Scaled weight_decay = 0.0005\n","Optimizer groups: 95 .bias, 95 conv.weight, 98 other\n","\u001b[34m\u001b[1mtrain: \u001b[0mScanning 'fish-pYTORCH-11/train/labels' images and labels... 2003 found, 0 missing, 4 empty, 0 corrupted: 100% 2003/2003 [00:00<00:00, 3551.19it/s]\n","\u001b[34m\u001b[1mtrain: \u001b[0mNew cache created: fish-pYTORCH-11/train/labels.cache\n","\u001b[34m\u001b[1mval: \u001b[0mScanning 'fish-pYTORCH-11/valid/labels' images and labels... 760 found, 0 missing, 3 empty, 0 corrupted: 100% 760/760 [00:00<00:00, 1698.14it/s]\n","\u001b[34m\u001b[1mval: \u001b[0mNew cache created: fish-pYTORCH-11/valid/labels.cache\n","\n","\u001b[34m\u001b[1mautoanchor: \u001b[0mAnalyzing anchors... anchors/target = 3.87, Best Possible Recall (BPR) = 0.9967\n","Image sizes 640 train, 640 test\n","Using 2 dataloader workers\n","Logging results to runs/train/exp\n","Starting training for 75 epochs...\n","\n"," Epoch gpu_mem box obj cls total labels img_size\n"," 0/74 1.33G 0.06403 0.01724 0.04493 0.1262 12 640: 100% 126/126 [03:16<00:00, 1.56s/it]\n"," Class Images Labels P R mAP@.5 mAP@.5:.95: 62% 15/24 [00:31<00:18, 2.10s/it]\n","Traceback (most recent call last):\n"," File \"/content/yolov7/train.py\", line 616, in \n"," train(hyp, opt, device, tb_writer)\n"," File \"/content/yolov7/train.py\", line 415, in train\n"," results, maps, times = test.test(data_dict,\n"," File \"/content/yolov7/test.py\", line 115, in test\n"," t0 += time_synchronized() - t\n"," File \"/content/yolov7/utils/torch_utils.py\", line 92, in time_synchronized\n"," torch.cuda.synchronize()\n"," File \"/usr/local/lib/python3.9/dist-packages/torch/cuda/__init__.py\", line 688, in synchronize\n"," return torch._C._cuda_synchronize()\n","KeyboardInterrupt\n","^C\n"]}],"source":["# training\n","%cd /content/yolov7\n","!python train.py --batch 16 --epochs 75 --data {dataset.location}/data.yaml --weights 'yolov7_training.pt' #--device 1"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"N4cfnLtTCIce"},"outputs":[],"source":["# Run evaluation\n","!python detect.py --weights runs/train/exp/weights/best.pt --conf 0.1 --source {dataset.location}/test/images"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"6AGhNOSSHY4_"},"outputs":[],"source":["#display inference on ALL test images\n","\n","import glob\n","from IPython.display import Image, display\n","\n","i = 0\n","limit = 10000 # max images to print\n","for imageName in glob.glob('/content/yolov7/runs/detect/exp/*.jpg'): #assuming JPG\n"," if i < limit:\n"," display(Image(filename=imageName))\n"," print(\"\\n\")\n"," i = i + 1\n"," "]},{"cell_type":"code","execution_count":null,"metadata":{"id":"CMOfi7eLJCT3"},"outputs":[],"source":["# Run evaluation\n","%cd /content/drive/MyDrive/Final Year Project/yolov7\n","!python detect.py --weights /content/drive/MyDrive/Final Year Project/yolov7/runs/train/exp/weights/best.pt --conf 0.1 --source /content/download.jpg"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"yVL_NcQP0rj2"},"outputs":[],"source":["import glob\n","from IPython.display import Image, display\n","\n","imageName=glob.glob('/content/yolov7/runs/detect/exp2/download.jpg')\n","display(imageName)"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"nIcxUmAh1QL0"},"outputs":[],"source":["import cv2\n","from google.colab.patches import cv2_imshow\n"," \n","# path\n","path = r'/content/yolov7/runs/detect/exp2/download.jpg'\n"," \n","# Reading an image in default mode\n","image = cv2.imread(path)\n"," \n","# Window name in which image is displayed\n","window_name = 'image'\n"," \n","# Using cv2.imshow() method\n","# Displaying the image\n","cv2_imshow(image)\n"," \n","# # waits for user to press any key\n","# # (this is necessary to avoid Python kernel form crashing)\n","# cv2.waitKey(0)\n"," \n","# # closing all open windows\n","# cv2.destroyAllWindows()"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"GZKSh7cC2vDM"},"outputs":[],"source":["!zip -r /content/file.zip /content/yolov7"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"Bg3cuMlk24AX","colab":{"base_uri":"https://localhost:8080/","height":304},"executionInfo":{"status":"error","timestamp":1682255431007,"user_tz":-330,"elapsed":395,"user":{"displayName":"Aditya","userId":"02056965916683687180"}},"outputId":"e30ff86c-4169-417e-ee35-0e48f41d72c8"},"outputs":[{"output_type":"error","ename":"FileNotFoundError","evalue":"ignored","traceback":["\u001b[0;31m---------------------------------------------------------------------------\u001b[0m","\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)","\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mgoogle\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolab\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mfiles\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mfiles\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdownload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"/content/file.zip\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m","\u001b[0;32m/usr/local/lib/python3.9/dist-packages/google/colab/files.py\u001b[0m in \u001b[0;36mdownload\u001b[0;34m(filename)\u001b[0m\n\u001b[1;32m 220\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilename\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 221\u001b[0m \u001b[0mmsg\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'Cannot find file: {}'\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilename\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 222\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mFileNotFoundError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmsg\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# pylint: disable=undefined-variable\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 223\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 224\u001b[0m \u001b[0mcomm_manager\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_IPython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_ipython\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkernel\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcomm_manager\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;31mFileNotFoundError\u001b[0m: Cannot find file: /content/file.zip"]}],"source":["from google.colab import files\n","files.download(\"/content/file.zip\")"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"wWOok8abrCsL"},"outputs":[],"source":["#zip to download weights and results locally\n","\n","!zip -r export.zip runs/detect\n","!zip -r export.zip runs/train/exp/weights/best.pt\n","!zip export.zip runs/train/exp/*"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"SN2eCDXJ5xdm"},"outputs":[],"source":["files.download(\"export.zip\")"]}],"metadata":{"accelerator":"GPU","colab":{"provenance":[]},"kernelspec":{"display_name":"Python 3","name":"python3"}},"nbformat":4,"nbformat_minor":0}