Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update UI + latest yolov5 sources #15

Merged
merged 32 commits into from
May 7, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
980a554
merge latest version done, not tested
mkolomeychenko Apr 29, 2021
5aae1c8
split tabs with radio buttons
mkolomeychenko Apr 29, 2021
ee16e3f
models table -wip
mkolomeychenko Apr 29, 2021
dc8e78c
models table -wip
mkolomeychenko Apr 29, 2021
a878179
start split html template to parts
mkolomeychenko Apr 30, 2021
236e62d
ui refactoring
mkolomeychenko Apr 30, 2021
db61ef4
compile-template wip - paths confusion
mkolomeychenko Apr 30, 2021
2eae9b2
compile wip
mkolomeychenko Apr 30, 2021
3455a45
train/val splits
mkolomeychenko Apr 30, 2021
9591dd1
keep/ignore unlabeled images
mkolomeychenko Apr 30, 2021
89bddaa
models table
mkolomeychenko Apr 30, 2021
71c5710
training hyperparameters
mkolomeychenko May 4, 2021
88cb140
UI templates - done
mkolomeychenko May 4, 2021
5aacc66
unlabeled count in UI
mkolomeychenko May 5, 2021
e014b75
add adam optimizer
mkolomeychenko May 5, 2021
dfd58b1
convert_project to detection - works
mkolomeychenko May 5, 2021
0aec05b
start train/val splits
mkolomeychenko May 5, 2021
0072702
splits wip
mkolomeychenko May 5, 2021
8478e17
splits done, only simple tests
mkolomeychenko May 6, 2021
d65e4bc
splits validation
mkolomeychenko May 6, 2021
6bb0c91
data preprocessing - not tested
mkolomeychenko May 6, 2021
0433ae3
download weights - wip
mkolomeychenko May 7, 2021
55abdb5
init_script_arguments - not tested
mkolomeychenko May 7, 2021
050407a
init_script_arguments - not tested
mkolomeychenko May 7, 2021
88930f9
prepare weights - wip
mkolomeychenko May 7, 2021
2ab8ed1
not tested
mkolomeychenko May 7, 2021
3355946
add metrics period
mkolomeychenko May 7, 2021
6182567
set output
mkolomeychenko May 7, 2021
8b361b3
artifacts dirs
mkolomeychenko May 7, 2021
d790a2f
train_batches_uploaded flag
mkolomeychenko May 7, 2021
5aad4b1
pre-release for debug
mkolomeychenko May 7, 2021
52893b5
update config
mkolomeychenko May 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
models table -wip
  • Loading branch information
mkolomeychenko committed Apr 29, 2021
commit dc8e78c3eaa3c264d2cd6be4ee6096ff1e11ce24
68 changes: 49 additions & 19 deletions supervisely/train/src/gui.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
font-size: 13px;
}

