{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": true }, "outputs": [], "source": [ "from utils import find_image_groups, create_image_dataset\n", "from datasets import load_dataset, concatenate_datasets\n", "\n", "data_paths = [\n", " \"./2023-07-21_14-08-29\",\n", " \"./2023-07-21_14-44-56\",\n", " # \"./2023-07-21_14-51-07\",\n", " \"./2023-07-22_16-24-27\",\n", "]\n", "datasets = []\n", "\n", "for data_path in data_paths:\n", " image_groups = find_image_groups(\n", " data_path, \"RS_COLOR\", [\"RS_DEPTH\", \"RS_DEPTH_16bit\", \"THERMAL\", \"THERMAL_RGB\"], threshold_ms=100\n", " )\n", " new_dataset = create_image_dataset(image_groups)\n", " datasets.append(new_dataset)\n", " print(f\"Dataset {data_path} created with {len(new_dataset)} samples\")\n", "\n", "existing_dataset = load_dataset(\"hassanjbara/BASEPROD\", split=\"train\")\n", "combined_dataset = concatenate_datasets([existing_dataset, *datasets])\n", "combined_dataset.push_to_hub(\"hassanjbara/BASEPROD\",)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.16" } }, "nbformat": 4, "nbformat_minor": 4 }