From abe9e45cc8d155fc7653cbe95b32e56220babaf8 Mon Sep 17 00:00:00 2001 From: rijalhabibullah Date: Wed, 8 Jul 2026 15:19:53 +0700 Subject: [PATCH] finally --- .../padi_app/lib/screen/history_screen.dart | 2 +- .../padi_app/lib/screen/result_screen.dart | 2 +- .../rice_leaf_cnn_classification.ipynb | 42 +++++++++++++++++++ 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/mobile_TA/padi_app/lib/screen/history_screen.dart b/mobile_TA/padi_app/lib/screen/history_screen.dart index 60119d6..b815ab4 100644 --- a/mobile_TA/padi_app/lib/screen/history_screen.dart +++ b/mobile_TA/padi_app/lib/screen/history_screen.dart @@ -214,7 +214,7 @@ class _HistoryScreenState extends State { ), _infoRow( icon: Icons.bar_chart, - text: 'Confidence: ${item.confidence}', + text: 'Akurasi: ${item.confidence}', ), _infoRow( icon: Icons.location_on, diff --git a/mobile_TA/padi_app/lib/screen/result_screen.dart b/mobile_TA/padi_app/lib/screen/result_screen.dart index d59e44f..ba870eb 100644 --- a/mobile_TA/padi_app/lib/screen/result_screen.dart +++ b/mobile_TA/padi_app/lib/screen/result_screen.dart @@ -72,7 +72,7 @@ class _ResultScreenState extends State { child: Column( children: [ Text( - "Confidence: ${widget.result.confidence}", + "Akurasi: ${widget.result.confidence}", style: TextStyle( color: Colors.green[700], fontWeight: FontWeight.bold, diff --git a/rice leaf diseases dataset/rice_leaf_cnn_classification.ipynb b/rice leaf diseases dataset/rice_leaf_cnn_classification.ipynb index e884513..9892656 100644 --- a/rice leaf diseases dataset/rice_leaf_cnn_classification.ipynb +++ b/rice leaf diseases dataset/rice_leaf_cnn_classification.ipynb @@ -2102,6 +2102,14 @@ "print(\"-\" * 50)" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "eef67333-43df-44eb-a7e2-9d6bc9e74eeb", + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "code", "execution_count": 13, @@ -2162,6 +2170,40 @@ "print(\"✓ Data augmentation configured!\\n\")" ] }, + { + "cell_type": "code", + "execution_count": 2, + "id": "0940e186-9b40-4ad3-b578-9b7012f50b99", + "metadata": {}, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'train_generator' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[31m---------------------------------------------------------------------------\u001b[39m", + "\u001b[31mNameError\u001b[39m Traceback (most recent call last)", + "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[2]\u001b[39m\u001b[32m, line 3\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;66;03m# Pastikan 'train_generator' adalah objek yang Anda buat dengan .flow_from_directory()\u001b[39;00m\n\u001b[32m 2\u001b[39m \u001b[38;5;66;03m# Ambil satu batch gambar\u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m3\u001b[39m images, labels = \u001b[38;5;28mnext\u001b[39m(\u001b[43mtrain_generator\u001b[49m)\n\u001b[32m 5\u001b[39m \u001b[38;5;66;03m# Tampilkan 5 gambar pertama dari batch tersebut\u001b[39;00m\n\u001b[32m 6\u001b[39m plt.figure(figsize=(\u001b[32m15\u001b[39m, \u001b[32m5\u001b[39m))\n", + "\u001b[31mNameError\u001b[39m: name 'train_generator' is not defined" + ] + } + ], + "source": [ + "# Pastikan 'train_generator' adalah objek yang Anda buat dengan .flow_from_directory()\n", + "# Ambil satu batch gambar\n", + "images, labels = next(train_generator)\n", + "\n", + "# Tampilkan 5 gambar pertama dari batch tersebut\n", + "plt.figure(figsize=(15, 5))\n", + "for i in range(5):\n", + " plt.subplot(1, 5, i+1)\n", + " # ImageDataGenerator biasanya menghasilkan data dalam rentang [0, 255] atau [0, 1]\n", + " # Jika data sudah dinormalisasi (rescale 1./255), Anda mungkin perlu mengalikannya kembali agar terlihat normal\n", + " plt.imshow(images[i]) \n", + " plt.axis('off')\n", + "plt.show()" + ] + }, { "cell_type": "markdown", "id": "99a5ed48",