.beautiful-table { border-collapse: collapse; }
.beautiful-table tr:nth-child(2n) { background-color: #f6f8fa; }
.beautiful-table td, .beautiful-table th {
border: 1px solid #dfe2e5;
padding: 6px 13px;
text-align: center;
line-height: 20px;
}

#yolov5-train .el-tabs.el-tabs-cards { border-radius: 4px; box-shadow: none; }
#yolov5-train .el-tabs.el-tabs-cards .el-tabs__header { background-color: #f6fafd; }
#yolov5-train .el-tabs.el-tabs-cards .el-tabs__nav { float: none; display: flex; justify-content:
Expand All @@ -28,7 +37,6 @@
<sly-icon slot="icon" :options="{ imageUrl: `${data.projectPreviewUrl}` }"/>
</sly-field>
</sly-card>

<sly-card class="mt15"
title="2. Training classes"
subtitle="Select classes, that should be used for training. Training supports only classes of shape
Expand Down Expand Up @@ -108,7 +116,7 @@
<div>Images already should have assigned train or val tag</div>
</el-radio>
<sly-field title="Notice 1: How to create train/val splits based on tags"
description="Option 1: use app 'tag-train-val-test' from Ecosystem. Option 2: manually assign
description="Option 1: use app 'Assign train/val tags to images' from Ecosystem. Option 2: manually assign
train/val tags to images. Option 3: use other way you want - python SDK, API, ...
Please, contact tech support if your case is not covered">
<sly-icon slot="icon" :options="{ color: '#fba607', bgColor: '#ffe9da', rounded: false }">
Expand Down Expand Up @@ -178,24 +186,46 @@
<el-tab-pane name="coco">
<el-radio slot="label" v-model="state.modelWeightsOptions" label="coco">
Pretrained on COCO
<div>Default pretrained checkpoints provided by authors of YOLOv5</div>
</el-radio>
<el-table
class="ultra-table"
:data="data.models"
style="width: 100%"
>
<el-table-column label="Model" prop="model" sortable>
<template scope="scope">
<el-radio class="radio" v-model="state.selectedModel" :label="scope.row.model">
{{scope.row.model}}
</el-radio>
</template>
</el-table-column>
<el-table-column label="Params (M)" prop="params" sortable></el-table-column>
<el-table-column label="Flops (G)" prop="flops" sortable></el-table-column>
<el-table-column label="Top-1 (%)" prop="top1" sortable></el-table-column>
<el-table-column label="Top-5 (%)" prop="top5" sortable></el-table-column>
</el-table>

<table class="beautiful-table">
<thead>
<tr>
<th>Model</th>
<th>Params (P)</th>
<th>Params (V)</th>
</tr>
</thead>
<tbody>
<tr v-for="row in data.models">
<td v-for="(val, key) in row">{{ val }}</td>

<!-- <td>{{ row['blah-blah'] }}</td>-->
</tr>
</tbody>
</table>

<!-- <el-table-->
<!-- class="ultra-table"-->
<!-- :data="data.models"-->
<!-- style="width: 100%"-->
<!-- >-->
<!-- <el-table-column label="Model" prop="model" sortable>-->
<!-- <template scope="scope">-->
<!-- <el-radio class="radio" v-model="state.selectedModel" :label="scope.row.model">-->
<!-- {{scope.row.model}}-->
<!-- </el-radio>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="In size (pixels)" prop="size pixels" sortable></el-table-column>-->
<!-- <el-table-column label="mAP_val 0.5:0.95" prop="mAP_val 0.5_0.95" sortable></el-table-column>-->
<!-- <el-table-column label="mAP_test 0.5:0.95" prop="mAP_test 0.5_0.95" sortable></el-table-column>-->
<!-- <el-table-column label="mAP_val 0.5" prop="mAP_val 0.5" sortable></el-table-column>-->
<!-- <el-table-column label="speed v100 (ms)" prop="speed v100 (ms)" sortable></el-table-column>-->
<!-- <el-table-column label="params (M)" prop="params (M)" sortable></el-table-column>-->
<!-- <el-table-column label="FLOPS 640 (B)" prop="FLOPS 640 (B)" sortable></el-table-column>-->
<!-- </el-table>-->
</el-tab-pane>
<el-tab-pane name="custom">
<el-radio slot="label" v-model="state.modelWeightsOptions" label="custom">
Expand Down
99 changes: 99 additions & 0 deletions supervisely/train/src/models_description.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
def get_models_list():
return [
{
"config": "",
"weightsUrl": "",
"model": "YOLOv5s",
"size pixels": 640,
"mAP_val 0.5_0.95": 36.7,
"mAP_test 0.5_0.95": 36.7,
"mAP_val 0.5": 55.4,
"speed v100 (ms)": 2.0,
"params (M)": 7.3,
"FLOPS 640 (B)": 17.0,
},
{
"config": "",
"weightsUrl": "",
"model": "YOLOv5m",
"size pixels": 640,
"mAP_val 0.5_0.95": 44.5,
"mAP_test 0.5_0.95": 44.5,
"mAP_val 0.5": 63.1,
"speed v100 (ms)": 2.7,
"params (M)": 21.4,
"FLOPS 640 (B)": 51.3,
},
{
"config": "",
"weightsUrl": "",
"model": "YOLOv5l",
"size pixels": 640,
"mAP_val 0.5_0.95": 48.2,
"mAP_test 0.5_0.95": 48.2,
"mAP_val 0.5": 66.9,
"speed v100 (ms)": 3.8,
"params (M)": 47.0,
"FLOPS 640 (B)": 115.4,
},
{
"config": "",
"weightsUrl": "",
"model": "YOLOv5x",
"size pixels": 640,
"mAP_val 0.5_0.95": 50.4,
"mAP_test 0.5_0.95": 50.4,
"mAP_val 0.5": 68.8,
"speed v100 (ms)": 6.1,
"params (M)": 87.7,
"FLOPS 640 (B)": 218.8,
},
{
"config": "",
"weightsUrl": "",
"model": "YOLOv5s6",
"size pixels": 1280,
"mAP_val 0.5_0.95": 43.3,
"mAP_test 0.5_0.95": 43.3,
"mAP_val 0.5": 61.9,
"speed v100 (ms)": 4.3,
"params (M)": 12.7,
"FLOPS 640 (B)": 17.4,
},
{
"config": "",
"weightsUrl": "",
"model": "YOLOv5m6",
"size pixels": 1280,
"mAP_val 0.5_0.95": 50.5,
"mAP_test 0.5_0.95": 50.5,
"mAP_val 0.5": 68.7,
"speed v100 (ms)": 8.4,
"params (M)": 35.9,
"FLOPS 640 (B)": 52.4,
},
{
"config": "",
"weightsUrl": "",
"model": "YOLOv5l6",
"size pixels": 1280,
"mAP_val 0.5_0.95": 53.4,
"mAP_test 0.5_0.95": 53.4,
"mAP_val 0.5": 71.1,
"speed v100 (ms)": 12.3,
"params (M)": 77.2,
"FLOPS 640 (B)": 117.7,
},
{
"config": "",
"weightsUrl": "",
"model": "YOLOv5x6",
"size pixels": 1280,
"mAP_val 0.5_0.95": 54.4,
"mAP_test 0.5_0.95": 54.4,
"mAP_val 0.5": 72.0,
"speed v100 (ms)": 22.4,
"params (M)": 141.8,
"FLOPS 640 (B)": 222.9,
},
]
8 changes: 5 additions & 3 deletions supervisely/train/src/sly_init_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import sly_train_globals as globals
import sly_metrics as metrics
from models_description import get_models_list


empty_gallery = {
Expand Down Expand Up @@ -80,16 +81,17 @@ def init_splits(PROJECT, data, state):


def init_model_settings(data, state):
data["models"] = "" #@TODO
data["models"] = get_models_list()
# data["modelSizes"] = [
# {"label": "yolov5s", "config": "yolov5s.yaml", "params": "7.3M"},
# {"label": "yolov5m", "config": "yolov5m.yaml", "params": "21.4M"},
# {"label": "yolov5l", "config": "yolov5l.yaml", "params": "47.0M"},
# {"label": "yolov5x", "config": "yolov5x.yaml", "params": "87.7M"},
# ]
# state["modelSize"] = data["modelSizes"][0]["label"]
state["modelWeightsOptions"] = "coco"
state["pretrainedWeights"] = f'{data["modelSizes"][0]["label"]}.pt'
state["selectedModel"] = ""
state["modelWeightsOptions"] = "" # "coco"
state["pretrainedWeights"] = "" #f'{data["modelSizes"][0]["label"]}.pt'

# @TODO: for debug
#state["weightsPath"] = "/yolov5_train/coco128_002/2390/weights/best.pt"
Expand Down