Buckets:

download
raw
47.1 kB
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": [],
"gpuType": "T4"
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
},
"accelerator": "GPU"
},
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "D2i4wQGewLtw",
"outputId": "3d6f4c95-b5c5-411f-8e3e-6c40c1338af2"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Cloning into 'URD'...\n",
"remote: Enumerating objects: 74, done.\u001b[K\n",
"remote: Counting objects: 100% (74/74), done.\u001b[K\n",
"remote: Compressing objects: 100% (72/72), done.\u001b[K\n",
"Receiving objects: 100% (74/74), 54.25 KiB | 3.87 MiB/s, done.\n",
"remote: Total 74 (delta 30), reused 0 (delta 0), pack-reused 0 (from 0)\u001b[K\n",
"Resolving deltas: 100% (30/30), done.\n",
"/content/URD\n"
]
}
],
"source": [
"!git clone https://github.com/hito2448/URD.git\n",
"%cd URD"
]
},
{
"cell_type": "code",
"source": [
"!wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh\n",
"!chmod +x Miniconda3-latest-Linux-x86_64.sh\n",
"!bash ./Miniconda3-latest-Linux-x86_64.sh -b -f -p /usr/local"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "EjSpNs90wYbA",
"outputId": "b25d508c-467b-45c6-a944-ac5a538b9d5c"
},
"execution_count": 2,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"--2025-08-02 17:08:57-- https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh\n",
"Resolving repo.anaconda.com (repo.anaconda.com)... 104.16.191.158, 104.16.32.241, 2606:4700::6810:bf9e, ...\n",
"Connecting to repo.anaconda.com (repo.anaconda.com)|104.16.191.158|:443... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 160039710 (153M) [application/octet-stream]\n",
"Saving to: ‘Miniconda3-latest-Linux-x86_64.sh’\n",
"\n",
"Miniconda3-latest-L 100%[===================>] 152.62M 311MB/s in 0.5s \n",
"\n",
"2025-08-02 17:08:57 (311 MB/s) - ‘Miniconda3-latest-Linux-x86_64.sh’ saved [160039710/160039710]\n",
"\n",
"PREFIX=/usr/local\n",
"Unpacking payload ...\n",
"entry_point.py:256: DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.\n",
"entry_point.py:256: DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.\n",
"\n",
"Installing base environment...\n",
"\n",
"Preparing transaction: ...working... done\n",
"Executing transaction: ...working... done\n",
"entry_point.py:256: DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.\n",
"installation finished.\n",
"WARNING:\n",
" You currently have a PYTHONPATH environment variable set. This may cause\n",
" unexpected behavior when running the Python interpreter in Miniconda3.\n",
" For best results, please verify that your PYTHONPATH only points to\n",
" directories of packages that are compatible with the Python interpreter\n",
" in Miniconda3: /usr/local\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"import sys\n",
"sys.path.append('/usr/local/lib/python3.9/site-packages')"
],
"metadata": {
"id": "5ZquMYM9wimV"
},
"execution_count": 3,
"outputs": []
},
{
"cell_type": "code",
"source": [
"!conda create -n newRD python=3.8"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"collapsed": true,
"id": "zpfPM2jWwmIg",
"outputId": "8b64aee0-d09e-47ca-e127-1b41f607a72d"
},
"execution_count": 4,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Do you accept the Terms of Service (ToS) for \n",
"https://repo.anaconda.com/pkgs/main? \u001b[1;35m[(a)ccept/(r)eject/(v)iew]\u001b[0m: a\n",
"Do you accept the Terms of Service (ToS) for https://repo.anaconda.com/pkgs/r? \n",
"\u001b[1;35m[(a)ccept/(r)eject/(v)iew]\u001b[0m: a\n",
"\u001b[1;32m2\u001b[0m\u001b[1;32m channel Terms of Service accepted\u001b[0m\n",
"Channels:\n",
" - defaults\n",
"Platform: linux-64\n",
"Collecting package metadata (repodata.json): - \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\bdone\n",
"Solving environment: | \b\bdone\n",
"\n",
"## Package Plan ##\n",
"\n",
" environment location: /usr/local/envs/newRD\n",
"\n",
" added / updated specs:\n",
" - python=3.8\n",
"\n",
"\n",
"The following packages will be downloaded:\n",
"\n",
" package | build\n",
" ---------------------------|-----------------\n",
" ncurses-6.5 | h7934f7d_0 1.1 MB\n",
" openssl-3.0.17 | h5eee18b_0 5.2 MB\n",
" pip-24.2 | py38h06a4308_0 2.2 MB\n",
" python-3.8.20 | he870216_0 23.8 MB\n",
" setuptools-75.1.0 | py38h06a4308_0 1.7 MB\n",
" wheel-0.44.0 | py38h06a4308_0 108 KB\n",
" ------------------------------------------------------------\n",
" Total: 34.1 MB\n",
"\n",
"The following NEW packages will be INSTALLED:\n",
"\n",
" _libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main \n",
" _openmp_mutex pkgs/main/linux-64::_openmp_mutex-5.1-1_gnu \n",
" ca-certificates pkgs/main/linux-64::ca-certificates-2025.2.25-h06a4308_0 \n",
" ld_impl_linux-64 pkgs/main/linux-64::ld_impl_linux-64-2.40-h12ee557_0 \n",
" libffi pkgs/main/linux-64::libffi-3.4.4-h6a678d5_1 \n",
" libgcc-ng pkgs/main/linux-64::libgcc-ng-11.2.0-h1234567_1 \n",
" libgomp pkgs/main/linux-64::libgomp-11.2.0-h1234567_1 \n",
" libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-11.2.0-h1234567_1 \n",
" libxcb pkgs/main/linux-64::libxcb-1.17.0-h9b100fa_0 \n",
" ncurses pkgs/main/linux-64::ncurses-6.5-h7934f7d_0 \n",
" openssl pkgs/main/linux-64::openssl-3.0.17-h5eee18b_0 \n",
" pip pkgs/main/linux-64::pip-24.2-py38h06a4308_0 \n",
" pthread-stubs pkgs/main/linux-64::pthread-stubs-0.3-h0ce48e5_1 \n",
" python pkgs/main/linux-64::python-3.8.20-he870216_0 \n",
" readline pkgs/main/linux-64::readline-8.2-h5eee18b_0 \n",
" setuptools pkgs/main/linux-64::setuptools-75.1.0-py38h06a4308_0 \n",
" sqlite pkgs/main/linux-64::sqlite-3.50.2-hb25bd0a_1 \n",
" tk pkgs/main/linux-64::tk-8.6.14-h993c535_1 \n",
" wheel pkgs/main/linux-64::wheel-0.44.0-py38h06a4308_0 \n",
" xorg-libx11 pkgs/main/linux-64::xorg-libx11-1.8.12-h9b100fa_1 \n",
" xorg-libxau pkgs/main/linux-64::xorg-libxau-1.0.12-h9b100fa_0 \n",
" xorg-libxdmcp pkgs/main/linux-64::xorg-libxdmcp-1.1.5-h9b100fa_0 \n",
" xorg-xorgproto pkgs/main/linux-64::xorg-xorgproto-2024.1-h5eee18b_1 \n",
" xz pkgs/main/linux-64::xz-5.6.4-h5eee18b_1 \n",
" zlib pkgs/main/linux-64::zlib-1.2.13-h5eee18b_1 \n",
"\n",
"\n",
"Proceed ([y]/n)? y\n",
"\n",
"\n",
"Downloading and Extracting Packages:\n",
"python-3.8.20 | 23.8 MB | : 0% 0/1 [00:00<?, ?it/s]\n",
"openssl-3.0.17 | 5.2 MB | : 0% 0/1 [00:00<?, ?it/s]\u001b[A\n",
"\n",
"pip-24.2 | 2.2 MB | : 0% 0/1 [00:00<?, ?it/s]\u001b[A\u001b[A\n",
"\n",
"\n",
"setuptools-75.1.0 | 1.7 MB | : 0% 0/1 [00:00<?, ?it/s]\u001b[A\u001b[A\u001b[A\n",
"\n",
"\n",
"\n",
"ncurses-6.5 | 1.1 MB | : 0% 0/1 [00:00<?, ?it/s]\u001b[A\u001b[A\u001b[A\u001b[A\n",
"\n",
"\n",
"\n",
"\n",
"python-3.8.20 | 23.8 MB | : 7% 0.06506288113004526/1 [00:00<00:01, 1.54s/it]\n",
"openssl-3.0.17 | 5.2 MB | : 34% 0.34174683951469786/1 [00:00<00:00, 3.41it/s]\u001b[A\n",
"\n",
"pip-24.2 | 2.2 MB | : 71% 0.7143922858011218/1 [00:00<00:00, 7.14it/s]\u001b[A\u001b[A\n",
"\n",
"\n",
"setuptools-75.1.0 | 1.7 MB | : 84% 0.8416821630068206/1 [00:00<00:00, 8.41it/s]\u001b[A\u001b[A\u001b[A\n",
"\n",
"\n",
"\n",
"ncurses-6.5 | 1.1 MB | : 100% 1.0/1 [00:00<00:00, 8.92it/s]\u001b[A\u001b[A\u001b[A\u001b[A\n",
"\n",
"\n",
"\n",
"ncurses-6.5 | 1.1 MB | : 100% 1.0/1 [00:00<00:00, 8.92it/s]\u001b[A\u001b[A\u001b[A\u001b[A\n",
"\n",
"\n",
"setuptools-75.1.0 | 1.7 MB | : 100% 1.0/1 [00:00<00:00, 8.41it/s] \u001b[A\u001b[A\u001b[A\n",
"\n",
"\n",
"\n",
"\n",
"wheel-0.44.0 | 108 KB | : 15% 0.14783134378186213/1 [00:00<00:00, 1.01it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n",
"\n",
"\n",
"\n",
"\n",
"wheel-0.44.0 | 108 KB | : 100% 1.0/1 [00:00<00:00, 1.01it/s] \u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n",
"\n",
"python-3.8.20 | 23.8 MB | : 28% 0.277995946646557/1 [00:00<00:00, 1.51it/s] \n",
"openssl-3.0.17 | 5.2 MB | : 100% 1.0/1 [00:00<00:00, 3.60it/s] \u001b[A\n",
"python-3.8.20 | 23.8 MB | : 100% 1.0/1 [00:00<00:00, 2.11it/s] \n",
"\n",
"\n",
"setuptools-75.1.0 | 1.7 MB | : 100% 1.0/1 [00:00<00:00, 8.41it/s]\u001b[A\u001b[A\u001b[A\n",
"\n",
"\n",
"\n",
"\n",
"wheel-0.44.0 | 108 KB | : 100% 1.0/1 [00:01<00:00, 1.04s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n",
"\n",
"\n",
"\n",
"\n",
"wheel-0.44.0 | 108 KB | : 100% 1.0/1 [00:01<00:00, 1.04s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n",
"\n",
"pip-24.2 | 2.2 MB | : 100% 1.0/1 [00:01<00:00, 7.14it/s]\u001b[A\u001b[A\n",
"\n",
"\n",
"\n",
"ncurses-6.5 | 1.1 MB | : 100% 1.0/1 [00:01<00:00, 8.92it/s]\u001b[A\u001b[A\u001b[A\u001b[A\n",
" \n",
" \u001b[A\n",
"\n",
" \u001b[A\u001b[A\n",
"\n",
"\n",
" \u001b[A\u001b[A\u001b[A\n",
"\n",
"\n",
"\n",
" \u001b[A\u001b[A\u001b[A\u001b[A\n",
"\n",
"\n",
"\n",
"\n",
" \u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n",
"Preparing transaction: - \b\b\\ \b\b| \b\bdone\n",
"Verifying transaction: - \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\bdone\n",
"Executing transaction: | \b\b/ \b\b- \b\b\\ \b\b| \b\bdone\n",
"#\n",
"# To activate this environment, use\n",
"#\n",
"# $ conda activate newRD\n",
"#\n",
"# To deactivate an active environment, use\n",
"#\n",
"# $ conda deactivate\n",
"\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!conda run -n newRD pip install -r requirements.txt"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"collapsed": true,
"id": "a6mDzdkIwvgQ",
"outputId": "3c14eab1-0997-41b7-e35b-c9374075d6ac"
},
"execution_count": 5,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Collecting torch==2.0.0 (from -r requirements.txt (line 1))\n",
" Downloading torch-2.0.0-cp38-cp38-manylinux1_x86_64.whl.metadata (24 kB)\n",
"Collecting torchvision==0.15.1 (from -r requirements.txt (line 2))\n",
" Downloading torchvision-0.15.1-cp38-cp38-manylinux1_x86_64.whl.metadata (11 kB)\n",
"Collecting numpy==1.24.2 (from -r requirements.txt (line 3))\n",
" Downloading numpy-1.24.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.6 kB)\n",
"Collecting matplotlib==3.7.1 (from -r requirements.txt (line 4))\n",
" Downloading matplotlib-3.7.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.metadata (5.6 kB)\n",
"Collecting tqdm==4.65.0 (from -r requirements.txt (line 5))\n",
" Downloading tqdm-4.65.0-py3-none-any.whl.metadata (56 kB)\n",
"Collecting pillow==9.5.0 (from -r requirements.txt (line 6))\n",
" Downloading Pillow-9.5.0-cp38-cp38-manylinux_2_28_x86_64.whl.metadata (9.5 kB)\n",
"Collecting opencv_python==4.8.1.78 (from -r requirements.txt (line 7))\n",
" Downloading opencv_python-4.8.1.78-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (19 kB)\n",
"Collecting opencv_contrib_python==4.10.0.84 (from -r requirements.txt (line 8))\n",
" Downloading opencv_contrib_python-4.10.0.84-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (20 kB)\n",
"Collecting opencv_python_headless==4.7.0.72 (from -r requirements.txt (line 9))\n",
" Downloading opencv_python_headless-4.7.0.72-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (18 kB)\n",
"Collecting scikit_image==0.19.3 (from -r requirements.txt (line 10))\n",
" Downloading scikit_image-0.19.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (8.0 kB)\n",
"Collecting pandas==2.0.3 (from -r requirements.txt (line 11))\n",
" Downloading pandas-2.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (18 kB)\n",
"Collecting imgaug==0.4.0 (from -r requirements.txt (line 12))\n",
" Downloading imgaug-0.4.0-py2.py3-none-any.whl.metadata (1.8 kB)\n",
"Collecting scipy==1.10.1 (from -r requirements.txt (line 13))\n",
" Downloading scipy-1.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (58 kB)\n",
"Collecting scikit_learn==1.3.0 (from -r requirements.txt (line 14))\n",
" Downloading scikit_learn-1.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (11 kB)\n",
"Collecting filelock (from torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading filelock-3.16.1-py3-none-any.whl.metadata (2.9 kB)\n",
"Collecting typing-extensions (from torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading typing_extensions-4.13.2-py3-none-any.whl.metadata (3.0 kB)\n",
"Collecting sympy (from torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading sympy-1.13.3-py3-none-any.whl.metadata (12 kB)\n",
"Collecting networkx (from torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading networkx-3.1-py3-none-any.whl.metadata (5.3 kB)\n",
"Collecting jinja2 (from torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading jinja2-3.1.6-py3-none-any.whl.metadata (2.9 kB)\n",
"Collecting nvidia-cuda-nvrtc-cu11==11.7.99 (from torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading nvidia_cuda_nvrtc_cu11-11.7.99-2-py3-none-manylinux1_x86_64.whl.metadata (1.5 kB)\n",
"Collecting nvidia-cuda-runtime-cu11==11.7.99 (from torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading nvidia_cuda_runtime_cu11-11.7.99-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)\n",
"Collecting nvidia-cuda-cupti-cu11==11.7.101 (from torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading nvidia_cuda_cupti_cu11-11.7.101-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)\n",
"Collecting nvidia-cudnn-cu11==8.5.0.96 (from torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading nvidia_cudnn_cu11-8.5.0.96-2-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)\n",
"Collecting nvidia-cublas-cu11==11.10.3.66 (from torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading nvidia_cublas_cu11-11.10.3.66-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)\n",
"Collecting nvidia-cufft-cu11==10.9.0.58 (from torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading nvidia_cufft_cu11-10.9.0.58-py3-none-manylinux2014_x86_64.whl.metadata (1.5 kB)\n",
"Collecting nvidia-curand-cu11==10.2.10.91 (from torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading nvidia_curand_cu11-10.2.10.91-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)\n",
"Collecting nvidia-cusolver-cu11==11.4.0.1 (from torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading nvidia_cusolver_cu11-11.4.0.1-2-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)\n",
"Collecting nvidia-cusparse-cu11==11.7.4.91 (from torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading nvidia_cusparse_cu11-11.7.4.91-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)\n",
"Collecting nvidia-nccl-cu11==2.14.3 (from torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading nvidia_nccl_cu11-2.14.3-py3-none-manylinux1_x86_64.whl.metadata (1.8 kB)\n",
"Collecting nvidia-nvtx-cu11==11.7.91 (from torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading nvidia_nvtx_cu11-11.7.91-py3-none-manylinux1_x86_64.whl.metadata (1.7 kB)\n",
"Collecting triton==2.0.0 (from torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading triton-2.0.0-1-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (1.0 kB)\n",
"Collecting requests (from torchvision==0.15.1->-r requirements.txt (line 2))\n",
" Downloading requests-2.32.4-py3-none-any.whl.metadata (4.9 kB)\n",
"Collecting contourpy>=1.0.1 (from matplotlib==3.7.1->-r requirements.txt (line 4))\n",
" Downloading contourpy-1.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.9 kB)\n",
"Collecting cycler>=0.10 (from matplotlib==3.7.1->-r requirements.txt (line 4))\n",
" Downloading cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)\n",
"Collecting fonttools>=4.22.0 (from matplotlib==3.7.1->-r requirements.txt (line 4))\n",
" Downloading fonttools-4.57.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (102 kB)\n",
"Collecting kiwisolver>=1.0.1 (from matplotlib==3.7.1->-r requirements.txt (line 4))\n",
" Downloading kiwisolver-1.4.7-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl.metadata (6.3 kB)\n",
"Collecting packaging>=20.0 (from matplotlib==3.7.1->-r requirements.txt (line 4))\n",
" Downloading packaging-25.0-py3-none-any.whl.metadata (3.3 kB)\n",
"Collecting pyparsing>=2.3.1 (from matplotlib==3.7.1->-r requirements.txt (line 4))\n",
" Downloading pyparsing-3.1.4-py3-none-any.whl.metadata (5.1 kB)\n",
"Collecting python-dateutil>=2.7 (from matplotlib==3.7.1->-r requirements.txt (line 4))\n",
" Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)\n",
"Collecting importlib-resources>=3.2.0 (from matplotlib==3.7.1->-r requirements.txt (line 4))\n",
" Downloading importlib_resources-6.4.5-py3-none-any.whl.metadata (4.0 kB)\n",
"Collecting imageio>=2.4.1 (from scikit_image==0.19.3->-r requirements.txt (line 10))\n",
" Downloading imageio-2.35.1-py3-none-any.whl.metadata (4.9 kB)\n",
"Collecting tifffile>=2019.7.26 (from scikit_image==0.19.3->-r requirements.txt (line 10))\n",
" Downloading tifffile-2023.7.10-py3-none-any.whl.metadata (31 kB)\n",
"Collecting PyWavelets>=1.1.1 (from scikit_image==0.19.3->-r requirements.txt (line 10))\n",
" Downloading PyWavelets-1.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.9 kB)\n",
"Collecting pytz>=2020.1 (from pandas==2.0.3->-r requirements.txt (line 11))\n",
" Downloading pytz-2025.2-py2.py3-none-any.whl.metadata (22 kB)\n",
"Collecting tzdata>=2022.1 (from pandas==2.0.3->-r requirements.txt (line 11))\n",
" Downloading tzdata-2025.2-py2.py3-none-any.whl.metadata (1.4 kB)\n",
"Collecting six (from imgaug==0.4.0->-r requirements.txt (line 12))\n",
" Downloading six-1.17.0-py2.py3-none-any.whl.metadata (1.7 kB)\n",
"Collecting Shapely (from imgaug==0.4.0->-r requirements.txt (line 12))\n",
" Downloading shapely-2.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.9 kB)\n",
"Collecting joblib>=1.1.1 (from scikit_learn==1.3.0->-r requirements.txt (line 14))\n",
" Downloading joblib-1.4.2-py3-none-any.whl.metadata (5.4 kB)\n",
"Collecting threadpoolctl>=2.0.0 (from scikit_learn==1.3.0->-r requirements.txt (line 14))\n",
" Downloading threadpoolctl-3.5.0-py3-none-any.whl.metadata (13 kB)\n",
"Requirement already satisfied: setuptools in /usr/local/envs/newRD/lib/python3.8/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch==2.0.0->-r requirements.txt (line 1)) (75.1.0)\n",
"Requirement already satisfied: wheel in /usr/local/envs/newRD/lib/python3.8/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch==2.0.0->-r requirements.txt (line 1)) (0.44.0)\n",
"Collecting cmake (from triton==2.0.0->torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading cmake-4.0.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.3 kB)\n",
"Collecting lit (from triton==2.0.0->torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading lit-18.1.8-py3-none-any.whl.metadata (2.5 kB)\n",
"Collecting zipp>=3.1.0 (from importlib-resources>=3.2.0->matplotlib==3.7.1->-r requirements.txt (line 4))\n",
" Downloading zipp-3.20.2-py3-none-any.whl.metadata (3.7 kB)\n",
"Collecting MarkupSafe>=2.0 (from jinja2->torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.0 kB)\n",
"Collecting charset_normalizer<4,>=2 (from requests->torchvision==0.15.1->-r requirements.txt (line 2))\n",
" Downloading charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (35 kB)\n",
"Collecting idna<4,>=2.5 (from requests->torchvision==0.15.1->-r requirements.txt (line 2))\n",
" Downloading idna-3.10-py3-none-any.whl.metadata (10 kB)\n",
"Collecting urllib3<3,>=1.21.1 (from requests->torchvision==0.15.1->-r requirements.txt (line 2))\n",
" Downloading urllib3-2.2.3-py3-none-any.whl.metadata (6.5 kB)\n",
"Collecting certifi>=2017.4.17 (from requests->torchvision==0.15.1->-r requirements.txt (line 2))\n",
" Downloading certifi-2025.7.14-py3-none-any.whl.metadata (2.4 kB)\n",
"Collecting mpmath<1.4,>=1.1.0 (from sympy->torch==2.0.0->-r requirements.txt (line 1))\n",
" Downloading mpmath-1.3.0-py3-none-any.whl.metadata (8.6 kB)\n",
"Downloading torch-2.0.0-cp38-cp38-manylinux1_x86_64.whl (619.9 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 619.9/619.9 MB 8.1 MB/s eta 0:00:00\n",
"Downloading torchvision-0.15.1-cp38-cp38-manylinux1_x86_64.whl (33.8 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 33.8/33.8 MB 8.2 MB/s eta 0:00:00\n",
"Downloading numpy-1.24.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 74.7 MB/s eta 0:00:00\n",
"Downloading matplotlib-3.7.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (9.2 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.2/9.2 MB 164.0 MB/s eta 0:00:00\n",
"Downloading tqdm-4.65.0-py3-none-any.whl (77 kB)\n",
"Downloading Pillow-9.5.0-cp38-cp38-manylinux_2_28_x86_64.whl (3.4 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 120.9 MB/s eta 0:00:00\n",
"Downloading opencv_python-4.8.1.78-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (61.7 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.7/61.7 MB 41.6 MB/s eta 0:00:00\n",
"Downloading opencv_contrib_python-4.10.0.84-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (68.7 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 68.7/68.7 MB 55.6 MB/s eta 0:00:00\n",
"Downloading opencv_python_headless-4.7.0.72-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (49.2 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.2/49.2 MB 51.5 MB/s eta 0:00:00\n",
"Downloading scikit_image-0.19.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.0 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.0/14.0 MB 57.3 MB/s eta 0:00:00\n",
"Downloading pandas-2.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.4 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.4/12.4 MB 158.9 MB/s eta 0:00:00\n",
"Downloading imgaug-0.4.0-py2.py3-none-any.whl (948 kB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 948.0/948.0 kB 48.1 MB/s eta 0:00:00\n",
"Downloading scipy-1.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.5 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 34.5/34.5 MB 28.3 MB/s eta 0:00:00\n",
"Downloading scikit_learn-1.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.1 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.1/11.1 MB 110.3 MB/s eta 0:00:00\n",
"Downloading nvidia_cublas_cu11-11.10.3.66-py3-none-manylinux1_x86_64.whl (317.1 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 317.1/317.1 MB 66.1 MB/s eta 0:00:00\n",
"Downloading nvidia_cuda_cupti_cu11-11.7.101-py3-none-manylinux1_x86_64.whl (11.8 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.8/11.8 MB 62.1 MB/s eta 0:00:00\n",
"Downloading nvidia_cuda_nvrtc_cu11-11.7.99-2-py3-none-manylinux1_x86_64.whl (21.0 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21.0/21.0 MB 171.7 MB/s eta 0:00:00\n",
"Downloading nvidia_cuda_runtime_cu11-11.7.99-py3-none-manylinux1_x86_64.whl (849 kB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 849.3/849.3 kB 43.9 MB/s eta 0:00:00\n",
"Downloading nvidia_cudnn_cu11-8.5.0.96-2-py3-none-manylinux1_x86_64.whl (557.1 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 557.1/557.1 MB 21.7 MB/s eta 0:00:00\n",
"Downloading nvidia_cufft_cu11-10.9.0.58-py3-none-manylinux2014_x86_64.whl (168.4 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 168.4/168.4 MB 48.7 MB/s eta 0:00:00\n",
"Downloading nvidia_curand_cu11-10.2.10.91-py3-none-manylinux1_x86_64.whl (54.6 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.6/54.6 MB 48.3 MB/s eta 0:00:00\n",
"Downloading nvidia_cusolver_cu11-11.4.0.1-2-py3-none-manylinux1_x86_64.whl (102.6 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 102.6/102.6 MB 52.4 MB/s eta 0:00:00\n",
"Downloading nvidia_cusparse_cu11-11.7.4.91-py3-none-manylinux1_x86_64.whl (173.2 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 173.2/173.2 MB 70.4 MB/s eta 0:00:00\n",
"Downloading nvidia_nccl_cu11-2.14.3-py3-none-manylinux1_x86_64.whl (177.1 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 177.1/177.1 MB 44.6 MB/s eta 0:00:00\n",
"Downloading nvidia_nvtx_cu11-11.7.91-py3-none-manylinux1_x86_64.whl (98 kB)\n",
"Downloading triton-2.0.0-1-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (63.2 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.2/63.2 MB 49.7 MB/s eta 0:00:00\n",
"Downloading contourpy-1.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (301 kB)\n",
"Downloading cycler-0.12.1-py3-none-any.whl (8.3 kB)\n",
"Downloading fonttools-4.57.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.7/4.7 MB 144.2 MB/s eta 0:00:00\n",
"Downloading imageio-2.35.1-py3-none-any.whl (315 kB)\n",
"Downloading importlib_resources-6.4.5-py3-none-any.whl (36 kB)\n",
"Downloading joblib-1.4.2-py3-none-any.whl (301 kB)\n",
"Downloading kiwisolver-1.4.7-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.2 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 66.2 MB/s eta 0:00:00\n",
"Downloading networkx-3.1-py3-none-any.whl (2.1 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 105.9 MB/s eta 0:00:00\n",
"Downloading packaging-25.0-py3-none-any.whl (66 kB)\n",
"Downloading pyparsing-3.1.4-py3-none-any.whl (104 kB)\n",
"Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)\n",
"Downloading pytz-2025.2-py2.py3-none-any.whl (509 kB)\n",
"Downloading PyWavelets-1.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.9 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.9/6.9 MB 127.4 MB/s eta 0:00:00\n",
"Downloading six-1.17.0-py2.py3-none-any.whl (11 kB)\n",
"Downloading threadpoolctl-3.5.0-py3-none-any.whl (18 kB)\n",
"Downloading tifffile-2023.7.10-py3-none-any.whl (220 kB)\n",
"Downloading tzdata-2025.2-py2.py3-none-any.whl (347 kB)\n",
"Downloading filelock-3.16.1-py3-none-any.whl (16 kB)\n",
"Downloading jinja2-3.1.6-py3-none-any.whl (134 kB)\n",
"Downloading requests-2.32.4-py3-none-any.whl (64 kB)\n",
"Downloading shapely-2.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.5 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.5/2.5 MB 98.0 MB/s eta 0:00:00\n",
"Downloading sympy-1.13.3-py3-none-any.whl (6.2 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 MB 156.0 MB/s eta 0:00:00\n",
"Downloading typing_extensions-4.13.2-py3-none-any.whl (45 kB)\n",
"Downloading certifi-2025.7.14-py3-none-any.whl (162 kB)\n",
"Downloading charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (147 kB)\n",
"Downloading idna-3.10-py3-none-any.whl (70 kB)\n",
"Downloading MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (26 kB)\n",
"Downloading mpmath-1.3.0-py3-none-any.whl (536 kB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 536.2/536.2 kB 28.4 MB/s eta 0:00:00\n",
"Downloading urllib3-2.2.3-py3-none-any.whl (126 kB)\n",
"Downloading zipp-3.20.2-py3-none-any.whl (9.2 kB)\n",
"Downloading cmake-4.0.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.9 MB)\n",
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 27.9/27.9 MB 150.4 MB/s eta 0:00:00\n",
"Downloading lit-18.1.8-py3-none-any.whl (96 kB)\n",
"Installing collected packages: pytz, mpmath, lit, zipp, urllib3, tzdata, typing-extensions, tqdm, threadpoolctl, sympy, six, pyparsing, pillow, packaging, nvidia-nvtx-cu11, nvidia-nccl-cu11, nvidia-cusparse-cu11, nvidia-curand-cu11, nvidia-cufft-cu11, nvidia-cuda-runtime-cu11, nvidia-cuda-nvrtc-cu11, nvidia-cuda-cupti-cu11, nvidia-cublas-cu11, numpy, networkx, MarkupSafe, kiwisolver, joblib, idna, fonttools, filelock, cycler, cmake, charset_normalizer, certifi, tifffile, Shapely, scipy, requests, PyWavelets, python-dateutil, opencv_python_headless, opencv_python, opencv_contrib_python, nvidia-cusolver-cu11, nvidia-cudnn-cu11, jinja2, importlib-resources, imageio, contourpy, scikit_learn, scikit_image, pandas, matplotlib, imgaug, triton, torch, torchvision\n",
"Successfully installed MarkupSafe-2.1.5 PyWavelets-1.4.1 Shapely-2.0.7 certifi-2025.7.14 charset_normalizer-3.4.2 cmake-4.0.3 contourpy-1.1.1 cycler-0.12.1 filelock-3.16.1 fonttools-4.57.0 idna-3.10 imageio-2.35.1 imgaug-0.4.0 importlib-resources-6.4.5 jinja2-3.1.6 joblib-1.4.2 kiwisolver-1.4.7 lit-18.1.8 matplotlib-3.7.1 mpmath-1.3.0 networkx-3.1 numpy-1.24.2 nvidia-cublas-cu11-11.10.3.66 nvidia-cuda-cupti-cu11-11.7.101 nvidia-cuda-nvrtc-cu11-11.7.99 nvidia-cuda-runtime-cu11-11.7.99 nvidia-cudnn-cu11-8.5.0.96 nvidia-cufft-cu11-10.9.0.58 nvidia-curand-cu11-10.2.10.91 nvidia-cusolver-cu11-11.4.0.1 nvidia-cusparse-cu11-11.7.4.91 nvidia-nccl-cu11-2.14.3 nvidia-nvtx-cu11-11.7.91 opencv_contrib_python-4.10.0.84 opencv_python-4.8.1.78 opencv_python_headless-4.7.0.72 packaging-25.0 pandas-2.0.3 pillow-9.5.0 pyparsing-3.1.4 python-dateutil-2.9.0.post0 pytz-2025.2 requests-2.32.4 scikit_image-0.19.3 scikit_learn-1.3.0 scipy-1.10.1 six-1.17.0 sympy-1.13.3 threadpoolctl-3.5.0 tifffile-2023.7.10 torch-2.0.0 torchvision-0.15.1 tqdm-4.65.0 triton-2.0.0 typing-extensions-4.13.2 tzdata-2025.2 urllib3-2.2.3 zipp-3.20.2\n",
"\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!wget https://www.mydrive.ch/shares/38536/3830184030e49fe74747669442f0f282/download/420938113-1629952094/mvtec_anomaly_detection.tar.xz -O mvtec_anomaly_detection.tar.xz"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "GECd0qJ7yIr1",
"outputId": "31772095-7cab-4a9a-daae-c80abb1d43f2"
},
"execution_count": 8,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"--2025-08-02 17:16:24-- https://www.mydrive.ch/shares/38536/3830184030e49fe74747669442f0f282/download/420938113-1629952094/mvtec_anomaly_detection.tar.xz\n",
"Resolving www.mydrive.ch (www.mydrive.ch)... 91.214.169.64\n",
"Connecting to www.mydrive.ch (www.mydrive.ch)|91.214.169.64|:443... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 5264982680 (4.9G) [application/x-xz]\n",
"Saving to: ‘mvtec_anomaly_detection.tar.xz’\n",
"\n",
"mvtec_anomaly_detec 100%[===================>] 4.90G 44.0MB/s in 67s \n",
"\n",
"2025-08-02 17:17:31 (75.4 MB/s) - ‘mvtec_anomaly_detection.tar.xz’ saved [5264982680/5264982680]\n",
"\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"import tarfile\n",
"\n",
"# Define source and destination paths\n",
"source_path = \"/content/URD/mvtec_anomaly_detection.tar.xz\"\n",
"destination_path = \"/content/URD/data/mvtec_anomaly_detection\"\n",
"\n",
"# Create destination directory if it doesn't exist\n",
"import os\n",
"os.makedirs(destination_path, exist_ok=True)\n",
"\n",
"# Extract the dataset\n",
"with tarfile.open(source_path) as tar:\n",
" tar.extractall(path=destination_path)\n",
"\n",
"print(\"✅ Extraction complete: Data is now available in /content/urd/data\")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "BavrT53AyknV",
"outputId": "07e28833-ad94-4fa8-82e8-3b0fc9d8aa95"
},
"execution_count": 10,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"✅ Extraction complete: Data is now available in /content/urd/data\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!wget https://www.robots.ox.ac.uk/~vgg/data/dtd/download/dtd-r1.0.1.tar.gz -O dtd.tar.xz"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "LVbY8qjbzRRj",
"outputId": "e14ca8cd-978b-4279-9dbd-63f35c9a9db1"
},
"execution_count": 11,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"--2025-08-02 17:21:51-- https://www.robots.ox.ac.uk/~vgg/data/dtd/download/dtd-r1.0.1.tar.gz\n",
"Resolving www.robots.ox.ac.uk (www.robots.ox.ac.uk)... 129.67.94.2\n",
"Connecting to www.robots.ox.ac.uk (www.robots.ox.ac.uk)|129.67.94.2|:443... connected.\n",
"HTTP request sent, awaiting response... 301 Moved Permanently\n",
"Location: https://thor.robots.ox.ac.uk/dtd/dtd-r1.0.1.tar.gz [following]\n",
"--2025-08-02 17:21:51-- https://thor.robots.ox.ac.uk/dtd/dtd-r1.0.1.tar.gz\n",
"Resolving thor.robots.ox.ac.uk (thor.robots.ox.ac.uk)... 129.67.95.98\n",
"Connecting to thor.robots.ox.ac.uk (thor.robots.ox.ac.uk)|129.67.95.98|:443... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 625239812 (596M) [application/octet-stream]\n",
"Saving to: ‘dtd.tar.xz’\n",
"\n",
"dtd.tar.xz 100%[===================>] 596.27M 215MB/s in 2.8s \n",
"\n",
"2025-08-02 17:21:54 (215 MB/s) - ‘dtd.tar.xz’ saved [625239812/625239812]\n",
"\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"import tarfile\n",
"\n",
"# Define source and destination paths\n",
"source_path = \"/content/URD/dtd.tar.xz\"\n",
"destination_path = \"/content/URD/data/\"\n",
"\n",
"# Create destination directory if it doesn't exist\n",
"import os\n",
"os.makedirs(destination_path, exist_ok=True)\n",
"\n",
"# Extract the dataset\n",
"with tarfile.open(source_path) as tar:\n",
" tar.extractall(path=destination_path)\n",
"\n",
"print(\"✅ Extraction complete: Data is now available in /content/urd/data\")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "JqwU7vIuzhKK",
"outputId": "74ffe60d-f66a-45bc-d951-097e2a38e5f6"
},
"execution_count": 13,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"✅ Extraction complete: Data is now available in /content/urd/data\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"#set train_dataloader = DataLoader(train_data, batch_size=batch_size, shuffle=True, pin_memory=True, num_workers=2) set num_workers = 2 on colab t4 on train.py file"
],
"metadata": {
"id": "v7WBuEoc15uQ"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"!conda run --no-capture-output -n newRD python train.py"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "c2m15dLOz3K4",
"outputId": "577309ae-5e06-4fd0-abc4-b642f8550c07"
},
"execution_count": 20,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"-----------------------training on carpet[1 / 15]-----------------------\n",
" 0% 0/278 [00:00<?, ?it/s]testing epoch 1\n",
"Accuracy on test set: auroc_px 0.9933 (max: 0.9933), auroc_sp 0.9944 (max: 0.9944), aupro 0.9764 (max: 0.9764), ap_px 0.7583 (max: 0.7583), ap_sp 0.9983 (max: 0.9983)\n",
" 0% 1/278 [01:45<8:04:48, 105.01s/it]testing epoch 2\n",
"Accuracy on test set: auroc_px 0.9927 (max: 0.9927), auroc_sp 1.0000 (max: 1.0000), aupro 0.9772 (max: 0.9772), ap_px 0.7400 (max: 0.7400), ap_sp 1.0000 (max: 1.0000)\n",
" 1% 2/278 [03:29<8:01:18, 104.63s/it]testing epoch 3\n",
"Accuracy on test set: auroc_px 0.9903 (max: 0.9927), auroc_sp 0.9928 (max: 1.0000), aupro 0.9711 (max: 0.9772), ap_px 0.7151 (max: 0.7400), ap_sp 0.9979 (max: 1.0000)\n",
" 1% 3/278 [06:21<9:42:10, 127.02s/it]\n",
"Traceback (most recent call last):\n",
" File \"train.py\", line 250, in <module>\n",
" train(device, classname, data_root, log, epochs_i, learning_rate, batch_size, img_size, iteration_i)\n",
" File \"train.py\", line 146, in train\n",
" save_max = test(student, teacher, test_dataloader, device, log, save_max, epoch, ckp_path)\n",
" File \"train.py\", line 169, in test\n",
" anomaly_map = anomaly_map[0, 0, :, :].to('cpu').detach().numpy()\n",
"KeyboardInterrupt\n",
"\n",
"CondaError: KeyboardInterrupt\n",
"\n"
]
}
]
}
]
}

Xet Storage Details

Size:
47.1 kB
·
Xet hash:
734e690728f742c23103ef079387070972aee0695e68f8e361ac93a7347cc684

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.