This commit is contained in:
MythEclipse
2026-06-11 16:39:04 +00:00
parent 8c65e33a74
commit c733f3bfe1
+27 -3
View File
@@ -24,6 +24,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "94627f52",
"metadata": {},
"outputs": [],
"source": [
@@ -33,6 +34,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "bad56dcc",
"metadata": {},
"outputs": [],
"source": [
@@ -80,6 +82,7 @@
},
{
"cell_type": "markdown",
"id": "83235964",
"metadata": {},
"source": [
"## 2. Download dan Ekstraksi Dataset"
@@ -88,6 +91,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c18354b4",
"metadata": {},
"outputs": [],
"source": [
@@ -126,6 +130,7 @@
},
{
"cell_type": "markdown",
"id": "5e19a255",
"metadata": {},
"source": [
"## 3. Data Cleaning dan Validasi Gambar (RGB)"
@@ -134,13 +139,23 @@
{
"cell_type": "code",
"execution_count": null,
"id": "63ee82cc",
"metadata": {},
"outputs": [],
"source": [
"# --- Determine dataset path ---\n",
"# Colab: zip extracts to dataset/ with dataset_jagung_v1/ subfolder\n",
"# Local: zip extracts classes directly to dataset/\n",
"if IS_COLAB:\n",
" dataset_path = \"/content/dataset/dataset_jagung_v1\"\n",
"else:\n",
" dataset_path = os.path.join(extract_path, \"dataset_jagung_v1\")\n",
" candidate = os.path.join(extract_path, \"dataset_jagung_v1\")\n",
" if os.path.isdir(candidate):\n",
" dataset_path = candidate\n",
" else:\n",
" dataset_path = extract_path # classes are directly in dataset/\n",
"\n",
"print(f\"Dataset path: {dataset_path}\")\n",
"\n",
"def clean_image_data(directory):\n",
" removed_count = 0\n",
@@ -167,6 +182,7 @@
},
{
"cell_type": "markdown",
"id": "c93f0a16",
"metadata": {},
"source": [
"## 4. Data Splitting (Train:Validation:Test = 70:15:15)"
@@ -876,13 +892,21 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": ".venv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"version": "3.12.0"
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
}
},
"nbformat": 4,