Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files
lidar_postprocessing/create_range_imgs.ipynb
CHANGED
|
@@ -37,7 +37,7 @@
|
|
| 37 |
},
|
| 38 |
{
|
| 39 |
"cell_type": "code",
|
| 40 |
-
"execution_count":
|
| 41 |
"id": "a1d44156",
|
| 42 |
"metadata": {},
|
| 43 |
"outputs": [],
|
|
@@ -48,8 +48,18 @@
|
|
| 48 |
"condition = 'flooded'\n",
|
| 49 |
"camera_pos = 'front'\n",
|
| 50 |
"# root_directory = f\"../../Datasets/FRED/{condition}/KITTI-style\"\n",
|
| 51 |
-
"root_directory = f\"C:/Users/conno/Documents/data/FRED/{condition}/KITTI-style\"\n",
|
| 52 |
"# 01000000\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
"\n",
|
| 54 |
"############ Define filenames and directories ####################################\n",
|
| 55 |
"\n",
|
|
|
|
| 37 |
},
|
| 38 |
{
|
| 39 |
"cell_type": "code",
|
| 40 |
+
"execution_count": null,
|
| 41 |
"id": "a1d44156",
|
| 42 |
"metadata": {},
|
| 43 |
"outputs": [],
|
|
|
|
| 48 |
"condition = 'flooded'\n",
|
| 49 |
"camera_pos = 'front'\n",
|
| 50 |
"# root_directory = f\"../../Datasets/FRED/{condition}/KITTI-style\"\n",
|
| 51 |
+
"# root_directory = f\"C:/Users/conno/Documents/data/FRED/{condition}/KITTI-style\"\n",
|
| 52 |
"# 01000000\n",
|
| 53 |
+
"root_directory = f\"/data/FRED/{condition}/KITTI-style\"\n",
|
| 54 |
+
"\n",
|
| 55 |
+
"if not os.path.exists(root_directory):\n",
|
| 56 |
+
" snapshot_download(\n",
|
| 57 |
+
" repo_id=\"CMalone-Jupiter/FRED\",\n",
|
| 58 |
+
" repo_type=\"dataset\",\n",
|
| 59 |
+
" local_dir=\"/data/FRED\",\n",
|
| 60 |
+
" allow_patterns=f\"{condition}/KITTI-style/{location}_{sequence}/**\",\n",
|
| 61 |
+
" token=os.environ.get(\"HF_TOKEN\")\n",
|
| 62 |
+
" )\n",
|
| 63 |
"\n",
|
| 64 |
"############ Define filenames and directories ####################################\n",
|
| 65 |
"\n",
|
localisation/VPR_eval.ipynb
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
"cells": [
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
-
"execution_count":
|
| 6 |
"metadata": {},
|
| 7 |
"outputs": [
|
| 8 |
{
|
|
@@ -29,6 +29,7 @@
|
|
| 29 |
"from natsort import natsorted, index_natsorted\n",
|
| 30 |
"import torch\n",
|
| 31 |
"from tqdm.notebook import tqdm\n",
|
|
|
|
| 32 |
"\n",
|
| 33 |
"################## set device based on cuda availability #################\n",
|
| 34 |
"device = torch.device(\"cuda:0\" if torch.cuda.is_available() else \"cpu\")\n",
|
|
@@ -82,7 +83,7 @@
|
|
| 82 |
},
|
| 83 |
{
|
| 84 |
"cell_type": "code",
|
| 85 |
-
"execution_count":
|
| 86 |
"metadata": {},
|
| 87 |
"outputs": [
|
| 88 |
{
|
|
@@ -119,8 +120,18 @@
|
|
| 119 |
"qry_sequence = '20210909_124816_v2'\n",
|
| 120 |
"qry_condition = ''\n",
|
| 121 |
"qry_camera_pos = 'front'\n",
|
| 122 |
-
"qry_root_directory = f\"../../Datasets/dalby/KITTI-style/{location}\"\n",
|
| 123 |
"qry_vpr_root = f\"../../Datasets/dalby/KITTI-style/{location}/vpr_ftrs/\"\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
"\n",
|
| 125 |
"qry_image_dir = f\"{qry_root_directory}/{qry_sequence}/{qry_camera_pos}-imgs/\"\n",
|
| 126 |
"qry_utm_dir = f\"{qry_root_directory}/{qry_sequence}/utm/\"\n",
|
|
@@ -147,8 +158,18 @@
|
|
| 147 |
"ref_sequence = '20230509_115540_v2'\n",
|
| 148 |
"ref_condition = ''\n",
|
| 149 |
"ref_camera_pos = 'front'\n",
|
| 150 |
-
"ref_root_directory = f\"../../Datasets/dalby/KITTI-style/{location}\"\n",
|
| 151 |
"ref_vpr_root = f\"../../Datasets/dalby/KITTI-style/{location}/vpr_ftrs/\"\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
"\n",
|
| 153 |
"ref_image_dir = f\"{ref_root_directory}/{ref_sequence}/{ref_camera_pos}-imgs/\"\n",
|
| 154 |
"ref_utm_dir = f\"{ref_root_directory}/{ref_sequence}/utm/\"\n",
|
|
|
|
| 2 |
"cells": [
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
+
"execution_count": null,
|
| 6 |
"metadata": {},
|
| 7 |
"outputs": [
|
| 8 |
{
|
|
|
|
| 29 |
"from natsort import natsorted, index_natsorted\n",
|
| 30 |
"import torch\n",
|
| 31 |
"from tqdm.notebook import tqdm\n",
|
| 32 |
+
"from huggingface_hub import snapshot_download\n",
|
| 33 |
"\n",
|
| 34 |
"################## set device based on cuda availability #################\n",
|
| 35 |
"device = torch.device(\"cuda:0\" if torch.cuda.is_available() else \"cpu\")\n",
|
|
|
|
| 83 |
},
|
| 84 |
{
|
| 85 |
"cell_type": "code",
|
| 86 |
+
"execution_count": null,
|
| 87 |
"metadata": {},
|
| 88 |
"outputs": [
|
| 89 |
{
|
|
|
|
| 120 |
"qry_sequence = '20210909_124816_v2'\n",
|
| 121 |
"qry_condition = ''\n",
|
| 122 |
"qry_camera_pos = 'front'\n",
|
| 123 |
+
"# qry_root_directory = f\"../../Datasets/dalby/KITTI-style/{location}\"\n",
|
| 124 |
"qry_vpr_root = f\"../../Datasets/dalby/KITTI-style/{location}/vpr_ftrs/\"\n",
|
| 125 |
+
"qry_root_directory = f\"/data/FRED/{qry_condition}/KITTI-style\"\n",
|
| 126 |
+
"\n",
|
| 127 |
+
"if not os.path.exists(qry_root_directory):\n",
|
| 128 |
+
" snapshot_download(\n",
|
| 129 |
+
" repo_id=\"CMalone-Jupiter/FRED\",\n",
|
| 130 |
+
" repo_type=\"dataset\",\n",
|
| 131 |
+
" local_dir=\"/data/FRED\",\n",
|
| 132 |
+
" allow_patterns=f\"{qry_condition}/KITTI-style/{location}_{qry_sequence}/**\",\n",
|
| 133 |
+
" token=os.environ.get(\"HF_TOKEN\")\n",
|
| 134 |
+
" )\n",
|
| 135 |
"\n",
|
| 136 |
"qry_image_dir = f\"{qry_root_directory}/{qry_sequence}/{qry_camera_pos}-imgs/\"\n",
|
| 137 |
"qry_utm_dir = f\"{qry_root_directory}/{qry_sequence}/utm/\"\n",
|
|
|
|
| 158 |
"ref_sequence = '20230509_115540_v2'\n",
|
| 159 |
"ref_condition = ''\n",
|
| 160 |
"ref_camera_pos = 'front'\n",
|
| 161 |
+
"# ref_root_directory = f\"../../Datasets/dalby/KITTI-style/{location}\"\n",
|
| 162 |
"ref_vpr_root = f\"../../Datasets/dalby/KITTI-style/{location}/vpr_ftrs/\"\n",
|
| 163 |
+
"ref_root_directory = f\"/data/FRED/{ref_condition}/KITTI-style\"\n",
|
| 164 |
+
"\n",
|
| 165 |
+
"if not os.path.exists(ref_root_directory):\n",
|
| 166 |
+
" snapshot_download(\n",
|
| 167 |
+
" repo_id=\"CMalone-Jupiter/FRED\",\n",
|
| 168 |
+
" repo_type=\"dataset\",\n",
|
| 169 |
+
" local_dir=\"/data/FRED\",\n",
|
| 170 |
+
" allow_patterns=f\"{ref_condition}/KITTI-style/{location}_{ref_sequence}/**\",\n",
|
| 171 |
+
" token=os.environ.get(\"HF_TOKEN\")\n",
|
| 172 |
+
" )\n",
|
| 173 |
"\n",
|
| 174 |
"ref_image_dir = f\"{ref_root_directory}/{ref_sequence}/{ref_camera_pos}-imgs/\"\n",
|
| 175 |
"ref_utm_dir = f\"{ref_root_directory}/{ref_sequence}/utm/\"\n",
|
localisation/groundtruth_utm-single.ipynb
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
"cells": [
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
-
"execution_count":
|
| 6 |
"metadata": {},
|
| 7 |
"outputs": [],
|
| 8 |
"source": [
|
|
@@ -18,12 +18,13 @@
|
|
| 18 |
"from utils.lidar import PointCloud\n",
|
| 19 |
"from utils.camera import ImageData\n",
|
| 20 |
"import utils.utils as utils\n",
|
| 21 |
-
"from natsort import natsorted"
|
|
|
|
| 22 |
]
|
| 23 |
},
|
| 24 |
{
|
| 25 |
"cell_type": "code",
|
| 26 |
-
"execution_count":
|
| 27 |
"metadata": {},
|
| 28 |
"outputs": [],
|
| 29 |
"source": [
|
|
@@ -40,7 +41,17 @@
|
|
| 40 |
"qry_condition = 'flooded'\n",
|
| 41 |
"qry_camera_pos = 'front'\n",
|
| 42 |
"# qry_root_directory = f\"../../Datasets/FRED/{qry_condition}/KITTI-style\"\n",
|
| 43 |
-
"qry_root_directory = f\"U:/Research/Projects/KVFPRA9190/FRED/{qry_condition}/KITTI-style\"\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
"\n",
|
| 45 |
"qry_image_dir = f\"{qry_root_directory}/{location}_{qry_sequence}/{qry_camera_pos}-imgs/\"\n",
|
| 46 |
"qry_utm_dir = f\"{qry_root_directory}/{location}_{qry_sequence}/utm/\"\n",
|
|
@@ -54,7 +65,17 @@
|
|
| 54 |
"ref_condition = 'dry'\n",
|
| 55 |
"ref_camera_pos = 'front'\n",
|
| 56 |
"# ref_root_directory = f\"../../Datasets/FRED/{ref_condition}/KITTI-style\"\n",
|
| 57 |
-
"ref_root_directory = f\"U:/Research/Projects/KVFPRA9190/FRED/{ref_condition}/KITTI-style\"\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
"\n",
|
| 59 |
"ref_image_dir = f\"{ref_root_directory}/{location}_{ref_sequence}/{ref_camera_pos}-imgs/\"\n",
|
| 60 |
"ref_utm_dir = f\"{ref_root_directory}/{location}_{ref_sequence}/utm/\"\n",
|
|
|
|
| 2 |
"cells": [
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
+
"execution_count": null,
|
| 6 |
"metadata": {},
|
| 7 |
"outputs": [],
|
| 8 |
"source": [
|
|
|
|
| 18 |
"from utils.lidar import PointCloud\n",
|
| 19 |
"from utils.camera import ImageData\n",
|
| 20 |
"import utils.utils as utils\n",
|
| 21 |
+
"from natsort import natsorted\n",
|
| 22 |
+
"from huggingface_hub import snapshot_download"
|
| 23 |
]
|
| 24 |
},
|
| 25 |
{
|
| 26 |
"cell_type": "code",
|
| 27 |
+
"execution_count": null,
|
| 28 |
"metadata": {},
|
| 29 |
"outputs": [],
|
| 30 |
"source": [
|
|
|
|
| 41 |
"qry_condition = 'flooded'\n",
|
| 42 |
"qry_camera_pos = 'front'\n",
|
| 43 |
"# qry_root_directory = f\"../../Datasets/FRED/{qry_condition}/KITTI-style\"\n",
|
| 44 |
+
"# qry_root_directory = f\"U:/Research/Projects/KVFPRA9190/FRED/{qry_condition}/KITTI-style\"\n",
|
| 45 |
+
"qry_root_directory = f\"/data/FRED/{qry_condition}/KITTI-style\"\n",
|
| 46 |
+
"\n",
|
| 47 |
+
"if not os.path.exists(qry_root_directory):\n",
|
| 48 |
+
" snapshot_download(\n",
|
| 49 |
+
" repo_id=\"CMalone-Jupiter/FRED\",\n",
|
| 50 |
+
" repo_type=\"dataset\",\n",
|
| 51 |
+
" local_dir=\"/data/FRED\",\n",
|
| 52 |
+
" allow_patterns=f\"{qry_condition}/KITTI-style/{location}_{qry_sequence}/**\",\n",
|
| 53 |
+
" token=os.environ.get(\"HF_TOKEN\")\n",
|
| 54 |
+
" )\n",
|
| 55 |
"\n",
|
| 56 |
"qry_image_dir = f\"{qry_root_directory}/{location}_{qry_sequence}/{qry_camera_pos}-imgs/\"\n",
|
| 57 |
"qry_utm_dir = f\"{qry_root_directory}/{location}_{qry_sequence}/utm/\"\n",
|
|
|
|
| 65 |
"ref_condition = 'dry'\n",
|
| 66 |
"ref_camera_pos = 'front'\n",
|
| 67 |
"# ref_root_directory = f\"../../Datasets/FRED/{ref_condition}/KITTI-style\"\n",
|
| 68 |
+
"# ref_root_directory = f\"U:/Research/Projects/KVFPRA9190/FRED/{ref_condition}/KITTI-style\"\n",
|
| 69 |
+
"ref_root_directory = f\"/data/FRED/{ref_condition}/KITTI-style\"\n",
|
| 70 |
+
"\n",
|
| 71 |
+
"if not os.path.exists(ref_root_directory):\n",
|
| 72 |
+
" snapshot_download(\n",
|
| 73 |
+
" repo_id=\"CMalone-Jupiter/FRED\",\n",
|
| 74 |
+
" repo_type=\"dataset\",\n",
|
| 75 |
+
" local_dir=\"/data/FRED\",\n",
|
| 76 |
+
" allow_patterns=f\"{ref_condition}/KITTI-style/{location}_{ref_sequence}/**\",\n",
|
| 77 |
+
" token=os.environ.get(\"HF_TOKEN\")\n",
|
| 78 |
+
" )\n",
|
| 79 |
"\n",
|
| 80 |
"ref_image_dir = f\"{ref_root_directory}/{location}_{ref_sequence}/{ref_camera_pos}-imgs/\"\n",
|
| 81 |
"ref_utm_dir = f\"{ref_root_directory}/{location}_{ref_sequence}/utm/\"\n",
|
localisation/plot_utm_traj.ipynb
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
"cells": [
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
-
"execution_count":
|
| 6 |
"metadata": {},
|
| 7 |
"outputs": [
|
| 8 |
{
|
|
@@ -29,13 +29,14 @@
|
|
| 29 |
"from utils.camera import ImageData\n",
|
| 30 |
"import utils.utils as utils\n",
|
| 31 |
"from natsort import natsorted\n",
|
|
|
|
| 32 |
"\n",
|
| 33 |
"cmap = plt.get_cmap(\"jet\")"
|
| 34 |
]
|
| 35 |
},
|
| 36 |
{
|
| 37 |
"cell_type": "code",
|
| 38 |
-
"execution_count":
|
| 39 |
"metadata": {},
|
| 40 |
"outputs": [
|
| 41 |
{
|
|
@@ -59,7 +60,17 @@
|
|
| 59 |
"qry_condition = 'flooded'\n",
|
| 60 |
"qry_camera_pos = 'front'\n",
|
| 61 |
"# qry_root_directory = f\"../../Datasets/FRED/{qry_condition}/KITTI-style\"\n",
|
| 62 |
-
"qry_root_directory = f\"U:/Research/Projects/KVFPRA9190/FRED/{qry_condition}/KITTI-style\"\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
"\n",
|
| 64 |
"qry_image_dir = f\"{qry_root_directory}/{location}_{qry_sequence}/{qry_camera_pos}-imgs/\"\n",
|
| 65 |
"qry_utm_dir = f\"{qry_root_directory}/{location}_{qry_sequence}/utm/\"\n",
|
|
@@ -72,7 +83,17 @@
|
|
| 72 |
"ref_condition = 'dry'\n",
|
| 73 |
"ref_camera_pos = 'front'\n",
|
| 74 |
"# ref_root_directory = f\"../../Datasets/FRED/{ref_condition}/KITTI-style\"\n",
|
| 75 |
-
"ref_root_directory = f\"U:/Research/Projects/KVFPRA9190/FRED/{ref_condition}/KITTI-style\"\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
"\n",
|
| 77 |
"ref_image_dir = f\"{ref_root_directory}/{location}_{ref_sequence}/{ref_camera_pos}-imgs/\"\n",
|
| 78 |
"ref_utm_dir = f\"{ref_root_directory}/{location}_{ref_sequence}/utm/\"\n",
|
|
|
|
| 2 |
"cells": [
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
+
"execution_count": null,
|
| 6 |
"metadata": {},
|
| 7 |
"outputs": [
|
| 8 |
{
|
|
|
|
| 29 |
"from utils.camera import ImageData\n",
|
| 30 |
"import utils.utils as utils\n",
|
| 31 |
"from natsort import natsorted\n",
|
| 32 |
+
"from huggingface_hub import snapshot_download\n",
|
| 33 |
"\n",
|
| 34 |
"cmap = plt.get_cmap(\"jet\")"
|
| 35 |
]
|
| 36 |
},
|
| 37 |
{
|
| 38 |
"cell_type": "code",
|
| 39 |
+
"execution_count": null,
|
| 40 |
"metadata": {},
|
| 41 |
"outputs": [
|
| 42 |
{
|
|
|
|
| 60 |
"qry_condition = 'flooded'\n",
|
| 61 |
"qry_camera_pos = 'front'\n",
|
| 62 |
"# qry_root_directory = f\"../../Datasets/FRED/{qry_condition}/KITTI-style\"\n",
|
| 63 |
+
"# qry_root_directory = f\"U:/Research/Projects/KVFPRA9190/FRED/{qry_condition}/KITTI-style\"\n",
|
| 64 |
+
"qry_root_directory = f\"/data/FRED/{qry_condition}/KITTI-style\"\n",
|
| 65 |
+
"\n",
|
| 66 |
+
"if not os.path.exists(qry_root_directory):\n",
|
| 67 |
+
" snapshot_download(\n",
|
| 68 |
+
" repo_id=\"CMalone-Jupiter/FRED\",\n",
|
| 69 |
+
" repo_type=\"dataset\",\n",
|
| 70 |
+
" local_dir=\"/data/FRED\",\n",
|
| 71 |
+
" allow_patterns=f\"{qry_condition}/KITTI-style/{location}_{qry_sequence}/**\",\n",
|
| 72 |
+
" token=os.environ.get(\"HF_TOKEN\")\n",
|
| 73 |
+
" )\n",
|
| 74 |
"\n",
|
| 75 |
"qry_image_dir = f\"{qry_root_directory}/{location}_{qry_sequence}/{qry_camera_pos}-imgs/\"\n",
|
| 76 |
"qry_utm_dir = f\"{qry_root_directory}/{location}_{qry_sequence}/utm/\"\n",
|
|
|
|
| 83 |
"ref_condition = 'dry'\n",
|
| 84 |
"ref_camera_pos = 'front'\n",
|
| 85 |
"# ref_root_directory = f\"../../Datasets/FRED/{ref_condition}/KITTI-style\"\n",
|
| 86 |
+
"# ref_root_directory = f\"U:/Research/Projects/KVFPRA9190/FRED/{ref_condition}/KITTI-style\"\n",
|
| 87 |
+
"ref_root_directory = f\"/data/FRED/{ref_condition}/KITTI-style\"\n",
|
| 88 |
+
"\n",
|
| 89 |
+
"if not os.path.exists(ref_root_directory):\n",
|
| 90 |
+
" snapshot_download(\n",
|
| 91 |
+
" repo_id=\"CMalone-Jupiter/FRED\",\n",
|
| 92 |
+
" repo_type=\"dataset\",\n",
|
| 93 |
+
" local_dir=\"/data/FRED\",\n",
|
| 94 |
+
" allow_patterns=f\"{ref_condition}/KITTI-style/{location}_{ref_sequence}/**\",\n",
|
| 95 |
+
" token=os.environ.get(\"HF_TOKEN\")\n",
|
| 96 |
+
" )\n",
|
| 97 |
"\n",
|
| 98 |
"ref_image_dir = f\"{ref_root_directory}/{location}_{ref_sequence}/{ref_camera_pos}-imgs/\"\n",
|
| 99 |
"ref_utm_dir = f\"{ref_root_directory}/{location}_{ref_sequence}/utm/\"\n",
|
segmentation/show_labels-single.ipynb
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
"cells": [
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
-
"execution_count":
|
| 6 |
"metadata": {},
|
| 7 |
"outputs": [],
|
| 8 |
"source": [
|
|
@@ -19,12 +19,13 @@
|
|
| 19 |
"from utils.lidar import PointCloud\n",
|
| 20 |
"from utils.camera import ImageData\n",
|
| 21 |
"import utils.utils as utils\n",
|
| 22 |
-
"from natsort import natsorted"
|
|
|
|
| 23 |
]
|
| 24 |
},
|
| 25 |
{
|
| 26 |
"cell_type": "code",
|
| 27 |
-
"execution_count":
|
| 28 |
"metadata": {},
|
| 29 |
"outputs": [],
|
| 30 |
"source": [
|
|
@@ -37,7 +38,17 @@
|
|
| 37 |
"# sequence = '20250811_113017'\n",
|
| 38 |
"condition = 'flooded'\n",
|
| 39 |
"camera_pos = 'front'\n",
|
| 40 |
-
"root_directory = f\"../../Datasets/FRED/{condition}/KITTI-style\"\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
"\n",
|
| 42 |
"image_dir = f\"{root_directory}/{location}_{sequence}/{camera_pos}-imgs/\"\n",
|
| 43 |
"label_dir = f\"{root_directory}/{location}_{sequence}/{camera_pos}-labels/\"\n",
|
|
|
|
| 2 |
"cells": [
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
+
"execution_count": null,
|
| 6 |
"metadata": {},
|
| 7 |
"outputs": [],
|
| 8 |
"source": [
|
|
|
|
| 19 |
"from utils.lidar import PointCloud\n",
|
| 20 |
"from utils.camera import ImageData\n",
|
| 21 |
"import utils.utils as utils\n",
|
| 22 |
+
"from natsort import natsorted\n",
|
| 23 |
+
"from huggingface_hub import snapshot_download"
|
| 24 |
]
|
| 25 |
},
|
| 26 |
{
|
| 27 |
"cell_type": "code",
|
| 28 |
+
"execution_count": null,
|
| 29 |
"metadata": {},
|
| 30 |
"outputs": [],
|
| 31 |
"source": [
|
|
|
|
| 38 |
"# sequence = '20250811_113017'\n",
|
| 39 |
"condition = 'flooded'\n",
|
| 40 |
"camera_pos = 'front'\n",
|
| 41 |
+
"# root_directory = f\"../../Datasets/FRED/{condition}/KITTI-style\"\n",
|
| 42 |
+
"root_directory = f\"/data/FRED/{condition}/KITTI-style\"\n",
|
| 43 |
+
"\n",
|
| 44 |
+
"if not os.path.exists(root_directory):\n",
|
| 45 |
+
" snapshot_download(\n",
|
| 46 |
+
" repo_id=\"CMalone-Jupiter/FRED\",\n",
|
| 47 |
+
" repo_type=\"dataset\",\n",
|
| 48 |
+
" local_dir=\"/data/FRED\",\n",
|
| 49 |
+
" allow_patterns=f\"{condition}/KITTI-style/{location}_{sequence}/**\",\n",
|
| 50 |
+
" token=os.environ.get(\"HF_TOKEN\")\n",
|
| 51 |
+
" )\n",
|
| 52 |
"\n",
|
| 53 |
"image_dir = f\"{root_directory}/{location}_{sequence}/{camera_pos}-imgs/\"\n",
|
| 54 |
"label_dir = f\"{root_directory}/{location}_{sequence}/{camera_pos}-labels/\"\n",
|
visualisation/points2image-single.ipynb
CHANGED
|
@@ -21,7 +21,7 @@
|
|
| 21 |
"from utils.camera import ImageData\n",
|
| 22 |
"import utils.utils as utils\n",
|
| 23 |
"from natsort import natsorted\n",
|
| 24 |
-
"
|
| 25 |
"\n",
|
| 26 |
"cmap = plt.get_cmap(\"jet\")"
|
| 27 |
]
|
|
@@ -48,18 +48,16 @@
|
|
| 48 |
"# root_directory = f\"../../Datasets/FRED/{condition}/KITTI-style\"\n",
|
| 49 |
"# root_directory = f\"C:/Users/conno/Documents/data/FRED/{condition}/KITTI-style\"\n",
|
| 50 |
"# root_directory = f\"U:/Research/Projects/KVFPRA9190/FRED/{condition}/KITTI-style\"\n",
|
| 51 |
-
"root_directory = \"data/FRED/{condition}/KITTI-style\"\n",
|
| 52 |
-
"
|
| 53 |
-
"\n",
|
| 54 |
-
"
|
| 55 |
-
"\n",
|
| 56 |
-
"
|
| 57 |
-
"
|
| 58 |
-
"
|
| 59 |
-
"
|
| 60 |
-
"
|
| 61 |
-
" token=os.environ.get(\"HF_TOKEN\")\n",
|
| 62 |
-
")\n",
|
| 63 |
"\n",
|
| 64 |
"############ Define filenames and directories ####################################\n",
|
| 65 |
"\n",
|
|
|
|
| 21 |
"from utils.camera import ImageData\n",
|
| 22 |
"import utils.utils as utils\n",
|
| 23 |
"from natsort import natsorted\n",
|
| 24 |
+
"from huggingface_hub import snapshot_download\n",
|
| 25 |
"\n",
|
| 26 |
"cmap = plt.get_cmap(\"jet\")"
|
| 27 |
]
|
|
|
|
| 48 |
"# root_directory = f\"../../Datasets/FRED/{condition}/KITTI-style\"\n",
|
| 49 |
"# root_directory = f\"C:/Users/conno/Documents/data/FRED/{condition}/KITTI-style\"\n",
|
| 50 |
"# root_directory = f\"U:/Research/Projects/KVFPRA9190/FRED/{condition}/KITTI-style\"\n",
|
| 51 |
+
"root_directory = f\"/data/FRED/{condition}/KITTI-style\"\n",
|
| 52 |
+
"\n",
|
| 53 |
+
"if not os.path.exists(root_directory):\n",
|
| 54 |
+
" snapshot_download(\n",
|
| 55 |
+
" repo_id=\"CMalone-Jupiter/FRED\",\n",
|
| 56 |
+
" repo_type=\"dataset\",\n",
|
| 57 |
+
" local_dir=\"/data/FRED\",\n",
|
| 58 |
+
" allow_patterns=f\"{condition}/KITTI-style/{location}_{sequence}/**\",\n",
|
| 59 |
+
" token=os.environ.get(\"HF_TOKEN\")\n",
|
| 60 |
+
" )\n",
|
|
|
|
|
|
|
| 61 |
"\n",
|
| 62 |
"############ Define filenames and directories ####################################\n",
|
| 63 |
"\n",
|