Skip to content

Commit

Permalink
Added labels to review tab regression plot (#400)
Browse files Browse the repository at this point in the history
Co-authored-by: Josef Haupt <[email protected]>
  • Loading branch information
Josef-Haupt and Josef Haupt authored Aug 7, 2024
1 parent 5345886 commit fd3506d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ def on_autotune_change(value):
label=loc.localize("training-tab-crop-mode-radio-label"),
info=loc.localize("training-tab-crop-mode-radio-info"),
)

crop_overlap = gr.Slider(
minimum=0,
maximum=2.99,
Expand Down Expand Up @@ -1610,6 +1610,10 @@ def create_log_plot(positives, negatives, fig_num=None):
ax = f.add_subplot(111)
ax.set_xlim(0, 1)
ax.set_yticks([0, 1])
ax.set_ylabel(
f"{loc.localize('review-tab-regression-plot-y-label-false')}/{loc.localize('review-tab-regression-plot-y-label-true')}"
)
ax.set_xlabel(loc.localize("review-tab-regression-plot-x-label"))

x_vals = [float(os.path.basename(fl).split("_", 1)[0]) for fl in positives + negatives]
y_val = [1] * len(positives) + [0] * len(negatives)
Expand Down
3 changes: 3 additions & 0 deletions lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@
"review-tab-no-species-found-error": "Keine Arten im ausgewählten Verzeichnis gefunden.",
"review-tab-start-button-label": "Überprüfung starten",
"review-tab-segment-matrix-count-header": "Anzahl",
"review-tab-regression-plot-x-label": "Konfidenzwert",
"review-tab-regression-plot-y-label-false": "Falsch",
"review-tab-regression-plot-y-label-true": "Wahr",
"species-tab-title": "Arten",
"species-tab-select-output-directory-button-label": "Wählen Sie das Ausgabeverzeichnis",
"species-tab-filename-textbox-label": "Name der Datei, wenn nicht angegeben, wird 'species_list.txt' verwendet.",
Expand Down
3 changes: 3 additions & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@
"review-tab-no-species-found-error": "No species found in the selected directory.",
"review-tab-start-button-label": "Start reviewing",
"review-tab-segment-matrix-count-header": "Count",
"review-tab-regression-plot-x-label": "Confidence",
"review-tab-regression-plot-y-label-false": "False",
"review-tab-regression-plot-y-label-true": "True",
"species-tab-title": "Species",
"species-tab-select-output-directory-button-label": "Select output directory",
"species-tab-filename-textbox-label": "Name of the file, if not specified 'species_list.txt' will be used.",
Expand Down

0 comments on commit fd3506d

Please sign in to comment.