This commit is contained in:
rijalhabibullah 2026-07-08 15:19:53 +07:00
parent 23aa7d659d
commit abe9e45cc8
3 changed files with 44 additions and 2 deletions

View File

@ -214,7 +214,7 @@ class _HistoryScreenState extends State<HistoryScreen> {
), ),
_infoRow( _infoRow(
icon: Icons.bar_chart, icon: Icons.bar_chart,
text: 'Confidence: ${item.confidence}', text: 'Akurasi: ${item.confidence}',
), ),
_infoRow( _infoRow(
icon: Icons.location_on, icon: Icons.location_on,

View File

@ -72,7 +72,7 @@ class _ResultScreenState extends State<ResultScreen> {
child: Column( child: Column(
children: [ children: [
Text( Text(
"Confidence: ${widget.result.confidence}", "Akurasi: ${widget.result.confidence}",
style: TextStyle( style: TextStyle(
color: Colors.green[700], color: Colors.green[700],
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,

View File

@ -2102,6 +2102,14 @@
"print(\"-\" * 50)" "print(\"-\" * 50)"
] ]
}, },
{
"cell_type": "code",
"execution_count": null,
"id": "eef67333-43df-44eb-a7e2-9d6bc9e74eeb",
"metadata": {},
"outputs": [],
"source": []
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 13, "execution_count": 13,
@ -2162,6 +2170,40 @@
"print(\"✓ Data augmentation configured!\\n\")" "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", "cell_type": "markdown",
"id": "99a5ed48", "id": "99a5ed48",