{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "provenance": [], "gpuType": "T4" }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, "language_info": { "name": "python" }, "accelerator": "GPU" }, "cells": [ { "cell_type": "markdown", "source": [ "## 1. 掛載雲端硬碟" ], "metadata": { "id": "JvFnrA5V65pO" } }, { "cell_type": "code", "source": [ "from google.colab import drive\n", "drive.mount('/content/drive')" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "vu6SEPk764ES", "outputId": "98defb30-9be6-45bb-d950-d1d861639033" }, "execution_count": null, "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" ] } ] }, { "cell_type": "markdown", "source": [ "## 2. 安裝套件" ], "metadata": { "id": "eOlb0q627EZI" } }, { "cell_type": "code", "source": [ "!pip install --upgrade pyyaml==5.3.1" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "5SCKBEDB7EFG", "outputId": "2fde67ff-35e0-47d9-89c8-2d353c58b93e" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Collecting pyyaml==5.3.1\n", " Downloading PyYAML-5.3.1.tar.gz (269 kB)\n", "\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/269.4 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m \u001b[32m266.2/269.4 kB\u001b[0m \u001b[31m9.0 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m269.4/269.4 kB\u001b[0m \u001b[31m7.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25h \u001b[1;31merror\u001b[0m: \u001b[1msubprocess-exited-with-error\u001b[0m\n", " \n", " \u001b[31m×\u001b[0m \u001b[32mpython setup.py egg_info\u001b[0m did not run successfully.\n", " \u001b[31m│\u001b[0m exit code: \u001b[1;36m1\u001b[0m\n", " \u001b[31m╰─>\u001b[0m See above for output.\n", " \n", " \u001b[1;35mnote\u001b[0m: This error originates from a subprocess, and is likely not a problem with pip.\n", " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25herror\n", "\u001b[1;31merror\u001b[0m: \u001b[1mmetadata-generation-failed\u001b[0m\n", "\n", "\u001b[31m×\u001b[0m Encountered error while generating package metadata.\n", "\u001b[31m╰─>\u001b[0m See above for output.\n", "\n", "\u001b[1;35mnote\u001b[0m: This is an issue with the package mentioned above, not pip.\n", "\u001b[1;36mhint\u001b[0m: See above for details.\n" ] } ] }, { "cell_type": "markdown", "source": [ "## 3. 下載程式碼" ], "metadata": { "id": "ngH7Q6Kx6f7m" } }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "QA5CaOZY6aMM", "outputId": "fbc42cd6-ac25-4351-bed7-2f433781a1ed" }, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "/content/drive/MyDrive/example/yolov7\n", "/content/drive/MyDrive/example\n" ] } ], "source": [ "#顯示當前目錄\n", "!pwd\n", "\n", "#切換目錄\n", "%cd /content/drive/MyDrive/example" ] }, { "cell_type": "code", "source": [ "# 從git上面下載程式碼(只要執行一次)\n", "!git clone https://github.com/WongKinYiu/yolov7.git" ], "metadata": { "id": "VGe25V0bVkdb", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "6f897937-b800-4c81-8e43-4f4b58ded23c" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "fatal: destination path 'yolov7' already exists and is not an empty directory.\n" ] } ] }, { "cell_type": "markdown", "source": [ "## 4. 下載已經使用coco dataset預先訓練好的權重\n", "* 從 https://github.com/WongKinYiu/yolov7.git 上面去尋找連結" ], "metadata": { "id": "zdM561AuAUZc" } }, { "cell_type": "code", "source": [ "!wget https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7.pt" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "ffh4H-2E6eEo", "outputId": "39d575b3-6988-4046-866c-e71e31552bf1" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "--2024-06-04 07:39:18-- https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7.pt\n", "Resolving github.com (github.com)... 20.205.243.166\n", "Connecting to github.com (github.com)|20.205.243.166|:443... connected.\n", "HTTP request sent, awaiting response... 302 Found\n", "Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/511187726/b0243edf-9fb0-4337-95e1-42555f1b37cf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240604%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240604T073918Z&X-Amz-Expires=300&X-Amz-Signature=a8e26a0d2ba27ab8566423ded52aeb9976e2fee7a53483137b1bee72606a3ad5&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=511187726&response-content-disposition=attachment%3B%20filename%3Dyolov7.pt&response-content-type=application%2Foctet-stream [following]\n", "--2024-06-04 07:39:18-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/511187726/b0243edf-9fb0-4337-95e1-42555f1b37cf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240604%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240604T073918Z&X-Amz-Expires=300&X-Amz-Signature=a8e26a0d2ba27ab8566423ded52aeb9976e2fee7a53483137b1bee72606a3ad5&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=511187726&response-content-disposition=attachment%3B%20filename%3Dyolov7.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: 75587165 (72M) [application/octet-stream]\n", "Saving to: ‘yolov7.pt’\n", "\n", "yolov7.pt 100%[===================>] 72.08M 59.9MB/s in 1.2s \n", "\n", "2024-06-04 07:39:20 (59.9 MB/s) - ‘yolov7.pt’ saved [75587165/75587165]\n", "\n" ] } ] }, { "cell_type": "markdown", "source": [ "## 5. 上傳資料與新增設定檔" ], "metadata": { "id": "usnmC9u8AtTw" } }, { "cell_type": "code", "source": [ "#切換目錄到剛下載的git專案\n", "%cd yolov7" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "0FaLnNRP6eB9", "outputId": "d99a8520-445f-4194-dbea-5e6eb7905b03" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "/content/drive/MyDrive/example/yolov7\n" ] } ] }, { "cell_type": "markdown", "source": [ "## 6-1. 在./yolo/data/目錄底下手動建立資料夾 [project名稱]\n", "## 6-2. 上傳訓練資料到./yolo/data/train跟 ./yolo/data/val/\n", "## 6-3. 複製data目錄底下的coco.yaml, 改名為[project名稱].yaml\n", "## 6-4. 編輯[project名稱].yaml裡面的參數\n", "* train: ./data/[project名稱]/train\n", "* val: ./data/[project名稱]/val\n", "* test: ./data/[project名稱]/test\n", "* nc: [總共有多少類別]\n", "* names: [每個類別代表的英文名稱]\n", "\n", "## 6-5. 複製cfg/training目錄底下的yolov7.yaml 並改名為yolov7_[project名稱].yaml\n", "## 6-6. 編輯yolov7_[project名稱].yaml\n", "* nc: [總共有多少類別]" ], "metadata": { "id": "px5Ui1z691Gf" } }, { "cell_type": "markdown", "source": [ "## 7. 訓練模型" ], "metadata": { "id": "o1qlx6w0BIY4" } }, { "cell_type": "code", "source": [ "!pwd\n", "\n", "%cd /content/drive/MyDrive/example/yolov7" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "Z-vgRl_mVUGk", "outputId": "f9885773-741b-4c25-9c35-15e5519fc554" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "/content/drive/MyDrive/example/yolov7\n", "/content/drive/MyDrive/example/yolov7\n" ] } ] }, { "cell_type": "code", "source": [ "!python train.py --device 0 \\\n", "--batch-size 16 --epochs 20 \\\n", "--data data/crosswalk.yaml --img 640 640 \\\n", "--hyp data/hyp.scratch.custom.yaml --cfg cfg/training/yolov7.yaml \\\n", "--weights 'yolov7.pt' --name yolov7-crosswalk" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "TtHOAGy56c2Q", "outputId": "5ce0a0a8-d37f-46f2-f0b8-b1d8fcbc30d0" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "2024-06-04 08:36:55.417279: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n", "2024-06-04 08:36:55.417338: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n", "2024-06-04 08:36:55.418662: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n", "2024-06-04 08:36:55.426203: 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 AVX512F FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n", "2024-06-04 08:36:56.637540: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n", "YOLOR 🚀 v0.1-128-ga207844 torch 2.3.0+cu121 CUDA:0 (Tesla T4, 15102.0625MB)\n", "\n", "Namespace(weights='yolov7.pt', cfg='cfg/training/yolov7.yaml', data='data/crosswalk.yaml', hyp='data/hyp.scratch.custom.yaml', epochs=20, 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='0', multi_scale=False, single_cls=False, adam=False, sync_bn=False, local_rank=-1, workers=8, project='runs/train', entity=None, name='yolov7-crosswalk', 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/yolov7-crosswalk5', 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.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0, paste_in=0.0, loss_ota=1\n", "\u001b[34m\u001b[1mwandb: \u001b[0mInstall Weights & Biases for YOLOR logging with 'pip install wandb' (recommended)\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 34156 models.yolo.IDetect [1, [[12, 16, 19, 36, 40, 28], [36, 75, 76, 55, 72, 146], [142, 110, 192, 243, 459, 401]], [256, 512, 1024]]\n", "Model Summary: 415 layers, 37196556 parameters, 37196556 gradients\n", "\n", "Transferred 552/566 items from yolov7.pt\n", "Scaled weight_decay = 0.0005\n", "Optimizer groups: 95 .bias, 95 conv.weight, 98 other\n", "\u001b[34m\u001b[1mtrain: \u001b[0mScanning '/content/drive/MyDrive/example/dataset1/train/labels' images and labels... 354 found, 0 missing, 1 empty, 0 corrupted: 100% 354/354 [04:01<00:00, 1.47it/s]\n", "\u001b[34m\u001b[1mtrain: \u001b[0mNew cache created: /content/drive/MyDrive/example/dataset1/train/labels.cache\n", "/usr/lib/python3.10/multiprocessing/popen_fork.py:66: RuntimeWarning: os.fork() was called. os.fork() is incompatible with multithreaded code, and JAX is multithreaded, so this will likely lead to a deadlock.\n", " self.pid = os.fork()\n", "\u001b[34m\u001b[1mval: \u001b[0mScanning '/content/drive/MyDrive/example/dataset1/valid/labels' images and labels... 101 found, 0 missing, 0 empty, 0 corrupted: 100% 101/101 [01:07<00:00, 1.50it/s]\n", "\u001b[34m\u001b[1mval: \u001b[0mNew cache created: /content/drive/MyDrive/example/dataset1/valid/labels.cache\n", "\n", "\u001b[34m\u001b[1mautoanchor: \u001b[0mAnalyzing anchors... anchors/target = 2.86, Best Possible Recall (BPR) = 0.9856\n", "Image sizes 640 train, 640 test\n", "Using 2 dataloader workers\n", "Logging results to runs/train/yolov7-crosswalk5\n", "Starting training for 20 epochs...\n", "\n", " Epoch gpu_mem box obj cls total labels img_size\n", " 0/19 1G 0.07408 0.01941 0 0.0935 5 640: 100% 23/23 [00:57<00:00, 2.52s/it]\n", " Class Images Labels P R mAP@.5 mAP@.5:.95: 0% 0/4 [00:00