Dataset Viewer (First 5GB)
Auto-converted to Parquet
Search is not available for this dataset
text
stringlengths
2.03k
93.4M
id
stringlengths
22
24
file_path
stringclasses
44 values
{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "63595224", "metadata": { "_cell_guid": "b1076dfc-b9ad-4769-8c92-a6c4dae69d19", "_uuid": "8f2839f25d086af736a60e9eeb907d3b93b6e0e5", "execution": { "iopub.execute_input": "2023-04-08T10:03:23.803314Z", "iopub.status.busy": "2023-04-08T10:03:23.802611Z", "iopub.status.idle": "2023-04-08T10:03:26.560047Z", "shell.execute_reply": "2023-04-08T10:03:26.558738Z" }, "papermill": { "duration": 2.764565, "end_time": "2023-04-08T10:03:26.562557", "exception": false, "start_time": "2023-04-08T10:03:23.797992", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "%%capture\n", "!git clone https://github.com/ultralytics/yolov5.git" ] }, { "cell_type": "code", "execution_count": 2, "id": "0e07f928", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:03:26.570163Z", "iopub.status.busy": "2023-04-08T10:03:26.569189Z", "iopub.status.idle": "2023-04-08T10:03:47.482550Z", "shell.execute_reply": "2023-04-08T10:03:47.481156Z" }, "papermill": { "duration": 20.919718, "end_time": "2023-04-08T10:03:47.485279", "exception": false, "start_time": "2023-04-08T10:03:26.565561", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "%%capture\n", "!pip install -r yolov5/requirements.txt" ] }, { "cell_type": "code", "execution_count": 3, "id": "afb72c72", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:03:47.491830Z", "iopub.status.busy": "2023-04-08T10:03:47.491506Z", "iopub.status.idle": "2023-04-08T10:03:58.683913Z", "shell.execute_reply": "2023-04-08T10:03:58.682874Z" }, "papermill": { "duration": 11.198707, "end_time": "2023-04-08T10:03:58.686565", "exception": false, "start_time": "2023-04-08T10:03:47.487858", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "import os\n", "import shutil\n", "\n", "# Define the path to your dataset\n", "dataset_path = '/kaggle/input/glasses-detection-yolo-format/data'\n", "\n", "# Create a directory for the images and labels in the working directory\n", "output_path = '/kaggle/working'\n", "image_path = os.path.join(output_path, 'images')\n", "os.makedirs(image_path, exist_ok=True)\n", "label_path = os.path.join(output_path, 'labels')\n", "os.makedirs(label_path, exist_ok=True)\n", "\n", "for filename in os.listdir(dataset_path):\n", " if filename.endswith('.jpg') or filename.endswith('.jpeg'):\n", " # If the file is an image, copy it to the images directory\n", " src_path = os.path.join(dataset_path, filename)\n", " dst_path = os.path.join(image_path, filename)\n", " shutil.copy(src_path, dst_path)\n", " elif filename.endswith('.txt'):\n", " # If the file is a label, copy it to the labels directory\n", " src_path = os.path.join(dataset_path, filename)\n", " dst_path = os.path.join(label_path, filename)\n", " shutil.copy(src_path, dst_path)\n" ] }, { "cell_type": "code", "execution_count": 4, "id": "d10916ef", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:03:58.692804Z", "iopub.status.busy": "2023-04-08T10:03:58.692485Z", "iopub.status.idle": "2023-04-08T10:03:58.719261Z", "shell.execute_reply": "2023-04-08T10:03:58.718333Z" }, "papermill": { "duration": 0.03231, "end_time": "2023-04-08T10:03:58.721465", "exception": false, "start_time": "2023-04-08T10:03:58.689155", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "import yaml\n", "\n", "# Define the path to the YAML file\n", "yaml_path = '/kaggle/working/yolov5/data/my_dataset.yaml'\n", "\n", "# Define the contents of the YAML file\n", "data = dict(\n", " train='../yolov5/images',\n", " val='../yolov5/images',\n", " nc=2,\n", " names=['no_glasses', 'with_glasses']\n", ")\n", "\n", "# Write the YAML file\n", "with open(yaml_path, 'w') as f:\n", " yaml.dump(data, f)" ] }, { "cell_type": "code", "execution_count": 5, "id": "bc800699", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:03:58.727186Z", "iopub.status.busy": "2023-04-08T10:03:58.726918Z", "iopub.status.idle": "2023-04-08T10:03:58.736995Z", "shell.execute_reply": "2023-04-08T10:03:58.736068Z" }, "papermill": { "duration": 0.01545, "end_time": "2023-04-08T10:03:58.739146", "exception": false, "start_time": "2023-04-08T10:03:58.723696", "status": "completed" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "'/kaggle/working/yolov5/labels'" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "yolov5_path = '/kaggle/working/yolov5'\n", "shutil.move('/kaggle/working/images', yolov5_path)\n", "shutil.move('/kaggle/working/labels', yolov5_path)" ] }, { "cell_type": "code", "execution_count": 6, "id": "e23fb071", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:03:58.744951Z", "iopub.status.busy": "2023-04-08T10:03:58.744680Z", "iopub.status.idle": "2023-04-08T10:03:58.751664Z", "shell.execute_reply": "2023-04-08T10:03:58.750453Z" }, "papermill": { "duration": 0.012349, "end_time": "2023-04-08T10:03:58.753916", "exception": false, "start_time": "2023-04-08T10:03:58.741567", "status": "completed" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "/kaggle/working/yolov5\n" ] } ], "source": [ "cd '/kaggle/working/yolov5'" ] }, { "cell_type": "code", "execution_count": 7, "id": "4225af62", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:03:58.759903Z", "iopub.status.busy": "2023-04-08T10:03:58.759638Z", "iopub.status.idle": "2023-04-08T15:39:09.798704Z", "shell.execute_reply": "2023-04-08T15:39:09.797429Z" }, "papermill": { "duration": 20111.045705, "end_time": "2023-04-08T15:39:09.801958", "exception": false, "start_time": "2023-04-08T10:03:58.756253", "status": "completed" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[34m\u001b[1mwandb\u001b[0m: WARNING ⚠️ wandb is deprecated and will be removed in a future release. See supported integrations at https://github.com/ultralytics/yolov5#integrations.\r\n", "\u001b[34m\u001b[1mwandb\u001b[0m: (1) Create a W&B account\r\n", "\u001b[34m\u001b[1mwandb\u001b[0m: (2) Use an existing W&B account\r\n", "\u001b[34m\u001b[1mwandb\u001b[0m: (3) Don't visualize my results\r\n", "\u001b[34m\u001b[1mwandb\u001b[0m: Enter your choice: (30 second timeout) \r\n", "\u001b[34m\u001b[1mwandb\u001b[0m: W&B disabled due to login timeout.\r\n", "\u001b[34m\u001b[1mtrain: \u001b[0mweights=yolov5s.pt, cfg=yolov5s.yaml, data=my_dataset.yaml, hyp=hyp.scratch-low.yaml, epochs=100, batch_size=32, imgsz=320, rect=False, resume=False, nosave=False, noval=False, noautoanchor=False, noplots=False, evolve=None, bucket=, cache=None, image_weights=False, device=, multi_scale=False, single_cls=False, optimizer=SGD, sync_bn=False, workers=24, project=runs/train, name=yolo_glasses_det, exist_ok=False, quad=False, cos_lr=False, label_smoothing=0.0, patience=100, freeze=[0], save_period=-1, seed=0, local_rank=-1, entity=None, upload_dataset=False, bbox_interval=-1, artifact_alias=latest\r\n", "\u001b[34m\u001b[1mgithub: \u001b[0mup to date with https://github.com/ultralytics/yolov5 ✅\r\n", "\u001b[31m\u001b[1mrequirements:\u001b[0m YOLOv5 requirements \"tqdm>=4.64.0\" \"tensorboard>=2.4.1\" not found, attempting AutoUpdate...\r\n", "\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\r\n", "\u001b[0mRequirement already satisfied: tqdm>=4.64.0 in /opt/conda/lib/python3.7/site-packages (4.64.1)\r\n", "Requirement already satisfied: tensorboard>=2.4.1 in /opt/conda/lib/python3.7/site-packages (2.11.2)\r\n", "Requirement already satisfied: grpcio>=1.24.3 in /opt/conda/lib/python3.7/site-packages (from tensorboard>=2.4.1) (1.51.1)\r\n", "Requirement already satisfied: numpy>=1.12.0 in /opt/conda/lib/python3.7/site-packages (from tensorboard>=2.4.1) (1.21.6)\r\n", "Requirement already satisfied: wheel>=0.26 in /opt/conda/lib/python3.7/site-packages (from tensorboard>=2.4.1) (0.38.4)\r\n", "Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /opt/conda/lib/python3.7/site-packages (from tensorboard>=2.4.1) (0.6.1)\r\n", "Requirement already satisfied: absl-py>=0.4 in /opt/conda/lib/python3.7/site-packages (from tensorboard>=2.4.1) (1.4.0)\r\n", "Requirement already satisfied: requests<3,>=2.21.0 in /opt/conda/lib/python3.7/site-packages (from tensorboard>=2.4.1) (2.28.2)\r\n", "Requirement already satisfied: protobuf<4,>=3.9.2 in /opt/conda/lib/python3.7/site-packages (from tensorboard>=2.4.1) (3.20.3)\r\n", "Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /opt/conda/lib/python3.7/site-packages (from tensorboard>=2.4.1) (1.8.1)\r\n", "Requirement already satisfied: setuptools>=41.0.0 in /opt/conda/lib/python3.7/site-packages (from tensorboard>=2.4.1) (67.6.1)\r\n", "Requirement already satisfied: markdown>=2.6.8 in /opt/conda/lib/python3.7/site-packages (from tensorboard>=2.4.1) (3.4.1)\r\n", "Requirement already satisfied: google-auth<3,>=1.6.3 in /opt/conda/lib/python3.7/site-packages (from tensorboard>=2.4.1) (1.35.0)\r\n", "Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /opt/conda/lib/python3.7/site-packages (from tensorboard>=2.4.1) (0.4.6)\r\n", "Requirement already satisfied: werkzeug>=1.0.1 in /opt/conda/lib/python3.7/site-packages (from tensorboard>=2.4.1) (2.2.3)\r\n", "Requirement already satisfied: pyasn1-modules>=0.2.1 in /opt/conda/lib/python3.7/site-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1) (0.2.8)\r\n", "Requirement already satisfied: rsa<5,>=3.1.4 in /opt/conda/lib/python3.7/site-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1) (4.9)\r\n", "Requirement already satisfied: cachetools<5.0,>=2.0.0 in /opt/conda/lib/python3.7/site-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1) (4.2.4)\r\n", "Requirement already satisfied: six>=1.9.0 in /opt/conda/lib/python3.7/site-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1) (1.16.0)\r\n", "Requirement already satisfied: requests-oauthlib>=0.7.0 in /opt/conda/lib/python3.7/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard>=2.4.1) (1.3.1)\r\n", "Requirement already satisfied: importlib-metadata>=4.4 in /opt/conda/lib/python3.7/site-packages (from markdown>=2.6.8->tensorboard>=2.4.1) (4.11.4)\r\n", "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /opt/conda/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard>=2.4.1) (1.26.14)\r\n", "Requirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard>=2.4.1) (2.1.1)\r\n", "Requirement already satisfied: idna<4,>=2.5 in /opt/conda/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard>=2.4.1) (3.4)\r\n", "Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard>=2.4.1) (2022.12.7)\r\n", "Requirement already satisfied: MarkupSafe>=2.1.1 in /opt/conda/lib/python3.7/site-packages (from werkzeug>=1.0.1->tensorboard>=2.4.1) (2.1.1)\r\n", "Requirement already satisfied: zipp>=0.5 in /opt/conda/lib/python3.7/site-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard>=2.4.1) (3.11.0)\r\n", "Requirement already satisfied: typing-extensions>=3.6.4 in /opt/conda/lib/python3.7/site-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard>=2.4.1) (4.4.0)\r\n", "Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /opt/conda/lib/python3.7/site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard>=2.4.1) (0.4.8)\r\n", "Requirement already satisfied: oauthlib>=3.0.0 in /opt/conda/lib/python3.7/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard>=2.4.1) (3.2.2)\r\n", "\r\n", "\u001b[31m\u001b[1mrequirements:\u001b[0m 2 packages updated per /kaggle/working/yolov5/requirements.txt\r\n", "\u001b[31m\u001b[1mrequirements:\u001b[0m ⚠️ \u001b[1mRestart runtime or rerun command for updates to take effect\u001b[0m\r\n", "\r\n", "YOLOv5 🚀 v7.0-134-g23c4923 Python-3.7.12 torch-1.13.0 CUDA:0 (Tesla P100-PCIE-16GB, 16281MiB)\r\n", "\r\n", "\u001b[34m\u001b[1mhyperparameters: \u001b[0mlr0=0.01, lrf=0.01, 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.5, cls_pw=1.0, obj=1.0, 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.1, 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\r\n", "\u001b[34m\u001b[1mClearML: \u001b[0mrun 'pip install clearml' to automatically track, visualize and remotely train YOLOv5 🚀 in ClearML\r\n", "\u001b[34m\u001b[1mComet: \u001b[0mrun 'pip install comet_ml' to automatically track and visualize YOLOv5 🚀 runs in Comet\r\n", "\u001b[34m\u001b[1mTensorBoard: \u001b[0mStart with 'tensorboard --logdir runs/train', view at http://localhost:6006/\r\n", "Downloading https://ultralytics.com/assets/Arial.ttf to /root/.config/Ultralytics/Arial.ttf...\r\n", "100%|████████████████████████████████████████| 755k/755k [00:00<00:00, 24.7MB/s]\r\n", "Downloading https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s.pt to yolov5s.pt...\r\n", "100%|██████████████████████████████████████| 14.1M/14.1M [00:00<00:00, 33.5MB/s]\r\n", "\r\n", "Overriding model.yaml nc=80 with nc=2\r\n", "\r\n", " from n params module arguments \r\n", " 0 -1 1 3520 models.common.Conv [3, 32, 6, 2, 2] \r\n", " 1 -1 1 18560 models.common.Conv [32, 64, 3, 2] \r\n", " 2 -1 1 18816 models.common.C3 [64, 64, 1] \r\n", " 3 -1 1 73984 models.common.Conv [64, 128, 3, 2] \r\n", " 4 -1 2 115712 models.common.C3 [128, 128, 2] \r\n", " 5 -1 1 295424 models.common.Conv [128, 256, 3, 2] \r\n", " 6 -1 3 625152 models.common.C3 [256, 256, 3] \r\n", " 7 -1 1 1180672 models.common.Conv [256, 512, 3, 2] \r\n", " 8 -1 1 1182720 models.common.C3 [512, 512, 1] \r\n", " 9 -1 1 656896 models.common.SPPF [512, 512, 5] \r\n", " 10 -1 1 131584 models.common.Conv [512, 256, 1, 1] \r\n", " 11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \r\n", " 12 [-1, 6] 1 0 models.common.Concat [1] \r\n", " 13 -1 1 361984 models.common.C3 [512, 256, 1, False] \r\n", " 14 -1 1 33024 models.common.Conv [256, 128, 1, 1] \r\n", " 15 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \r\n", " 16 [-1, 4] 1 0 models.common.Concat [1] \r\n", " 17 -1 1 90880 models.common.C3 [256, 128, 1, False] \r\n", " 18 -1 1 147712 models.common.Conv [128, 128, 3, 2] \r\n", " 19 [-1, 14] 1 0 models.common.Concat [1] \r\n", " 20 -1 1 296448 models.common.C3 [256, 256, 1, False] \r\n", " 21 -1 1 590336 models.common.Conv [256, 256, 3, 2] \r\n", " 22 [-1, 10] 1 0 models.common.Concat [1] \r\n", " 23 -1 1 1182720 models.common.C3 [512, 512, 1, False] \r\n", " 24 [17, 20, 23] 1 18879 models.yolo.Detect [2, [[10, 13, 16, 30, 33, 23], [30, 61, 62, 45, 59, 119], [116, 90, 156, 198, 373, 326]], [128, 256, 512]]\r\n", "YOLOv5s summary: 214 layers, 7025023 parameters, 7025023 gradients, 16.0 GFLOPs\r\n", "\r\n", "Transferred 342/349 items from yolov5s.pt\r\n", "\u001b[34m\u001b[1mAMP: \u001b[0mchecks passed ✅\r\n", "\u001b[34m\u001b[1moptimizer:\u001b[0m SGD(lr=0.01) with parameter groups 57 weight(decay=0.0), 60 weight(decay=0.0005), 60 bias\r\n", "\u001b[34m\u001b[1malbumentations: \u001b[0mBlur(p=0.01, blur_limit=(3, 7)), MedianBlur(p=0.01, blur_limit=(3, 7)), ToGray(p=0.01), CLAHE(p=0.01, clip_limit=(1, 4.0), tile_grid_size=(8, 8))\r\n", "\u001b[34m\u001b[1mtrain: \u001b[0mScanning /kaggle/working/yolov5/labels... 133 images, 0 backgrounds, 0 co\u001b[0m\r\n", "\u001b[34m\u001b[1mtrain: \u001b[0mNew cache created: /kaggle/working/yolov5/labels.cache\r\n", "\u001b[34m\u001b[1mval: \u001b[0mScanning /kaggle/working/yolov5/labels.cache... 133 images, 0 backgrounds, \u001b[0m\r\n", "\r\n", "\u001b[34m\u001b[1mAutoAnchor: \u001b[0m4.02 anchors/target, 1.000 Best Possible Recall (BPR). Current anchors are a good fit to dataset ✅\r\n", "Plotting labels to runs/train/yolo_glasses_det/labels.jpg... \r\n", "Image sizes 320 train, 320 val\r\n", "Using 2 dataloader workers\r\n", "Logging results to \u001b[1mruns/train/yolo_glasses_det\u001b[0m\r\n", "Starting training for 100 epochs...\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 0/99 1.82G 0.1311 0.00906 0.02928 8 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 7.75e-05 0.0208 4.19e-05 4.19e-06\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 1/99 2.08G 0.1254 0.01001 0.02872 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.000126 0.0354 7.67e-05 1.72e-05\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 2/99 2.08G 0.1189 0.01154 0.02885 13 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.000225 0.0625 0.000125 3.07e-05\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 3/99 2.08G 0.1092 0.01208 0.0265 5 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.000319 0.0187 0.00103 0.000383\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 4/99 2.08G 0.1048 0.01247 0.0266 7 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.000491 0.14 0.000292 8.06e-05\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 5/99 2.08G 0.1015 0.01379 0.02544 10 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.000667 0.192 0.000553 0.000117\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 6/99 2.08G 0.09823 0.01261 0.02404 7 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.000757 0.217 0.000706 0.000175\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 7/99 2.08G 0.09394 0.01398 0.02255 8 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.00105 0.3 0.0011 0.000233\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 8/99 2.08G 0.09305 0.01437 0.02302 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.00158 0.45 0.00151 0.000389\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 9/99 2.08G 0.08783 0.01455 0.02247 11 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.00233 0.623 0.00808 0.00216\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 10/99 2.08G 0.08106 0.01428 0.0211 10 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.00252 0.673 0.0285 0.0056\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 11/99 2.08G 0.08352 0.01335 0.02247 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.00303 0.798 0.0498 0.0143\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 12/99 2.08G 0.07804 0.01245 0.0209 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.13 0.215 0.0942 0.0205\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 13/99 2.08G 0.07874 0.01346 0.02099 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.138 0.0312 0.0596 0.0126\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 14/99 2.08G 0.07916 0.01305 0.02065 8 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.0215 0.567 0.0456 0.0109\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 15/99 2.08G 0.07626 0.01276 0.01855 6 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.306 0.252 0.179 0.0481\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 16/99 2.08G 0.07468 0.01209 0.01657 12 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.109 0.198 0.0836 0.0258\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 17/99 2.08G 0.07586 0.01255 0.0146 8 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.212 0.24 0.131 0.0288\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 18/99 2.08G 0.07551 0.01158 0.01438 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.287 0.322 0.222 0.0546\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 19/99 2.08G 0.07118 0.01102 0.01212 8 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.0869 0.306 0.0787 0.0207\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 20/99 2.08G 0.07194 0.01151 0.01114 8 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.276 0.25 0.214 0.0514\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 21/99 2.08G 0.06878 0.01176 0.01004 10 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.349 0.373 0.296 0.0714\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 22/99 2.08G 0.06765 0.01152 0.009298 10 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.296 0.387 0.275 0.0602\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 23/99 2.08G 0.06959 0.01091 0.01061 7 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.678 0.383 0.525 0.16\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 24/99 2.08G 0.06294 0.01032 0.01053 10 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.325 0.327 0.284 0.0781\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 25/99 2.08G 0.06653 0.0114 0.008399 11 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.635 0.533 0.568 0.21\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 26/99 2.08G 0.06234 0.0102 0.01365 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.335 0.531 0.309 0.0935\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 27/99 2.08G 0.06255 0.01035 0.006395 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.545 0.54 0.558 0.162\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 28/99 2.08G 0.06099 0.01005 0.006439 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.589 0.565 0.594 0.187\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 29/99 2.08G 0.06185 0.009531 0.005472 11 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.723 0.607 0.694 0.255\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 30/99 2.08G 0.05822 0.01011 0.005959 7 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.718 0.569 0.666 0.227\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 31/99 2.08G 0.05904 0.009549 0.005451 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.637 0.638 0.664 0.241\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 32/99 2.08G 0.05735 0.01051 0.00588 11 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.747 0.643 0.712 0.254\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 33/99 2.08G 0.05428 0.008754 0.005026 11 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.562 0.742 0.657 0.197\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 34/99 2.08G 0.05328 0.009273 0.005935 10 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.694 0.742 0.726 0.232\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 35/99 2.08G 0.05443 0.009382 0.004687 10 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.587 0.718 0.654 0.245\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 36/99 2.08G 0.05379 0.008759 0.003353 5 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.674 0.664 0.668 0.203\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 37/99 2.08G 0.05206 0.008254 0.003142 6 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.787 0.794 0.829 0.311\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 38/99 2.08G 0.05829 0.008697 0.004519 11 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.788 0.803 0.851 0.352\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 39/99 2.08G 0.05261 0.007873 0.003513 7 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.648 0.783 0.724 0.286\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 40/99 2.08G 0.04827 0.009399 0.003718 13 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.831 0.772 0.835 0.352\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 41/99 2.08G 0.04786 0.009583 0.004975 14 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.861 0.801 0.897 0.414\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 42/99 2.08G 0.05037 0.007538 0.003178 6 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.89 0.752 0.887 0.377\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 43/99 2.08G 0.04798 0.00858 0.003711 5 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.832 0.769 0.857 0.384\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 44/99 2.08G 0.04664 0.009331 0.002942 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.687 0.8 0.728 0.315\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 45/99 2.08G 0.04832 0.008557 0.003522 14 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.833 0.753 0.854 0.339\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 46/99 2.08G 0.04498 0.008594 0.002365 11 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.876 0.796 0.874 0.331\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 47/99 2.08G 0.04477 0.007792 0.003881 8 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.83 0.867 0.907 0.418\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 48/99 2.08G 0.04848 0.007692 0.002047 6 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.846 0.879 0.916 0.387\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 49/99 2.08G 0.04399 0.00756 0.002722 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.783 0.866 0.854 0.385\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 50/99 2.08G 0.04445 0.00848 0.002784 19 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.886 0.891 0.933 0.469\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 51/99 2.08G 0.04444 0.007793 0.001998 13 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.909 0.885 0.933 0.487\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 52/99 2.08G 0.04425 0.007719 0.003184 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.825 0.891 0.927 0.491\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 53/99 2.08G 0.04217 0.007922 0.003092 12 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.94 0.841 0.948 0.509\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 54/99 2.08G 0.03956 0.006778 0.00208 3 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.825 0.825 0.849 0.405\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 55/99 2.08G 0.03961 0.006825 0.00205 5 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.794 0.921 0.92 0.437\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 56/99 2.08G 0.04057 0.007253 0.002727 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.901 0.869 0.938 0.504\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 57/99 2.08G 0.03977 0.007841 0.002813 11 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.913 0.932 0.958 0.499\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 58/99 2.08G 0.04072 0.007157 0.002212 7 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.907 0.902 0.947 0.505\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 59/99 2.08G 0.03957 0.007615 0.00231 12 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.944 0.943 0.968 0.528\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 60/99 2.08G 0.03862 0.007188 0.001953 8 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.944 0.943 0.969 0.538\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 61/99 2.08G 0.03859 0.007565 0.002956 11 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.949 0.937 0.974 0.518\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 62/99 2.08G 0.03875 0.007161 0.003702 12 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.934 0.919 0.966 0.385\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 63/99 2.08G 0.03722 0.006528 0.001811 5 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.967 0.937 0.981 0.596\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 64/99 2.08G 0.03685 0.007454 0.002233 8 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.947 0.949 0.977 0.586\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 65/99 2.08G 0.03498 0.006493 0.002524 10 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.859 0.938 0.943 0.508\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 66/99 2.08G 0.03687 0.006779 0.002774 11 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.957 0.951 0.982 0.572\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 67/99 2.08G 0.035 0.006943 0.001782 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.949 0.958 0.978 0.563\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 68/99 2.08G 0.03599 0.006265 0.002749 5 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.929 0.941 0.973 0.492\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 69/99 2.08G 0.03785 0.006824 0.001213 12 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.916 0.942 0.975 0.51\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 70/99 2.08G 0.03698 0.006897 0.001501 8 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.969 0.955 0.983 0.573\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 71/99 2.08G 0.03685 0.006234 0.00163 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.954 0.928 0.977 0.58\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 72/99 2.08G 0.03347 0.007197 0.002253 10 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.944 0.948 0.977 0.582\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 73/99 2.08G 0.03425 0.006328 0.001422 7 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.935 0.95 0.972 0.575\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 74/99 2.08G 0.03445 0.006145 0.001638 6 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.952 0.963 0.985 0.598\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 75/99 2.08G 0.03561 0.006504 0.001263 7 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.95 0.937 0.972 0.573\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 76/99 2.08G 0.03406 0.007234 0.001578 14 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.954 0.944 0.981 0.608\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 77/99 2.08G 0.03299 0.007192 0.001044 12 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.967 0.963 0.983 0.618\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 78/99 2.08G 0.03213 0.007016 0.001574 10 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.964 0.975 0.988 0.601\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 79/99 2.08G 0.03057 0.005542 0.0009706 5 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.965 0.963 0.986 0.627\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 80/99 2.08G 0.03095 0.006986 0.001438 10 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.978 0.957 0.987 0.646\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 81/99 2.08G 0.03296 0.006044 0.001274 4 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.956 0.97 0.99 0.635\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 82/99 2.08G 0.02938 0.006094 0.001583 8 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.962 0.97 0.99 0.656\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 83/99 2.08G 0.03094 0.006903 0.001132 12 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.971 0.963 0.99 0.636\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 84/99 2.08G 0.03164 0.006661 0.001052 10 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.966 0.963 0.99 0.643\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 85/99 2.08G 0.03397 0.006788 0.00127 8 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.942 0.97 0.989 0.644\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 86/99 2.08G 0.02924 0.006947 0.0008702 18 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.942 0.972 0.989 0.649\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 87/99 2.08G 0.02847 0.006582 0.001598 14 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.977 0.96 0.989 0.657\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 88/99 2.08G 0.03033 0.007059 0.001871 14 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.975 0.976 0.99 0.664\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 89/99 2.08G 0.02811 0.006297 0.00143 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.975 0.971 0.988 0.656\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 90/99 2.08G 0.03078 0.006939 0.001127 11 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.974 0.972 0.989 0.674\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 91/99 2.08G 0.02822 0.006083 0.0008664 6 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.969 0.97 0.989 0.666\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 92/99 2.08G 0.02742 0.0058 0.0007475 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.971 0.967 0.989 0.683\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 93/99 2.08G 0.02799 0.006099 0.0009196 11 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.973 0.974 0.99 0.695\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 94/99 2.08G 0.02885 0.005759 0.001305 6 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.975 0.98 0.992 0.679\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 95/99 2.08G 0.02911 0.006442 0.00188 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.973 0.967 0.992 0.679\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 96/99 2.08G 0.0256 0.005368 0.0006449 9 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.979 0.966 0.99 0.679\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 97/99 2.08G 0.02798 0.006242 0.001544 11 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.981 0.966 0.99 0.696\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 98/99 2.08G 0.02912 0.00642 0.001193 11 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.981 0.966 0.99 0.697\r\n", "\r\n", " Epoch GPU_mem box_loss obj_loss cls_loss Instances Size\r\n", " 99/99 2.08G 0.02788 0.006269 0.001092 15 320: 1\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.981 0.972 0.993 0.701\r\n", "\r\n", "100 epochs completed in 5.531 hours.\r\n", "Optimizer stripped from runs/train/yolo_glasses_det/weights/last.pt, 14.3MB\r\n", "Optimizer stripped from runs/train/yolo_glasses_det/weights/best.pt, 14.3MB\r\n", "\r\n", "Validating runs/train/yolo_glasses_det/weights/best.pt...\r\n", "Fusing layers... \r\n", "YOLOv5s summary: 157 layers, 7015519 parameters, 0 gradients, 15.8 GFLOPs\r\n", " Class Images Instances P R mAP50 \r\n", " all 133 140 0.981 0.972 0.993 0.699\r\n", " no_glasses 133 60 0.983 0.993 0.994 0.697\r\n", " with_glasses 133 80 0.979 0.95 0.991 0.702\r\n", "Results saved to \u001b[1mruns/train/yolo_glasses_det\u001b[0m\r\n" ] } ], "source": [ "!python train.py --img 320 --cfg yolov5s.yaml --hyp hyp.scratch-low.yaml --batch 32 --epochs 100 --data my_dataset.yaml --weights yolov5s.pt --workers 24 --name yolo_glasses_det" ] }, { "cell_type": "code", "execution_count": null, "id": "e272116a", "metadata": { "papermill": { "duration": 0.058453, "end_time": "2023-04-08T15:39:09.920777", "exception": false, "start_time": "2023-04-08T15:39:09.862324", "status": "completed" }, "tags": [] }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.7.12" }, "papermill": { "default_parameters": {}, "duration": 20155.449782, "end_time": "2023-04-08T15:39:10.539974", "environment_variables": {}, "exception": null, "input_path": "__notebook__.ipynb", "output_path": "__notebook__.ipynb", "parameters": {}, "start_time": "2023-04-08T10:03:15.090192", "version": "2.4.0" } }, "nbformat": 4, "nbformat_minor": 5 }
0125/018/125018496.ipynb
s3://data-agents/kaggle-outputs/sharded/000_00125.jsonl.gz
{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "f7ba31cf", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:05:39.286194Z", "iopub.status.busy": "2023-04-08T10:05:39.285649Z", "iopub.status.idle": "2023-04-08T10:05:40.507279Z", "shell.execute_reply": "2023-04-08T10:05:40.506122Z" }, "papermill": { "duration": 1.235197, "end_time": "2023-04-08T10:05:40.510154", "exception": false, "start_time": "2023-04-08T10:05:39.274957", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "from sklearn.linear_model import LinearRegression\n", "from sklearn.model_selection import train_test_split\n", "from sklearn.metrics import r2_score" ] }, { "cell_type": "code", "execution_count": 2, "id": "6cf91b04", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:05:40.528150Z", "iopub.status.busy": "2023-04-08T10:05:40.527724Z", "iopub.status.idle": "2023-04-08T10:05:40.627023Z", "shell.execute_reply": "2023-04-08T10:05:40.625885Z" }, "papermill": { "duration": 0.110881, "end_time": "2023-04-08T10:05:40.629757", "exception": false, "start_time": "2023-04-08T10:05:40.518876", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "from sklearn.datasets import load_diabetes\n", "x,y = load_diabetes(return_X_y=True)" ] }, { "cell_type": "code", "execution_count": 3, "id": "fe450e54", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:05:40.646872Z", "iopub.status.busy": "2023-04-08T10:05:40.646010Z", "iopub.status.idle": "2023-04-08T10:05:40.654910Z", "shell.execute_reply": "2023-04-08T10:05:40.653676Z" }, "papermill": { "duration": 0.020835, "end_time": "2023-04-08T10:05:40.658154", "exception": false, "start_time": "2023-04-08T10:05:40.637319", "status": "completed" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "array([[ 0.03807591, 0.05068012, 0.06169621, ..., -0.00259226,\n", " 0.01990842, -0.01764613],\n", " [-0.00188202, -0.04464164, -0.05147406, ..., -0.03949338,\n", " -0.06832974, -0.09220405],\n", " [ 0.08529891, 0.05068012, 0.04445121, ..., -0.00259226,\n", " 0.00286377, -0.02593034],\n", " ...,\n", " [ 0.04170844, 0.05068012, -0.01590626, ..., -0.01107952,\n", " -0.04687948, 0.01549073],\n", " [-0.04547248, -0.04464164, 0.03906215, ..., 0.02655962,\n", " 0.04452837, -0.02593034],\n", " [-0.04547248, -0.04464164, -0.0730303 , ..., -0.03949338,\n", " -0.00421986, 0.00306441]])" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "x" ] }, { "cell_type": "code", "execution_count": 4, "id": "0b33b8d6", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:05:40.675121Z", "iopub.status.busy": "2023-04-08T10:05:40.674685Z", "iopub.status.idle": "2023-04-08T10:05:40.686543Z", "shell.execute_reply": "2023-04-08T10:05:40.685299Z" }, "papermill": { "duration": 0.023194, "end_time": "2023-04-08T10:05:40.688938", "exception": false, "start_time": "2023-04-08T10:05:40.665744", "status": "completed" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "array([151., 75., 141., 206., 135., 97., 138., 63., 110., 310., 101.,\n", " 69., 179., 185., 118., 171., 166., 144., 97., 168., 68., 49.,\n", " 68., 245., 184., 202., 137., 85., 131., 283., 129., 59., 341.,\n", " 87., 65., 102., 265., 276., 252., 90., 100., 55., 61., 92.,\n", " 259., 53., 190., 142., 75., 142., 155., 225., 59., 104., 182.,\n", " 128., 52., 37., 170., 170., 61., 144., 52., 128., 71., 163.,\n", " 150., 97., 160., 178., 48., 270., 202., 111., 85., 42., 170.,\n", " 200., 252., 113., 143., 51., 52., 210., 65., 141., 55., 134.,\n", " 42., 111., 98., 164., 48., 96., 90., 162., 150., 279., 92.,\n", " 83., 128., 102., 302., 198., 95., 53., 134., 144., 232., 81.,\n", " 104., 59., 246., 297., 258., 229., 275., 281., 179., 200., 200.,\n", " 173., 180., 84., 121., 161., 99., 109., 115., 268., 274., 158.,\n", " 107., 83., 103., 272., 85., 280., 336., 281., 118., 317., 235.,\n", " 60., 174., 259., 178., 128., 96., 126., 288., 88., 292., 71.,\n", " 197., 186., 25., 84., 96., 195., 53., 217., 172., 131., 214.,\n", " 59., 70., 220., 268., 152., 47., 74., 295., 101., 151., 127.,\n", " 237., 225., 81., 151., 107., 64., 138., 185., 265., 101., 137.,\n", " 143., 141., 79., 292., 178., 91., 116., 86., 122., 72., 129.,\n", " 142., 90., 158., 39., 196., 222., 277., 99., 196., 202., 155.,\n", " 77., 191., 70., 73., 49., 65., 263., 248., 296., 214., 185.,\n", " 78., 93., 252., 150., 77., 208., 77., 108., 160., 53., 220.,\n", " 154., 259., 90., 246., 124., 67., 72., 257., 262., 275., 177.,\n", " 71., 47., 187., 125., 78., 51., 258., 215., 303., 243., 91.,\n", " 150., 310., 153., 346., 63., 89., 50., 39., 103., 308., 116.,\n", " 145., 74., 45., 115., 264., 87., 202., 127., 182., 241., 66.,\n", " 94., 283., 64., 102., 200., 265., 94., 230., 181., 156., 233.,\n", " 60., 219., 80., 68., 332., 248., 84., 200., 55., 85., 89.,\n", " 31., 129., 83., 275., 65., 198., 236., 253., 124., 44., 172.,\n", " 114., 142., 109., 180., 144., 163., 147., 97., 220., 190., 109.,\n", " 191., 122., 230., 242., 248., 249., 192., 131., 237., 78., 135.,\n", " 244., 199., 270., 164., 72., 96., 306., 91., 214., 95., 216.,\n", " 263., 178., 113., 200., 139., 139., 88., 148., 88., 243., 71.,\n", " 77., 109., 272., 60., 54., 221., 90., 311., 281., 182., 321.,\n", " 58., 262., 206., 233., 242., 123., 167., 63., 197., 71., 168.,\n", " 140., 217., 121., 235., 245., 40., 52., 104., 132., 88., 69.,\n", " 219., 72., 201., 110., 51., 277., 63., 118., 69., 273., 258.,\n", " 43., 198., 242., 232., 175., 93., 168., 275., 293., 281., 72.,\n", " 140., 189., 181., 209., 136., 261., 113., 131., 174., 257., 55.,\n", " 84., 42., 146., 212., 233., 91., 111., 152., 120., 67., 310.,\n", " 94., 183., 66., 173., 72., 49., 64., 48., 178., 104., 132.,\n", " 220., 57.])" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y" ] }, { "cell_type": "code", "execution_count": 5, "id": "7ecf4992", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:05:40.706335Z", "iopub.status.busy": "2023-04-08T10:05:40.705911Z", "iopub.status.idle": "2023-04-08T10:05:40.714413Z", "shell.execute_reply": "2023-04-08T10:05:40.713373Z" }, "papermill": { "duration": 0.020188, "end_time": "2023-04-08T10:05:40.716885", "exception": false, "start_time": "2023-04-08T10:05:40.696697", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "xtrain,xtest,ytrain,ytest=train_test_split(x,y,test_size=0.2,random_state=2)" ] }, { "cell_type": "markdown", "id": "63db6626", "metadata": { "papermill": { "duration": 0.007206, "end_time": "2023-04-08T10:05:40.731828", "exception": false, "start_time": "2023-04-08T10:05:40.724622", "status": "completed" }, "tags": [] }, "source": [ "Let's First Check sciket_learn's LinearRegression class" ] }, { "cell_type": "markdown", "id": "5d921fea", "metadata": { "papermill": { "duration": 0.007158, "end_time": "2023-04-08T10:05:40.746491", "exception": false, "start_time": "2023-04-08T10:05:40.739333", "status": "completed" }, "tags": [] }, "source": [ "# Sciket_learn's Linear Regression" ] }, { "cell_type": "code", "execution_count": 6, "id": "7b188d16", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:05:40.765278Z", "iopub.status.busy": "2023-04-08T10:05:40.764221Z", "iopub.status.idle": "2023-04-08T10:05:40.771985Z", "shell.execute_reply": "2023-04-08T10:05:40.770851Z" }, "papermill": { "duration": 0.019437, "end_time": "2023-04-08T10:05:40.774212", "exception": false, "start_time": "2023-04-08T10:05:40.754775", "status": "completed" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "array([[-0.00188202, -0.04464164, -0.06979687, ..., -0.03949338,\n", " -0.06291295, 0.04034337],\n", " [-0.00914709, -0.04464164, 0.01103904, ..., -0.03949338,\n", " 0.01703713, -0.0052198 ],\n", " [ 0.02354575, 0.05068012, -0.02021751, ..., -0.03949338,\n", " -0.09643322, -0.01764613],\n", " ...,\n", " [ 0.06350368, 0.05068012, -0.00405033, ..., -0.00259226,\n", " 0.08449528, -0.01764613],\n", " [-0.05273755, 0.05068012, -0.01806189, ..., 0.1081111 ,\n", " 0.03605579, -0.04249877],\n", " [ 0.00175052, 0.05068012, 0.05954058, ..., 0.1081111 ,\n", " 0.06898221, 0.12732762]])" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "xtrain" ] }, { "cell_type": "code", "execution_count": 7, "id": "e3ff6d95", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:05:40.791464Z", "iopub.status.busy": "2023-04-08T10:05:40.791033Z", "iopub.status.idle": "2023-04-08T10:05:40.812319Z", "shell.execute_reply": "2023-04-08T10:05:40.811210Z" }, "papermill": { "duration": 0.033026, "end_time": "2023-04-08T10:05:40.814814", "exception": false, "start_time": "2023-04-08T10:05:40.781788", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "slr=LinearRegression()\n", "slr.fit(xtrain,ytrain)\n", "y_pred=slr.predict(xtest)" ] }, { "cell_type": "code", "execution_count": 8, "id": "1fb8613d", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:05:40.832590Z", "iopub.status.busy": "2023-04-08T10:05:40.832150Z", "iopub.status.idle": "2023-04-08T10:05:40.839034Z", "shell.execute_reply": "2023-04-08T10:05:40.837796Z" }, "papermill": { "duration": 0.018609, "end_time": "2023-04-08T10:05:40.841313", "exception": false, "start_time": "2023-04-08T10:05:40.822704", "status": "completed" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "array([ -9.16088483, -205.46225988, 516.68462383, 340.62734108,\n", " -895.54360867, 561.21453306, 153.88478595, 126.73431596,\n", " 861.12139955, 52.41982836])" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "slr.coef_" ] }, { "cell_type": "code", "execution_count": 9, "id": "912833e8", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:05:40.859125Z", "iopub.status.busy": "2023-04-08T10:05:40.858132Z", "iopub.status.idle": "2023-04-08T10:05:40.864281Z", "shell.execute_reply": "2023-04-08T10:05:40.863447Z" }, "papermill": { "duration": 0.017083, "end_time": "2023-04-08T10:05:40.866340", "exception": false, "start_time": "2023-04-08T10:05:40.849257", "status": "completed" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "151.88334520854633" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "slr.intercept_" ] }, { "cell_type": "code", "execution_count": 10, "id": "468df839", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:05:40.884397Z", "iopub.status.busy": "2023-04-08T10:05:40.883694Z", "iopub.status.idle": "2023-04-08T10:05:40.891068Z", "shell.execute_reply": "2023-04-08T10:05:40.889834Z" }, "papermill": { "duration": 0.019164, "end_time": "2023-04-08T10:05:40.893419", "exception": false, "start_time": "2023-04-08T10:05:40.874255", "status": "completed" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "0.4399387660024644" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "r2_score(ytest,y_pred)" ] }, { "cell_type": "markdown", "id": "22b01622", "metadata": { "papermill": { "duration": 0.007804, "end_time": "2023-04-08T10:05:40.909295", "exception": false, "start_time": "2023-04-08T10:05:40.901491", "status": "completed" }, "tags": [] }, "source": [ "# Simple Linear Regression " ] }, { "cell_type": "code", "execution_count": 11, "id": "12b101f9", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:05:40.927262Z", "iopub.status.busy": "2023-04-08T10:05:40.926808Z", "iopub.status.idle": "2023-04-08T10:05:40.935398Z", "shell.execute_reply": "2023-04-08T10:05:40.934166Z" }, "papermill": { "duration": 0.020504, "end_time": "2023-04-08T10:05:40.937924", "exception": false, "start_time": "2023-04-08T10:05:40.917420", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "class LinearR:\n", " def __init__(self):\n", " self.m=None;\n", " self.b=None;\n", " def fit(self,X_train,Y_train):\n", " den=0\n", " num=0\n", " for i in range(X_train.shape[0] ):\n", " num=num+((X_train[i]-X_train.mean())*(Y_train[i]-Y_train.mean()))\n", " den=den+((X_train[i]-X_train.mean())*(X_train[i]-X_train.mean()))\n", " self.m=num/den\n", " self.b=Y_train.mean()-(self.m*X_train.mean())\n", " def predict(self,X_test):\n", " return m*X_test+self.b\n", " " ] }, { "cell_type": "markdown", "id": "81a9f53a", "metadata": { "papermill": { "duration": 0.007809, "end_time": "2023-04-08T10:05:40.953962", "exception": false, "start_time": "2023-04-08T10:05:40.946153", "status": "completed" }, "tags": [] }, "source": [ "# Multiple Linear Regression" ] }, { "cell_type": "code", "execution_count": 12, "id": "7a0e780b", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:05:40.972072Z", "iopub.status.busy": "2023-04-08T10:05:40.971295Z", "iopub.status.idle": "2023-04-08T10:05:40.978267Z", "shell.execute_reply": "2023-04-08T10:05:40.977150Z" }, "papermill": { "duration": 0.018871, "end_time": "2023-04-08T10:05:40.980801", "exception": false, "start_time": "2023-04-08T10:05:40.961930", "status": "completed" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "(353, 10)" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "xtrain.shape" ] }, { "cell_type": "code", "execution_count": 13, "id": "705a1db4", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:05:40.999623Z", "iopub.status.busy": "2023-04-08T10:05:40.998806Z", "iopub.status.idle": "2023-04-08T10:05:41.005674Z", "shell.execute_reply": "2023-04-08T10:05:41.004710Z" }, "papermill": { "duration": 0.018721, "end_time": "2023-04-08T10:05:41.007838", "exception": false, "start_time": "2023-04-08T10:05:40.989117", "status": "completed" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "(353,)" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ytrain.shape" ] }, { "cell_type": "code", "execution_count": 14, "id": "3ca4f3df", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:05:41.026345Z", "iopub.status.busy": "2023-04-08T10:05:41.025937Z", "iopub.status.idle": "2023-04-08T10:05:41.033332Z", "shell.execute_reply": "2023-04-08T10:05:41.032486Z" }, "papermill": { "duration": 0.019552, "end_time": "2023-04-08T10:05:41.035544", "exception": false, "start_time": "2023-04-08T10:05:41.015992", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "class MLR:\n", " def __init__(self):\n", " self.coeff_=None\n", " self.intercept_=None\n", " def fit(self,X_train,y_train):\n", " X_train=np.insert(X_train,0,1,axis=1)\n", " betas=np.linalg.inv(np.dot(X_train.T,X_train)).dot(X_train.T).dot(y_train)\n", " self.intercept_=betas[0]\n", " self.coeff_=betas[1:]\n", " def predict(self,X_test):\n", " y_pred=np.dot(X_test,self.coeff_)+self.intercept_\n", " return y_pred\n", "\n", "\n", "\n" ] }, { "cell_type": "code", "execution_count": 15, "id": "a773510a", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:05:41.054117Z", "iopub.status.busy": "2023-04-08T10:05:41.053466Z", "iopub.status.idle": "2023-04-08T10:05:41.062523Z", "shell.execute_reply": "2023-04-08T10:05:41.061161Z" }, "papermill": { "duration": 0.022044, "end_time": "2023-04-08T10:05:41.065876", "exception": false, "start_time": "2023-04-08T10:05:41.043832", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "mlr=MLR()\n", "mlr.fit(xtrain,ytrain)\n", "ypred=mlr.predict(xtest)" ] }, { "cell_type": "code", "execution_count": 16, "id": "ea53989a", "metadata": { "execution": { "iopub.execute_input": "2023-04-08T10:05:41.095034Z", "iopub.status.busy": "2023-04-08T10:05:41.094485Z", "iopub.status.idle": "2023-04-08T10:05:41.228490Z", "shell.execute_reply": "2023-04-08T10:05:41.227016Z" }, "papermill": { "duration": 0.150773, "end_time": "2023-04-08T10:05:41.230313", "exception": true, "start_time": "2023-04-08T10:05:41.079540", "status": "failed" }, "tags": [] }, "outputs": [ { "ename": "AttributeError", "evalue": "'MLR' object has no attribute 'coef_'", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m/tmp/ipykernel_19/267678862.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mmlr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcoef_\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;31mAttributeError\u001b[0m: 'MLR' object has no attribute 'coef_'" ] } ], "source": [ "mlr.coef_" ] }, { "cell_type": "code", "execution_count": null, "id": "657dad1a", "metadata": { "execution": { "iopub.execute_input": "2023-04-01T15:20:02.001217Z", "iopub.status.busy": "2023-04-01T15:20:02.000167Z", "iopub.status.idle": "2023-04-01T15:20:02.008260Z", "shell.execute_reply": "2023-04-01T15:20:02.007292Z", "shell.execute_reply.started": "2023-04-01T15:20:02.001175Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "mlr.intercept_" ] }, { "cell_type": "code", "execution_count": null, "id": "f00316d9", "metadata": { "execution": { "iopub.execute_input": "2023-04-01T15:20:35.078644Z", "iopub.status.busy": "2023-04-01T15:20:35.078173Z", "iopub.status.idle": "2023-04-01T15:20:35.087851Z", "shell.execute_reply": "2023-04-01T15:20:35.086601Z", "shell.execute_reply.started": "2023-04-01T15:20:35.078604Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "r2_score(ytest,ypred)" ] }, { "cell_type": "markdown", "id": "1cb7f55b", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [] }, { "cell_type": "markdown", "id": "057a555a", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [ "# Linear Regression Using Gradient Descent (Batch Gradient Descent)" ] }, { "cell_type": "code", "execution_count": null, "id": "f05f396d", "metadata": { "execution": { "iopub.execute_input": "2023-04-01T15:23:23.932442Z", "iopub.status.busy": "2023-04-01T15:23:23.931963Z", "iopub.status.idle": "2023-04-01T15:23:23.944474Z", "shell.execute_reply": "2023-04-01T15:23:23.942907Z", "shell.execute_reply.started": "2023-04-01T15:23:23.932386Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "class GD:\n", " def __init__(self,):\n", " \n", " self.coeff_=None\n", " self.intercept_=None\n", " def fit(self,x_train,y_train,lr=0.01,epochs=100):\n", " self.lr=lr\n", " self.epochs=epochs\n", " self.intercept_=0\n", " self.coeff_=np.ones(x_train.shape[1])\n", " \n", " for i in range(self.epochs):\n", " y_pred=self.intercept_+ np.dot(x_train,self.coeff_)\n", " der=-2*np.mean(y_train-y_pred)\n", " self.intercept_=self.intercept_ -(self.lr*der)\n", " # coeffs\n", " coeff_der=-2*(np.dot((y_train-y_pred),x_train)/(x_train.shape[1]))\n", " self.coeff_=self.coeff_-(self.lr*coeff_der)\n", " \n", " print(self.intercept_,self.coeff_)\n", " \n", " def predict(self,x):\n", " return np.dot(x,self.coeff_)+self.intercept_\n", " \n", " \n", " \n", " " ] }, { "cell_type": "code", "execution_count": null, "id": "b6eebf63", "metadata": { "execution": { "iopub.execute_input": "2023-04-01T14:59:05.369421Z", "iopub.status.busy": "2023-04-01T14:59:05.368373Z", "iopub.status.idle": "2023-04-01T14:59:05.378254Z", "shell.execute_reply": "2023-04-01T14:59:05.377173Z", "shell.execute_reply.started": "2023-04-01T14:59:05.369369Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "ytrain" ] }, { "cell_type": "code", "execution_count": null, "id": "14983948", "metadata": { "execution": { "iopub.execute_input": "2023-04-01T15:23:31.871845Z", "iopub.status.busy": "2023-04-01T15:23:31.871427Z", "iopub.status.idle": "2023-04-01T15:23:31.908268Z", "shell.execute_reply": "2023-04-01T15:23:31.906754Z", "shell.execute_reply.started": "2023-04-01T15:23:31.871806Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "gdlr=GD()\n", "gdlr.fit(xtrain,ytrain,lr=0.1,epochs=1000)\n", "Ypred=gdlr.predict(xtest)" ] }, { "cell_type": "code", "execution_count": null, "id": "e15405ca", "metadata": { "execution": { "iopub.execute_input": "2023-04-01T15:23:37.504463Z", "iopub.status.busy": "2023-04-01T15:23:37.503705Z", "iopub.status.idle": "2023-04-01T15:23:37.512389Z", "shell.execute_reply": "2023-04-01T15:23:37.511200Z", "shell.execute_reply.started": "2023-04-01T15:23:37.504390Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "gdlr.intercept_" ] }, { "cell_type": "code", "execution_count": null, "id": "c42f5f1d", "metadata": { "execution": { "iopub.execute_input": "2023-04-01T15:24:23.840402Z", "iopub.status.busy": "2023-04-01T15:24:23.839998Z", "iopub.status.idle": "2023-04-01T15:24:23.850046Z", "shell.execute_reply": "2023-04-01T15:24:23.848375Z", "shell.execute_reply.started": "2023-04-01T15:24:23.840368Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "r2_score(ytest,Ypred)" ] }, { "cell_type": "code", "execution_count": null, "id": "09f3903a", "metadata": { "execution": { "iopub.execute_input": "2023-04-01T14:52:19.448075Z", "iopub.status.busy": "2023-04-01T14:52:19.447655Z", "iopub.status.idle": "2023-04-01T14:52:19.467121Z", "shell.execute_reply": "2023-04-01T14:52:19.465847Z", "shell.execute_reply.started": "2023-04-01T14:52:19.448029Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "df" ] }, { "cell_type": "code", "execution_count": null, "id": "404b9eef", "metadata": { "execution": { "iopub.execute_input": "2023-04-01T14:52:19.515251Z", "iopub.status.busy": "2023-04-01T14:52:19.514457Z", "iopub.status.idle": "2023-04-01T14:52:19.520084Z", "shell.execute_reply": "2023-04-01T14:52:19.518899Z", "shell.execute_reply.started": "2023-04-01T14:52:19.515205Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "# lr=LinearR()\n", "# from sklearn.model_selection import train_test_split\n", "# x=df.iloc[:,0:1]\n", "# y=df.iloc[:,-1]\n", "# X_train,X_test,y_train,y_test=train_test_split(x,y,random_state=2)\n" ] }, { "cell_type": "code", "execution_count": null, "id": "6e6ac8dc", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.7.12" }, "papermill": { "default_parameters": {}, "duration": 13.458292, "end_time": "2023-04-08T10:05:41.961976", "environment_variables": {}, "exception": true, "input_path": "__notebook__.ipynb", "output_path": "__notebook__.ipynb", "parameters": {}, "start_time": "2023-04-08T10:05:28.503684", "version": "2.4.0" } }, "nbformat": 4, "nbformat_minor": 5 }
0125/018/125018622.ipynb
s3://data-agents/kaggle-outputs/sharded/000_00125.jsonl.gz
"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"3f0146(...TRUNCATED)
0125/019/125019060.ipynb
s3://data-agents/kaggle-outputs/sharded/000_00125.jsonl.gz
"{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"id\": \"81f53062\",\n \"metadata\": (...TRUNCATED)
0125/019/125019064.ipynb
s3://data-agents/kaggle-outputs/sharded/000_00125.jsonl.gz
"{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"id\": \"73dea9ca\",\n \"metadata\": (...TRUNCATED)
0125/019/125019115.ipynb
s3://data-agents/kaggle-outputs/sharded/000_00125.jsonl.gz
"{\"metadata\":{\"accelerator\":\"GPU\",\"colab\":{\"provenance\":[],\"toc_visible\":true},\"gpuClas(...TRUNCATED)
0125/019/125019131.ipynb
s3://data-agents/kaggle-outputs/sharded/000_00125.jsonl.gz
"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"e70352(...TRUNCATED)
0125/019/125019196.ipynb
s3://data-agents/kaggle-outputs/sharded/000_00125.jsonl.gz
"{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"id\": \"0b635fc9\",\n \"metadata\": (...TRUNCATED)
0125/019/125019447.ipynb
s3://data-agents/kaggle-outputs/sharded/000_00125.jsonl.gz
"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"69ca2f(...TRUNCATED)
0125/019/125019450.ipynb
s3://data-agents/kaggle-outputs/sharded/000_00125.jsonl.gz
"{\"metadata\":{\"kernelspec\":{\"language\":\"python\",\"display_name\":\"Python 3\",\"name\":\"pyt(...TRUNCATED)
0125/019/125019482.ipynb
s3://data-agents/kaggle-outputs/sharded/000_00125.jsonl.gz
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
27