init commit

This commit is contained in:
2025-11-08 19:15:39 +01:00
parent ecffcb08e8
commit c7adacf53b
470 changed files with 73751 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
{% extends "base.html" %}
{% block title %}
{{ title }}
{% endblock %}
{% block content %}
<div class="container">
<section>
<h3>Generate Multi-Class Normally Distributed Cluster Centers Dataset </h3>
<form id="model-form" method="post" action="/projects/generate-ndcc">
<div class="row">
<div class="three columns">
<label for="centers">Number of Centers:</label>
<select id="centers" name="centers">
<option value="1" {% if centers == "1" %}selected{% endif %}>100</option>
<option value="2" {% if centers == "2" %}selected{% endif %}>300</option>
<option value="3" {% if centers == "3" %}selected{% endif %}>500</option>
<option value="4" {% if centers == "4" %}selected{% endif %}>700</option>
</select>
</div>
<div class="three columns">
<label for="dataset">Number of Samples</label>
<input style="width: 100%;" type="number" step="1" id="nos" name="nos" value="{{nos}}">
</div>
<div class="three columns">
<label for="dataset">Number of features</label>
<input style="width: 100%;" type="number" step="1" id="nof" name="nof" value="{{nof}}">
</div>
<div class="three columns">
<label for="dataset">Number of classes</label>
<input style="width: 100%;" type="number" step="1" id="noc" name="noc" value="{{noc}}">
</div>
</div>
<div id="model-params" class="row" style="margin-top:15px;"></div>
<button type="submit">Generate Dataset</button>
{% if dataset_name %}
<a id="downloadLink" href="/static/public/files/{{ dataset_name }}" download style="display:none;"></a>
<button class="date" onclick="document.getElementById('downloadLink').click() " >
⬇ Download Dataset
</button>
{% endif %}
</form>
</section>
</div>
{% endblock %}

View File

@@ -0,0 +1,78 @@
{% extends "base.html" %}
{% block title %}
{{ title }}
{% endblock %}
{% block content %}
<div class="container">
<section>
<h3>Run Model</h3>
<form id="model-form" method="post" action="/projects/run-models">
<div class="row">
<div class="six columns">
<label for="model">Select Model:</label>
<select id="model" name="model">
{% for model in models %}
<option value="{{ model|replace(' ', '_') }}"
{% if selected_model is defined and selected_model == model|replace(' ', '_') %}selected{% endif %}>
{{ model }}
</option>
{% endfor %}
</select>
</div>
<div class="six columns">
<label for="dataset">Select Dataset:</label>
<select id="dataset" name="dataset">
{% for dataset in datasets %}
<option value="{{ dataset }}"
{% if selected_dataset is defined and selected_dataset == dataset %}selected{% endif %}>
{{ dataset }}
</option>
{% endfor %}
</select>
</div>
</div>
<div id="model-params" class="row" style="margin-top:15px;"></div>
<button type="submit">Run</button>
</form>
</section>
{% if results %}
<h3>Last 20 Results</h3>
<div style="overflow-x:auto; font-size: 1.2rem;">
<table class="u-full-width">
<thead>
<tr>
<th>Time</th>
<th>Model</th>
<th>Dataset</th>
<th>Parameters</th>
<th>Accuracy</th>
</tr>
</thead>
<tbody>
{% for row in results %}
<tr>
<td>{{ row.timestamp }}</td>
<td>{{ row.model }}</td>
<td>{{ row.dataset }}</td>
<td>{{ row.parameters }}</td>
<td>{{ row.accuracy }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
</div>
{% endblock %}

View File

@@ -0,0 +1,145 @@
{% extends "base.html" %}
{% block title %}
{{ title }}
{% endblock %}
{% block content %}
<div class="container">
<section>
<h3 style="margin-top: 10rem; ">Predict Pre-trained Customized Yolov8 model</h3>
<p>Table below shows results of <a href = "https://repairproject.github.io/fragment-restoration/">Semantic Motif Segmentation of Archaeological Fresco Fragments</a> article.</p>
<img src="../static/public/images/yolov8_result_table.png" alt="YOLO Example" style="max-width:100%; height:auto;">
<img src="../static/public/images/yolov8_result.png" alt="YOLO Example" style="max-width:100%; height:auto;">
<div class="table-responsive">
<table class="table" >
<th>
<strong>model</strong>
</th>
<th>
<strong>box precision</strong>
</th>
<th>
<strong>box recall</strong>
</th>
<th>
<strong>box map50</strong>
</th>
<tr>
<td>
Customized YOLOv8l
</td>
<td>
0.7866
</td>
<td>
0.8659
</td>
<td>
0.8439
</td>
</tr>
</table>
<table>
<th>
<strong>model</strong>
</th>
<th>
<strong>seg precision</strong>
</th>
<th>
<strong>seg recall</strong>
</th>
<th>
<strong>seg map50</strong>
</th>
<tr>
<td>
Customized YOLOv8l
</td>
<td>
0.8961
</td>
<td>
0.8113
</td>
<td>
0.9025
</td>
</tr>
</table>
</div>
<form id="model-form" method="post" action="/projects/run-yolo">
<div class="row">
<!-- Select Image -->
<div class="six columns">
<label for="select-image">Select Image</label>
<select id="select-image" name="selected_image">
{% for image in images %}
<option value="{{ image }}"
{% if selected_image is defined and selected_image == image %}selected{% endif %}>
{{ image }}
</option>
{% endfor %}
</select>
</div>
<!-- Confidence Input -->
<div class="six columns">
<label for="confidence">Confidence Threshold</label>
<input type="number"
style="width: 100%;"
id="confidence"
name="confidence"
min="0" max="1" step="0.01"
value="{{ selected_confidence if selected_confidence is defined else 0.8 }}">
</div>
</div>
<div class="row">
<div class="six columns">
<img id="original-preview"
src="../static/public/files/repair/images/{{ selected_image }}"
alt="Original Image" style="max-width:100%; height:auto;">
</div>
<!-- Predicted image -->
<div class="six columns">
{% if result_path %}
<img id="predicted-preview"
src="{{ result_path }}"
alt="Predicted Image" style="max-width:100%; height:auto;">
{% else %}
<p>No prediction yet.</p>
{% endif %}
</div>
</div>
<button type="submit">Predict</button>
</form>
</section>
</div>
{% endblock %}