Improved classification performance

This commit is contained in:
2024-05-15 05:32:49 +01:00
parent 516d1d7634
commit 652542d261
18 changed files with 211 additions and 98 deletions

View File

@@ -42,6 +42,7 @@
import 'src/styles/forms.css';
import { notificationStore } from 'src/lib/NotificationsStore.svelte';
import Spinner from 'src/lib/Spinner.svelte';
let model: Promise<Model> = $state(new Promise(() => {}));
let _model: Model | undefined = $state(undefined);
@@ -188,7 +189,6 @@
<h1 class="text-center">
{m.name}
</h1>
<!-- TODO improve message -->
<h2 class="text-center">Failed to prepare model</h2>
<DeleteModel model={m} />
@@ -206,8 +206,7 @@
{:else if m.status == 3}
<BaseModelInfo model={m} />
<div class="card">
<!-- TODO improve this -->
Processing zip file...
Processing zip file... <Spinner />
</div>
{:else if m.status == -3 || m.status == -4}
<BaseModelInfo model={m} />

View File

@@ -70,16 +70,16 @@
<button class="tab" class:selected={isActive('upload')} onclick={setActive('upload')}>
Upload
</button>
<button
<!--button
class="tab"
class:selected={isActive('create-class')}
onclick={setActive('create-class')}
>
Create Class
</button>
<button class="tab" class:selected={isActive('api')} onclick={setActive('api')}>
</button-->
<!--button class="tab" class:selected={isActive('api')} onclick={setActive('api')}>
Api
</button>
</button-->
</div>
<div class="content" class:selected={isActive('upload')}>
<form onsubmit={preventDefault(uploadZip)}>
@@ -111,10 +111,10 @@
{/if}
</form>
</div>
<div class="content" class:selected={isActive('create-class')}>
<!--div class="content" class:selected={isActive('create-class')}>
<ModelTable {classes} {model} {onreload} />
</div>
<div class="content" class:selected={isActive('api')}>TODO</div>
</div-->
<!--div class="content" class:selected={isActive('api')}>TODO</div-->
</Tabs>
<div class="tabs"></div>
{:else}
@@ -122,7 +122,7 @@
{#if numberOfInvalidImages > 0}
<p class="danger">
There are images {numberOfInvalidImages} that were loaded that do not have the correct format.
These images will be delete when the model trains.
These images will be deleted when the model trains.
</p>
{/if}
<ModelTable {classes} {model} {onreload} />

View File

@@ -54,7 +54,7 @@
{#if number_of_invalid_images > 0}
<p class="danger">
There are images {number_of_invalid_images} that were loaded that do not have the correct format.DeleteZip
These images will be delete when the model trains.
These images will be deleted when the model trains.
</p>
{/if}
<!-- TODO expading mode -->
@@ -101,14 +101,14 @@
<h2>To train the model please provide data to the model first</h2>
{/if}
</form>
{:else}
{:else if ![4, 6, 7].includes(model.status)}
<form class:submitted onsubmit={submitRetrain}>
{#if has_data}
<h2>This model has new classes and can be expanded</h2>
{#if number_of_invalid_images > 0}
<p class="danger">
There are images {number_of_invalid_images} that were loaded that do not have the correct format.DeleteZip
These images will be delete when the model trains.
These images will be deleted when the model trains.
</p>
{/if}
<button> Retrain </button>