-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
from supervisely.app.widgets import Card, Checkbox, Container, Editor, Field, Input, Select | ||
|
||
import project_dataset.src.globals as g | ||
|
||
inference_mode = Select(items=[Select.Item(mode) for mode in g.inference_modes]) | ||
inference_mode.set_value(g.inference_modes[0]) | ||
mode_field = Field( | ||
content=inference_mode, | ||
title="Inference mode", | ||
description="Select how to process images: full images or using sliding window.", | ||
) | ||
|
||
class_tag_suffix = Input(value="model", minlength=1) | ||
class_tag_suffix_field = Field( | ||
content=class_tag_suffix, | ||
title="Class and tag suffix", | ||
description="Suffix that will be added to class and tag names.", | ||
) | ||
always_add_suffix = Checkbox("Always add suffix to model predictions") | ||
|
||
add_predictions_mode = Select(items=[Select.Item(mode) for mode in g.add_predictions_modes]) | ||
add_predictions_mode.set_value(g.add_predictions_modes[0]) | ||
add_predictions_mode_field = Field( | ||
content=add_predictions_mode, | ||
title="Add predictions mode", | ||
description="Select how to add predictions to the project: by merging with existing labels or by replacing them.", | ||
) | ||
|
||
additional_settings = Editor() | ||
additional_settings_field = Field( | ||
content=additional_settings, | ||
title="Additional settings", | ||
description="Model specific inference settings in YAML format.", | ||
) | ||
|
||
card = Card( | ||
"4️⃣ Inference settings", | ||
"Choose additional settings for model inference.", | ||
content=Container( | ||
[ | ||
mode_field, | ||
class_tag_suffix_field, | ||
always_add_suffix, | ||
add_predictions_mode_field, | ||
additional_settings_field, | ||
] | ||
), | ||
collapsable=True, | ||
lock_message="Connect to the deployed neural network on step 2️⃣.", | ||
) | ||
card.lock() | ||
card.collapse() |