Last active
May 14, 2021 11:00
-
-
Save Ducbx/63968506fa653c5e2a5f5868756e5d4b to your computer and use it in GitHub Desktop.
torch_yolov2.ipynb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "nbformat": 4, | |
| "nbformat_minor": 0, | |
| "metadata": { | |
| "colab": { | |
| "name": "torch_yolov2.ipynb", | |
| "provenance": [], | |
| "mount_file_id": "1SCoo4YRMdKfWnyqF2r5aoB0eca3oSNek", | |
| "authorship_tag": "ABX9TyN4Cmfbsz/zg4JT2qFR2Pz2", | |
| "include_colab_link": true | |
| }, | |
| "kernelspec": { | |
| "name": "python3", | |
| "display_name": "Python 3" | |
| }, | |
| "language_info": { | |
| "name": "python" | |
| } | |
| }, | |
| "cells": [ | |
| { | |
| "cell_type": "markdown", | |
| "metadata": { | |
| "id": "view-in-github", | |
| "colab_type": "text" | |
| }, | |
| "source": [ | |
| "<a href=\"https://colab.research.google.com/gist/Ducbx/63968506fa653c5e2a5f5868756e5d4b/torch_yolov2.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "metadata": { | |
| "id": "Sl4h3c0HfGYK" | |
| }, | |
| "source": [ | |
| "# https://www.kaggle.com/trungthanhnguyen0502/yolo-v2-from-scratch" | |
| ], | |
| "execution_count": 1, | |
| "outputs": [] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "metadata": { | |
| "colab": { | |
| "base_uri": "https://localhost:8080/" | |
| }, | |
| "id": "SK711w_KfMBj", | |
| "outputId": "4cc03adf-c46b-4d90-ae3a-47e839fbf7db" | |
| }, | |
| "source": [ | |
| "import numpy as np # linear algebra\n", | |
| "import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n", | |
| "import os\n", | |
| "import torch\n", | |
| "import torchvision\n", | |
| "from glob import glob\n", | |
| "from tqdm import tqdm\n", | |
| "from matplotlib import pyplot as plt\n", | |
| "from torch.utils.data import DataLoader, Dataset\n", | |
| "import albumentations as A\n", | |
| "from albumentations.pytorch.transforms import ToTensor\n", | |
| "from random import randint, choice, shuffle, choices\n", | |
| "import cv2\n", | |
| "from torch import nn\n", | |
| "import torch.nn.functional as F\n", | |
| "!pip install torch-summary" | |
| ], | |
| "execution_count": 3, | |
| "outputs": [ | |
| { | |
| "output_type": "stream", | |
| "text": [ | |
| "Collecting torch-summary\n", | |
| " Downloading https://files.pythonhosted.org/packages/ca/db/93d18c84f73b214acfa4d18051d6f4263eee3e044c408928e8abe941a22c/torch_summary-1.4.5-py3-none-any.whl\n", | |
| "Installing collected packages: torch-summary\n", | |
| "Successfully installed torch-summary-1.4.5\n" | |
| ], | |
| "name": "stdout" | |
| } | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "metadata": { | |
| "id": "S3zOGmVgft8r" | |
| }, | |
| "source": [ | |
| "" | |
| ], | |
| "execution_count": null, | |
| "outputs": [] | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment