File size: 91,053 Bytes
d9b9366 | 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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "-tGvKM82qJsO"
},
"source": [
"# Object Detection"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Wed Apr 3 23:56:37 2024 \n",
"+-----------------------------------------------------------------------------+\n",
"| NVIDIA-SMI 525.89.02 Driver Version: 525.89.02 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 V100-PCIE... On | 00000000:3B:00.0 Off | 0 |\n",
"| N/A 30C P0 25W / 250W | 0MiB / 16384MiB | 0% Default |\n",
"| | | N/A |\n",
"+-------------------------------+----------------------+----------------------+\n",
"| 1 Tesla V100-PCIE... On | 00000000:D8:00.0 Off | 0 |\n",
"| N/A 32C P0 26W / 250W | 0MiB / 16384MiB | 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": 5,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "I1WFGtgTqItg",
"outputId": "ef51af7f-2a14-4a21-e6ef-cef04da2d4c7"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Extraction completed.\n"
]
}
],
"source": [
"from zipfile import ZipFile\n",
"\n",
"# Path to your ZIP file\n",
"zip_file_path = '/user/charviku/DL_Project/final_data.zip'\n",
"# Destination directory where you want to extract the files\n",
"extraction_directory = '/user/charviku/DL_Project/in'\n",
"\n",
"# Extract the ZIP file\n",
"with ZipFile(zip_file_path, 'r') as zip_ref:\n",
" zip_ref.extractall(extraction_directory)\n",
"\n",
"print(\"Extraction completed.\")\n"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"id": "65r28yu_uZUc"
},
"outputs": [],
"source": [
"import xml.etree.ElementTree as ET\n",
"import os\n",
"from PIL import Image\n",
"\n",
"# Load class names and create a mapping to IDs\n",
"def load_class_names(class_file_path):\n",
" with open(class_file_path, 'r') as file:\n",
" class_names = file.read().strip().split('\\n')\n",
" return {name: i for i, name in enumerate(class_names)}\n",
"\n",
"def convert_voc_to_yolo(voc_xml_file, class_mapping, img_width, img_height):\n",
" tree = ET.parse(voc_xml_file)\n",
" root = tree.getroot()\n",
" yolo_format = []\n",
"\n",
" for member in root.findall('object'):\n",
" classname = member.find('name').text\n",
" class_id = class_mapping[classname]\n",
"\n",
" bndbox = member.find('bndbox')\n",
" xmin = int(bndbox.find('xmin').text)\n",
" ymin = int(bndbox.find('ymin').text)\n",
" xmax = int(bndbox.find('xmax').text)\n",
" ymax = int(bndbox.find('ymax').text)\n",
"\n",
" x_center = ((xmin + xmax) / 2) / img_width\n",
" y_center = ((ymin + ymax) / 2) / img_height\n",
" width = (xmax - xmin) / img_width\n",
" height = (ymax - ymin) / img_height\n",
"\n",
" yolo_format.append(f\"{class_id} {x_center} {y_center} {width} {height}\")\n",
"\n",
" return yolo_format\n",
"\n",
"def process_dataset(dataset_directory, class_file_path):\n",
" class_mapping = load_class_names(class_file_path)\n",
"\n",
" for class_dir in os.listdir(dataset_directory):\n",
" class_path = os.path.join(dataset_directory, class_dir)\n",
" if os.path.isdir(class_path):\n",
" for file in os.listdir(class_path):\n",
" if file.endswith('.xml'):\n",
" img_file = os.path.splitext(file)[0] + '.jpg'\n",
" img_path = os.path.join(class_path, img_file)\n",
" xml_path = os.path.join(class_path, file)\n",
"\n",
" # Use PIL to get image dimensions\n",
" with Image.open(img_path) as img:\n",
" img_width, img_height = img.size\n",
"\n",
" yolo_annotations = convert_voc_to_yolo(xml_path, class_mapping, img_width, img_height)\n",
" yolo_annotation_text = \"\\n\".join(yolo_annotations)\n",
"\n",
" # Save YOLO annotations to a .txt file\n",
" txt_filename = os.path.splitext(xml_path)[0] + '.txt'\n",
" with open(txt_filename, 'w') as f:\n",
" f.write(yolo_annotation_text)\n",
"\n",
"# Assuming your class file path and dataset directory are as follows:\n",
"class_file_path = '/user/charviku/DL_Project/Final_classes.txt'\n",
"dataset_directory = '/user/charviku/DL_Project/in/initial_data_annotated'\n",
"process_dataset(dataset_directory, class_file_path)\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Defaulting to user installation because normal site-packages is not writeable\n",
"Collecting scikit-learn\n",
" Downloading scikit_learn-1.4.1.post1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (11 kB)\n",
"Requirement already satisfied: numpy<2.0,>=1.19.5 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/scipy-bundle/2021.10/lib/python3.9/site-packages (from scikit-learn) (1.21.3)\n",
"Requirement already satisfied: scipy>=1.6.0 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/scipy-bundle/2021.10/lib/python3.9/site-packages (from scikit-learn) (1.7.1)\n",
"Collecting joblib>=1.2.0 (from scikit-learn)\n",
" Downloading joblib-1.3.2-py3-none-any.whl.metadata (5.4 kB)\n",
"Requirement already satisfied: threadpoolctl>=2.0.0 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from scikit-learn) (2.2.0)\n",
"Downloading scikit_learn-1.4.1.post1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.2/12.2 MB\u001b[0m \u001b[31m94.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m:01\u001b[0m\n",
"\u001b[?25hDownloading joblib-1.3.2-py3-none-any.whl (302 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m302.2/302.2 kB\u001b[0m \u001b[31m10.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25h\u001b[33mDEPRECATION: matlabengineforpython R2021b has a non-standard version number. pip 24.0 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of matlabengineforpython or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at https://github.com/pypa/pip/issues/12063\u001b[0m\u001b[33m\n",
"\u001b[0mInstalling collected packages: joblib, scikit-learn\n",
"Successfully installed joblib-1.3.2 scikit-learn-1.4.1.post1\n",
"\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.3.2\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n",
"Note: you may need to restart the kernel to use updated packages.\n"
]
}
],
"source": [
"pip install scikit-learn"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "6wQoeoSzsUZ4",
"outputId": "91698654-1b61-4e91-a7f4-4f706d28faad"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Training images: 3988\n",
"Validation images: 499\n",
"Test images: 499\n"
]
}
],
"source": [
"import os\n",
"import random\n",
"from sklearn.model_selection import train_test_split\n",
"\n",
"# Define your dataset directory and output files\n",
"dataset_dir = '/user/charviku/DL_Project/in/initial_data_annotated'\n",
"output_train = '/user/charviku/DL_Project/train.txt'\n",
"output_val = '/user/charviku/DL_Project/valid.txt'\n",
"output_test = '/user/charviku/DL_Project/test.txt'\n",
"\n",
"# Specify the split ratios\n",
"train_ratio = 0.8\n",
"val_ratio = 0.1\n",
"test_ratio = 0.1 # Ensures train + val + test = 1.0\n",
"\n",
"# Collect all image file paths\n",
"image_paths = []\n",
"for root, dirs, files in os.walk(dataset_dir):\n",
" for file in files:\n",
" if file.endswith('.jpg'):\n",
" image_paths.append(os.path.join(root, file))\n",
"\n",
"# Split the data\n",
"train_val_paths, test_paths = train_test_split(image_paths, test_size=test_ratio, random_state=42)\n",
"train_paths, val_paths = train_test_split(train_val_paths, test_size=val_ratio/(train_ratio+val_ratio), random_state=42)\n",
"\n",
"# Function to write paths to a file\n",
"def write_paths(file_paths, output_file):\n",
" with open(output_file, 'w') as f:\n",
" for path in file_paths:\n",
" f.write(path + '\\n')\n",
"\n",
"# Write the splits to their respective files\n",
"write_paths(train_paths, output_train)\n",
"write_paths(val_paths, output_val)\n",
"write_paths(test_paths, output_test)\n",
"\n",
"print(f\"Training images: {len(train_paths)}\")\n",
"print(f\"Validation images: {len(val_paths)}\")\n",
"print(f\"Test images: {len(test_paths)}\")\n"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "sCJT9Xxx4cnH",
"outputId": "77ae092a-83ca-442c-bc36-0d531a5be850"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Cloning into 'yolov7'...\n",
"remote: Enumerating objects: 1197, done.\u001b[K\n",
"remote: Total 1197 (delta 0), reused 0 (delta 0), pack-reused 1197\u001b[K\n",
"Receiving objects: 100% (1197/1197), 74.23 MiB | 61.69 MiB/s, done.\n",
"Resolving deltas: 100% (519/519), done.\n",
"Updating files: 100% (108/108), done.\n",
"/user/charviku/DL_Project/yolov7\n"
]
}
],
"source": [
"!git clone https://github.com/WongKinYiu/yolov7.git\n",
"%cd yolov7\n"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000
},
"id": "Pp_80KK95PFq",
"outputId": "1d7b7a25-77ef-4233-dad0-b2285f32cb68"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Defaulting to user installation because normal site-packages is not writeable\n",
"Requirement already satisfied: matplotlib>=3.2.2 in /user/charviku/.local/lib/python3.9/site-packages (from -r requirements.txt (line 4)) (3.8.2)\n",
"Requirement already satisfied: numpy<1.24.0,>=1.18.5 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/scipy-bundle/2021.10/lib/python3.9/site-packages (from -r requirements.txt (line 5)) (1.21.3)\n",
"Collecting opencv-python>=4.1.1 (from -r requirements.txt (line 6))\n",
" Downloading opencv_python-4.9.0.80-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (20 kB)\n",
"Requirement already satisfied: Pillow>=7.1.2 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/pillow/9.2.0/lib/python3.9/site-packages (from -r requirements.txt (line 7)) (9.2.0)\n",
"Requirement already satisfied: PyYAML>=5.3.1 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/pyyaml/5.4.1/lib/python3.9/site-packages (from -r requirements.txt (line 8)) (5.4.1)\n",
"Requirement already satisfied: requests>=2.23.0 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from -r requirements.txt (line 9)) (2.26.0)\n",
"Requirement already satisfied: scipy>=1.4.1 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/scipy-bundle/2021.10/lib/python3.9/site-packages (from -r requirements.txt (line 10)) (1.7.1)\n",
"Requirement already satisfied: torch!=1.12.0,>=1.7.0 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/pytorch/1.13.1-CUDA-11.8.0/lib/python3.9/site-packages (from -r requirements.txt (line 11)) (1.13.1)\n",
"Requirement already satisfied: torchvision!=0.13.0,>=0.8.1 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/torchvision/0.14.1-CUDA-11.8.0/lib/python3.9/site-packages (from -r requirements.txt (line 12)) (0.14.1)\n",
"Collecting tqdm>=4.41.0 (from -r requirements.txt (line 13))\n",
" Downloading tqdm-4.66.2-py3-none-any.whl.metadata (57 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m57.6/57.6 kB\u001b[0m \u001b[31m1.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: protobuf<4.21.3 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/protobuf-python/3.17.3/lib/python3.9/site-packages (from -r requirements.txt (line 14)) (3.17.3)\n",
"Requirement already satisfied: tensorboard>=2.4.1 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/tensorflow/2.11.0-CUDA-11.8.0/lib/python3.9/site-packages (from -r requirements.txt (line 17)) (2.11.1)\n",
"Requirement already satisfied: pandas>=1.1.4 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/scipy-bundle/2021.10/lib/python3.9/site-packages (from -r requirements.txt (line 21)) (1.3.4)\n",
"Collecting seaborn>=0.11.0 (from -r requirements.txt (line 22))\n",
" Downloading seaborn-0.13.2-py3-none-any.whl.metadata (5.4 kB)\n",
"Requirement already satisfied: ipython in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/ipython/7.26.0/lib/python3.9/site-packages (from -r requirements.txt (line 34)) (7.26.0)\n",
"Requirement already satisfied: psutil in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from -r requirements.txt (line 35)) (5.8.0)\n",
"Collecting thop (from -r requirements.txt (line 36))\n",
" Downloading thop-0.1.1.post2209072238-py3-none-any.whl.metadata (2.7 kB)\n",
"Requirement already satisfied: contourpy>=1.0.1 in /user/charviku/.local/lib/python3.9/site-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (1.2.0)\n",
"Requirement already satisfied: cycler>=0.10 in /user/charviku/.local/lib/python3.9/site-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (0.12.1)\n",
"Requirement already satisfied: fonttools>=4.22.0 in /user/charviku/.local/lib/python3.9/site-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (4.47.2)\n",
"Requirement already satisfied: kiwisolver>=1.3.1 in /user/charviku/.local/lib/python3.9/site-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (1.4.5)\n",
"Requirement already satisfied: packaging>=20.0 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (20.9)\n",
"Requirement already satisfied: pyparsing>=2.3.1 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (2.4.7)\n",
"Requirement already satisfied: python-dateutil>=2.7 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (2.8.2)\n",
"Requirement already satisfied: importlib-resources>=3.2.0 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (5.2.2)\n",
"Requirement already satisfied: urllib3<1.27,>=1.21.1 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from requests>=2.23.0->-r requirements.txt (line 9)) (1.26.6)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from requests>=2.23.0->-r requirements.txt (line 9)) (2021.5.30)\n",
"Requirement already satisfied: charset-normalizer~=2.0.0 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from requests>=2.23.0->-r requirements.txt (line 9)) (2.0.4)\n",
"Requirement already satisfied: idna<4,>=2.5 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from requests>=2.23.0->-r requirements.txt (line 9)) (3.2)\n",
"Requirement already satisfied: typing_extensions in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/typing-extensions/4.3.0/lib/python3.9/site-packages (from torch!=1.12.0,>=1.7.0->-r requirements.txt (line 11)) (4.3.0)\n",
"Requirement already satisfied: six>=1.9 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from protobuf<4.21.3->-r requirements.txt (line 14)) (1.16.0)\n",
"Requirement already satisfied: absl-py>=0.4 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/tensorflow/2.11.0-CUDA-11.8.0/lib/python3.9/site-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (1.4.0)\n",
"Requirement already satisfied: grpcio>=1.24.3 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/tensorflow/2.11.0-CUDA-11.8.0/lib/python3.9/site-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (1.51.1)\n",
"Requirement already satisfied: google-auth<3,>=1.6.3 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/tensorflow/2.11.0-CUDA-11.8.0/lib/python3.9/site-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (2.16.0)\n",
"Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/tensorflow/2.11.0-CUDA-11.8.0/lib/python3.9/site-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (0.4.6)\n",
"Requirement already satisfied: markdown>=2.6.8 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/tensorflow/2.11.0-CUDA-11.8.0/lib/python3.9/site-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (3.4.1)\n",
"Requirement already satisfied: setuptools>=41.0.0 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (57.4.0)\n",
"Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/tensorflow/2.11.0-CUDA-11.8.0/lib/python3.9/site-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (0.6.1)\n",
"Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/tensorflow/2.11.0-CUDA-11.8.0/lib/python3.9/site-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (1.8.1)\n",
"Requirement already satisfied: werkzeug>=1.0.1 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/tensorflow/2.11.0-CUDA-11.8.0/lib/python3.9/site-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (2.2.2)\n",
"Requirement already satisfied: wheel>=0.26 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from tensorboard>=2.4.1->-r requirements.txt (line 17)) (0.36.2)\n",
"Requirement already satisfied: pytz>=2017.3 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from pandas>=1.1.4->-r requirements.txt (line 21)) (2021.1)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: jedi>=0.16 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/ipython/7.26.0/lib/python3.9/site-packages (from ipython->-r requirements.txt (line 34)) (0.18.0)\n",
"Requirement already satisfied: decorator in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from ipython->-r requirements.txt (line 34)) (5.0.9)\n",
"Requirement already satisfied: pickleshare in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/ipython/7.26.0/lib/python3.9/site-packages (from ipython->-r requirements.txt (line 34)) (0.7.5)\n",
"Requirement already satisfied: traitlets>=4.2 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/ipython/7.26.0/lib/python3.9/site-packages (from ipython->-r requirements.txt (line 34)) (5.0.5)\n",
"Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/ipython/7.26.0/lib/python3.9/site-packages (from ipython->-r requirements.txt (line 34)) (3.0.19)\n",
"Requirement already satisfied: pygments in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from ipython->-r requirements.txt (line 34)) (2.9.0)\n",
"Requirement already satisfied: backcall in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/ipython/7.26.0/lib/python3.9/site-packages (from ipython->-r requirements.txt (line 34)) (0.2.0)\n",
"Requirement already satisfied: matplotlib-inline in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/ipython/7.26.0/lib/python3.9/site-packages (from ipython->-r requirements.txt (line 34)) (0.1.2)\n",
"Requirement already satisfied: pexpect>4.3 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from ipython->-r requirements.txt (line 34)) (4.8.0)\n",
"Requirement already satisfied: cachetools<6.0,>=2.0.0 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/tensorflow/2.11.0-CUDA-11.8.0/lib/python3.9/site-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r requirements.txt (line 17)) (5.2.1)\n",
"Requirement already satisfied: pyasn1-modules>=0.2.1 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/tensorflow/2.11.0-CUDA-11.8.0/lib/python3.9/site-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r requirements.txt (line 17)) (0.2.8)\n",
"Requirement already satisfied: rsa<5,>=3.1.4 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/tensorflow/2.11.0-CUDA-11.8.0/lib/python3.9/site-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r requirements.txt (line 17)) (4.9)\n",
"Requirement already satisfied: requests-oauthlib>=0.7.0 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/tensorflow/2.11.0-CUDA-11.8.0/lib/python3.9/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard>=2.4.1->-r requirements.txt (line 17)) (1.3.1)\n",
"Requirement already satisfied: zipp>=3.1.0 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from importlib-resources>=3.2.0->matplotlib>=3.2.2->-r requirements.txt (line 4)) (3.5.0)\n",
"Requirement already satisfied: parso<0.9.0,>=0.8.0 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/ipython/7.26.0/lib/python3.9/site-packages (from jedi>=0.16->ipython->-r requirements.txt (line 34)) (0.8.2)\n",
"Requirement already satisfied: importlib-metadata>=4.4 in /user/charviku/.local/lib/python3.9/site-packages (from markdown>=2.6.8->tensorboard>=2.4.1->-r requirements.txt (line 17)) (7.0.1)\n",
"Requirement already satisfied: ptyprocess>=0.5 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from pexpect>4.3->ipython->-r requirements.txt (line 34)) (0.7.0)\n",
"Requirement already satisfied: wcwidth in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython->-r requirements.txt (line 34)) (0.2.5)\n",
"Requirement already satisfied: ipython-genutils in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/ipython/7.26.0/lib/python3.9/site-packages (from traitlets>=4.2->ipython->-r requirements.txt (line 34)) (0.2.0)\n",
"Requirement already satisfied: MarkupSafe>=2.1.1 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/tensorflow/2.11.0-CUDA-11.8.0/lib/python3.9/site-packages (from werkzeug>=1.0.1->tensorboard>=2.4.1->-r requirements.txt (line 17)) (2.1.1)\n",
"Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/Compiler/gcccore/11.2.0/python/3.9.6/lib/python3.9/site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r requirements.txt (line 17)) (0.4.8)\n",
"Requirement already satisfied: oauthlib>=3.0.0 in /cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/tensorflow/2.11.0-CUDA-11.8.0/lib/python3.9/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard>=2.4.1->-r requirements.txt (line 17)) (3.2.2)\n",
"Downloading opencv_python-4.9.0.80-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (62.2 MB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.2/62.2 MB\u001b[0m \u001b[31m51.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n",
"\u001b[?25hDownloading tqdm-4.66.2-py3-none-any.whl (78 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m78.3/78.3 kB\u001b[0m \u001b[31m2.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hDownloading seaborn-0.13.2-py3-none-any.whl (294 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m294.9/294.9 kB\u001b[0m \u001b[31m6.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0mta \u001b[36m0:00:01\u001b[0m\n",
"\u001b[?25hDownloading thop-0.1.1.post2209072238-py3-none-any.whl (15 kB)\n",
"\u001b[33mDEPRECATION: matlabengineforpython R2021b has a non-standard version number. pip 24.0 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of matlabengineforpython or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at https://github.com/pypa/pip/issues/12063\u001b[0m\u001b[33m\n",
"\u001b[0mInstalling collected packages: tqdm, opencv-python, thop, seaborn\n",
"Successfully installed opencv-python-4.9.0.80 seaborn-0.13.2 thop-0.1.1.post2209072238 tqdm-4.66.2\n",
"\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.3.2\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n"
]
}
],
"source": [
"!pip install -r requirements.txt\n"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"id": "ZvAB0t1a53xr"
},
"outputs": [],
"source": [
"yaml_content = \"\"\"\n",
"train: /user/charviku/DL_Project/train.txt\n",
"val: /user/charviku/DL_Project/valid.txt\n",
"test: /user/charviku/DL_Project/test.txt\n",
"\n",
"nc: 100\n",
"names: [\n",
" 'all_purpose_flour', 'almonds', 'apple', 'apricot', 'asparagus', 'avocado', 'bacon', 'banana', 'barley', 'basil',\n",
" 'basmati_rice', 'beans', 'beef', 'beets', 'bell_pepper', 'berries', 'biscuits', 'blackberries', 'black_pepper',\n",
" 'blueberries', 'bread', 'bread_crumbs', 'bread_flour', 'broccoli', 'brownie_mix', 'brown_rice', 'butter', 'cabbage',\n",
" 'cake', 'cardamom', 'carrot', 'cashews', 'cauliflower', 'celery', 'cereal', 'cheese', 'cherries', 'chicken',\n",
" 'chickpeas', 'chocolate', 'chocolate_chips', 'chocolate_syrup', 'cilantro', 'cinnamon', 'clove', 'cocoa_powder',\n",
" 'coconut', 'cookies', 'corn', 'cucumber', 'dates', 'eggplant', 'eggs', 'fish', 'garlic', 'ginger', 'grapes', 'honey',\n",
" 'jalapeno', 'kidney_beans', 'lemon', 'mango', 'marshmallows', 'milk', 'mint', 'muffins', 'mushroom', 'noodles',\n",
" 'nuts', 'oats', 'okra', 'olive', 'onion', 'orange', 'oreo_cookies', 'pasta', 'pear', 'pepper', 'pineapple',\n",
" 'pistachios', 'pork', 'potato', 'pumpkin', 'radishes', 'raisins', 'red_chilies', 'rice', 'rosemary', 'salmon', 'salt',\n",
" 'shrimp', 'spinach', 'strawberries', 'sugar', 'sweet_potato', 'tomato', 'vanilla_ice_cream', 'walnuts', 'watermelon',\n",
" 'yogurt'\n",
"]\n",
"\"\"\"\n",
"\n",
"with open('/user/charviku/DL_Project/ingredients.yaml', 'w') as file:\n",
" file.write(yaml_content.strip())\n"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "uzzsNi5Y6fdU",
"outputId": "d2702961-cc1a-42dc-ee26-e3bfdc361240"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/user/charviku/DL_Project/yolov7\n"
]
}
],
"source": [
"%cd /user/charviku/DL_Project/yolov7\n"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "sQbHP-J86FhY",
"outputId": "3832631b-f51e-4b7c-9ac1-0b70e7606d0a"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"YOLOR 🚀 v0.1-128-ga207844 torch 1.13.1 CUDA:0 (Tesla V100-PCIE-16GB, 16150.875MB)\n",
"\n",
"Namespace(weights='yolov7.pt', cfg='cfg/training/yolov7.yaml', data='/user/charviku/DL_Project/ingredients.yaml', hyp='data/hyp.scratch.p5.yaml', epochs=100, batch_size=32, img_size=[320, 320], 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=4, 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/exp2', total_batch_size=32)\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=100\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"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" 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 568162 models.yolo.IDetect [100, [[12, 16, 19, 36, 40, 28], [36, 75, 76, 55, 72, 146], [142, 110, 192, 243, 459, 401]], [256, 512, 1024]]\n",
"/cvmfs/soft.ccr.buffalo.edu/versions/2023.01/easybuild/software/avx512/MPI/gcc/11.2.0/openmpi/4.1.1/pytorch/1.13.1-CUDA-11.8.0/lib/python3.9/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /var/tmp/aebruno2/easybuild/build/PyTorch/1.13.1/foss-2021b-CUDA-11.8.0/pytorch-v1.13.1/aten/src/ATen/native/TensorShape.cpp:3190.)\n",
" return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]\n",
"Model Summary: 415 layers, 37730562 parameters, 37730562 gradients, 106.8 GFLOPS\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 '/user/charviku/DL_Project/train.cache' images and labels... 398\u001b[0m\n",
"\u001b[34m\u001b[1mval: \u001b[0mScanning '/user/charviku/DL_Project/valid.cache' images and labels... 499 f\u001b[0m\n",
"\n",
"\u001b[34m\u001b[1mautoanchor: \u001b[0mAnalyzing anchors... anchors/target = 5.21, Best Possible Recall (BPR) = 1.0000\n",
"Image sizes 320 train, 320 test\n",
"Using 4 dataloader workers\n",
"Logging results to runs/train/exp2\n",
"Starting training for 100 epochs...\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 0/99 6.42G 0.05893 0.007474 0.06394 0.1304 41 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.355 0.0124 0.00473 0.00262\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 1/99 6.44G 0.03447 0.009123 0.06219 0.1058 55 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.0576 0.103 0.0145 0.0109\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 2/99 6.44G 0.02901 0.009443 0.06186 0.1003 47 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.0207 0.189 0.0201 0.0161\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 3/99 6.44G 0.02664 0.008717 0.06156 0.09691 36 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.0213 0.138 0.0221 0.0172\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 4/99 6.44G 0.02865 0.008369 0.06141 0.09843 43 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.0633 0.142 0.0258 0.0205\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 5/99 6.44G 0.02656 0.008483 0.06107 0.09611 54 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.143 0.089 0.0223 0.0164\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 6/99 6.44G 0.02654 0.008155 0.06052 0.09521 44 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.096 0.131 0.0302 0.0229\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 7/99 6.44G 0.02699 0.0086 0.06021 0.0958 51 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.0198 0.167 0.0195 0.015\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 8/99 6.44G 0.02751 0.008372 0.05972 0.0956 47 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.328 0.0459 0.0194 0.0145\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 9/99 6.44G 0.02637 0.008422 0.05883 0.09362 39 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.28 0.157 0.043 0.0323\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 10/99 6.44G 0.02617 0.008412 0.05738 0.09196 43 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.142 0.252 0.0528 0.0397\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 11/99 6.44G 0.02564 0.008484 0.05597 0.09009 38 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.65 0.0885 0.0517 0.0409\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 12/99 6.44G 0.02605 0.008226 0.05474 0.08902 35 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.415 0.147 0.0681 0.0541\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 13/99 6.44G 0.02549 0.0082 0.05298 0.08668 49 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.165 0.236 0.0767 0.0634\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 14/99 6.44G 0.02555 0.00835 0.05151 0.08541 59 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.372 0.195 0.0821 0.0666\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 15/99 6.44G 0.0253 0.00816 0.05012 0.08358 32 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.418 0.238 0.119 0.0966\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" 16/99 6.44G 0.02481 0.008267 0.0483 0.08138 54 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.292 0.261 0.148 0.119\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 17/99 6.44G 0.02521 0.008244 0.04759 0.08104 38 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.211 0.303 0.146 0.119\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 18/99 6.44G 0.02498 0.007996 0.04597 0.07895 48 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.309 0.29 0.165 0.135\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 19/99 6.44G 0.02481 0.007921 0.04433 0.07706 49 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.347 0.3 0.185 0.155\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 20/99 6.44G 0.02473 0.008011 0.04331 0.07605 51 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.383 0.26 0.205 0.17\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 21/99 6.44G 0.02438 0.007891 0.04166 0.07393 44 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.408 0.247 0.217 0.179\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 22/99 6.44G 0.0242 0.007849 0.04045 0.0725 50 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.438 0.315 0.27 0.224\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 23/99 6.44G 0.02451 0.007912 0.0397 0.07212 47 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.362 0.264 0.231 0.188\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 24/99 6.44G 0.02415 0.007795 0.03856 0.07051 48 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.32 0.326 0.254 0.211\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 25/99 6.44G 0.02429 0.00775 0.03797 0.07002 47 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.465 0.267 0.251 0.208\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 26/99 6.44G 0.02424 0.007821 0.03705 0.06911 51 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.295 0.365 0.257 0.218\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 27/99 6.44G 0.02405 0.007641 0.03622 0.06791 39 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.333 0.383 0.284 0.241\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 28/99 6.44G 0.02384 0.007582 0.03547 0.0669 37 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.479 0.315 0.299 0.25\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 29/99 6.44G 0.02359 0.00759 0.03437 0.06556 42 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.324 0.346 0.295 0.248\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 30/99 6.44G 0.0237 0.007385 0.03351 0.06459 44 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.516 0.303 0.322 0.266\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 31/99 6.44G 0.02376 0.007478 0.033 0.06424 40 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.372 0.386 0.309 0.258\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 32/99 6.44G 0.02344 0.007618 0.03228 0.06334 45 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.263 0.434 0.322 0.273\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 33/99 6.44G 0.02327 0.007463 0.03159 0.06232 61 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.467 0.346 0.324 0.274\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 34/99 6.44G 0.02318 0.007452 0.03093 0.06157 62 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.491 0.377 0.357 0.299\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 35/99 6.44G 0.02308 0.007366 0.03054 0.06099 35 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.474 0.375 0.354 0.299\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 36/99 6.44G 0.02292 0.007254 0.02897 0.05915 45 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.477 0.39 0.359 0.307\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 37/99 6.44G 0.02285 0.007356 0.02905 0.05925 55 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.327 0.424 0.358 0.306\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 38/99 6.44G 0.0226 0.007282 0.02878 0.05866 60 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.476 0.377 0.365 0.311\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 39/99 6.44G 0.02225 0.007231 0.02745 0.05692 44 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.382 0.452 0.39 0.323\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 40/99 6.44G 0.02186 0.007114 0.0268 0.05577 52 320\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.362 0.441 0.394 0.341\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 41/99 6.44G 0.0222 0.007117 0.02663 0.05595 37 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.535 0.405 0.421 0.361\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 42/99 6.44G 0.02216 0.007183 0.02588 0.05522 33 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.447 0.417 0.409 0.356\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 43/99 6.44G 0.02219 0.007101 0.02547 0.05476 47 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.323 0.496 0.391 0.338\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 44/99 6.44G 0.02182 0.006971 0.02509 0.05388 41 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.351 0.486 0.426 0.365\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 45/99 6.44G 0.0217 0.006926 0.02502 0.05364 44 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.435 0.44 0.432 0.371\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 46/99 6.44G 0.0217 0.006932 0.02458 0.05322 46 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.583 0.421 0.455 0.389\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 47/99 6.44G 0.02152 0.006853 0.02405 0.05243 45 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.731 0.345 0.449 0.385\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 48/99 6.44G 0.02104 0.006943 0.02369 0.05167 39 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.455 0.449 0.443 0.378\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 49/99 6.44G 0.02078 0.006797 0.0225 0.05007 43 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.427 0.496 0.449 0.382\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 50/99 6.44G 0.02096 0.00671 0.0217 0.04937 37 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.448 0.438 0.454 0.398\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 51/99 6.44G 0.02091 0.006828 0.02204 0.04978 41 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.456 0.495 0.464 0.403\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 52/99 6.44G 0.02067 0.006721 0.0207 0.04809 45 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.521 0.442 0.488 0.427\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 53/99 6.44G 0.0207 0.006638 0.02062 0.04796 49 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.453 0.448 0.464 0.408\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 54/99 6.44G 0.02011 0.006675 0.02031 0.04709 42 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.538 0.407 0.469 0.409\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 55/99 6.44G 0.02013 0.006693 0.01989 0.04671 44 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.56 0.419 0.482 0.421\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 56/99 6.44G 0.01978 0.006548 0.01918 0.04551 50 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.544 0.413 0.477 0.428\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 57/99 6.44G 0.01954 0.006527 0.01855 0.04462 46 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.563 0.456 0.496 0.436\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 58/99 6.44G 0.01977 0.006555 0.0187 0.04502 41 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.398 0.513 0.494 0.437\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 59/99 6.44G 0.01951 0.006455 0.01861 0.04457 45 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.488 0.449 0.476 0.425\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 60/99 6.44G 0.01906 0.006252 0.01783 0.04314 33 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.564 0.431 0.501 0.445\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 61/99 6.44G 0.01925 0.006372 0.01786 0.04348 61 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.487 0.461 0.491 0.439\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 62/99 6.44G 0.0186 0.006425 0.01742 0.04245 53 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.511 0.452 0.504 0.453\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 63/99 6.44G 0.01871 0.006261 0.01705 0.04201 42 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.478 0.497 0.51 0.461\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 64/99 6.44G 0.01825 0.006214 0.01572 0.04018 49 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.536 0.457 0.505 0.45\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 65/99 6.44G 0.01821 0.006159 0.01588 0.04025 40 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.534 0.474 0.501 0.452\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 66/99 6.44G 0.01829 0.006155 0.01586 0.04031 43 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.442 0.504 0.508 0.459\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 67/99 6.44G 0.01856 0.006116 0.0157 0.04038 38 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.418 0.515 0.502 0.449\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 68/99 6.44G 0.01776 0.006024 0.01507 0.03885 47 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.501 0.47 0.518 0.463\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 69/99 6.44G 0.01792 0.00615 0.01507 0.03914 37 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.436 0.54 0.513 0.468\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 70/99 6.44G 0.01757 0.005912 0.01453 0.03801 41 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.438 0.545 0.524 0.472\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 71/99 6.44G 0.01759 0.005946 0.01469 0.03822 36 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.465 0.49 0.524 0.479\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 72/99 6.44G 0.01749 0.005838 0.01451 0.03783 39 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.479 0.507 0.492 0.446\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 73/99 6.44G 0.01716 0.005929 0.01375 0.03684 56 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.446 0.539 0.523 0.472\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 74/99 6.44G 0.01694 0.005841 0.01355 0.03633 50 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.592 0.465 0.527 0.482\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 75/99 6.44G 0.01677 0.00572 0.01317 0.03566 52 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.512 0.499 0.535 0.489\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 76/99 6.44G 0.01654 0.005625 0.01247 0.03463 30 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.579 0.444 0.524 0.474\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 77/99 6.44G 0.01675 0.005614 0.01276 0.03513 57 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.595 0.491 0.54 0.494\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 78/99 6.44G 0.01673 0.005599 0.01259 0.03492 56 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.567 0.474 0.529 0.485\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 79/99 6.44G 0.01606 0.005595 0.01216 0.03382 43 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.466 0.518 0.531 0.477\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 80/99 6.44G 0.01609 0.005451 0.01197 0.03351 48 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.473 0.492 0.517 0.475\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 81/99 6.44G 0.01588 0.00554 0.01182 0.03324 42 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.42 0.558 0.535 0.485\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 82/99 6.44G 0.01603 0.005463 0.01159 0.03308 50 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.558 0.483 0.533 0.486\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 83/99 6.44G 0.0156 0.005384 0.011 0.03199 40 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.518 0.508 0.539 0.497\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 84/99 6.44G 0.01566 0.005527 0.01138 0.03256 58 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.58 0.468 0.535 0.494\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 85/99 6.44G 0.0153 0.005317 0.01069 0.03131 42 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.553 0.501 0.535 0.493\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 86/99 6.44G 0.01562 0.005215 0.01068 0.03151 59 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.525 0.507 0.531 0.488\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 87/99 6.44G 0.01566 0.005309 0.01105 0.03202 46 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.512 0.502 0.538 0.492\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 88/99 6.44G 0.0151 0.005244 0.01063 0.03097 39 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.57 0.458 0.529 0.486\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" 89/99 6.44G 0.01505 0.005278 0.01022 0.03055 48 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.476 0.551 0.547 0.502\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 90/99 6.44G 0.01501 0.005181 0.01009 0.03027 55 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.494 0.518 0.537 0.496\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 91/99 6.44G 0.01523 0.005123 0.01002 0.03037 62 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.468 0.533 0.528 0.484\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 92/99 6.44G 0.01521 0.005139 0.01012 0.03047 44 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.502 0.525 0.545 0.502\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 93/99 6.44G 0.01497 0.005197 0.009876 0.03005 62 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.445 0.537 0.519 0.481\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 94/99 6.44G 0.01451 0.005055 0.00956 0.02912 51 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.45 0.562 0.531 0.493\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 95/99 6.44G 0.01485 0.004949 0.009359 0.02915 41 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.493 0.519 0.528 0.488\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 96/99 6.44G 0.01494 0.005117 0.00978 0.02984 38 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.497 0.506 0.521 0.48\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 97/99 6.44G 0.01462 0.005048 0.009439 0.02911 37 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.527 0.484 0.528 0.492\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 98/99 6.44G 0.01449 0.005025 0.00876 0.02828 41 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.536 0.502 0.529 0.491\n",
"\n",
" Epoch gpu_mem box obj cls total labels img_size\n",
" 99/99 6.44G 0.01458 0.005102 0.009102 0.02878 48 320\n",
" Class Images Labels P R mAP@.5\n",
" all 499 367 0.528 0.504 0.527 0.492\n",
"100 epochs completed in 4.077 hours.\n",
"\n",
"Optimizer stripped from runs/train/exp2/weights/last.pt, 75.8MB\n",
"Optimizer stripped from runs/train/exp2/weights/best.pt, 75.8MB\n"
]
}
],
"source": [
"!python train.py --batch-size 32 --img 320 320 --data /user/charviku/DL_Project/ingredients.yaml --cfg cfg/training/yolov7.yaml --weights 'yolov7.pt' --device 0 --epochs 100 --workers 4"
]
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"gpuType": "T4",
"provenance": []
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
|