Skip to content

Commit

Permalink
Use consistent terminology
Browse files Browse the repository at this point in the history
Rather than a mix of category/class/label, use the term "label" everywhere in
the UI.
  • Loading branch information
Brianna Major committed Oct 10, 2024
1 parent b5e7328 commit fd665fc
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export default Vue.extend({
:value="categoryIndex(category.label)"
class="h-superpixel-select-option"
>
Class: {{ category.label }}
Label: {{ category.label }}
</option>
</select>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default Vue.extend({
showLabelingContainer: true,
editingLabel: -1,
checkedCategories: [],
currentCategoryLabel: 'New Category',
currentCategoryLabel: 'New Label',
currentCategoryFillColor: getFillColor(0),
editingHotkey: -1,
currentHotkeyInput: []
Expand All @@ -52,7 +52,7 @@ export default Vue.extend({
const errors = [];
const counts = _.map(Object.keys(this.labeledSuperpixelCounts), (entry) => this.labeledSuperpixelCounts[entry].count);
if (_.filter(counts, (count) => count > 0).length < 2) {
errors.push('You must label superpixels for at least two different categories.');
errors.push('You must label superpixels for at least two different labels.');
}
return errors;
},
Expand Down Expand Up @@ -222,7 +222,7 @@ export default Vue.extend({
*************************/
addCategory(newName, newFillColor) {
if (_.isUndefined(newName)) {
newName = 'New Category';
newName = 'New Label';
}
if (_.isUndefined(newFillColor)) {
const idx = store.categoriesAndIndices.length || 0;
Expand Down Expand Up @@ -320,7 +320,7 @@ export default Vue.extend({
this.$emit('combine');
},
mergeCategory(newLabel, newFillColor) {
this.addCategory('Merged Categories', newFillColor);
this.addCategory('Merged Labels', newFillColor);
this.combineCategories(this.checkedCategories, true);
_.last(store.categoriesAndIndices).category.label = this.enforceUniqueName(newLabel);
},
Expand All @@ -347,9 +347,9 @@ export default Vue.extend({
return _.contains(predictions, labels[i + 1].label);
});
});
const predictionsWarning = `Deleting a category with predictions will
const predictionsWarning = `Deleting a label with predictions will
immediately force retraining to run.`;
const labelingWarning = `Deleting categories cannot be undone.`;
const labelingWarning = `Deleting labels cannot be undone.`;
const message = `${hasPredictions ? predictionsWarning : labelingWarning}
Are you sure you want to delete all ${labelCounts} labeled
superpixels?`;
Expand Down Expand Up @@ -669,7 +669,7 @@ export default Vue.extend({
class="btn btn-danger btn-xs"
:disabled="checkedCategories.length < 1"
data-toggle="tooltip"
title="Delete category"
title="Delete label"
@click="() => deleteCategory(checkedCategories)"
>
<i class="icon-trash" />
Expand All @@ -694,7 +694,7 @@ export default Vue.extend({
:disabled="!currentCategoryFormValid"
@click="() => addCategory()"
>
<i class="icon-plus" /> Add Category
<i class="icon-plus" /> Add Label
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ export default Vue.extend({
href="#categories"
@click="categoriesPanelCollapsed = !categoriesPanelCollapsed"
>
Categories
Labels
<i
v-if="categoriesPanelCollapsed"
class="icon-angle-down"
Expand Down Expand Up @@ -992,7 +992,7 @@ export default Vue.extend({
type="checkbox"
value="selectedCategory"
>
Class Name
Label Name
</label>
</li>
<li>
Expand Down Expand Up @@ -1126,7 +1126,7 @@ export default Vue.extend({
data-toggle="dropdown"
:disabled="selectedReviewSuperpixels.length < 1"
>
Change Class
Change Label
<span class="caret" />
</button>
<ul
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default Vue.extend({
data() {
return {
currentCategoryFillColor: 'rgba(0, 0, 0, 0.5)',
categoryName: 'Merged Categories'
categoryName: 'Merged Labels'
};
},
computed: {
Expand All @@ -22,8 +22,8 @@ export default Vue.extend({
const labelCounts = _.reduce([...store.selectedLabels.values()], (acc, selected) => {
return acc + selected.count;
}, 0);
const message = `This will combine ${numCategories} categories into
one category containing all ${labelCounts} labeled
const message = `This will combine ${numCategories} labels into
one label containing all ${labelCounts} labeled
superpixels.`;
return message;
},
Expand Down Expand Up @@ -80,11 +80,11 @@ export default Vue.extend({
&times;
</button>
<h4 class="modal-title">
Merge Categories
Merge Labels
</h4>
</div>
<div class="modal-body">
<p> WARNING: Merging categories cannot be undone. {{ warningMessage }} </p>
<p> WARNING: Merging labels cannot be undone. {{ warningMessage }} </p>
<div class="form-group h-form-inputs">
<label for="usr">New Name:</label>
<input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export default Vue.extend({
const fillColor = getFillColor(store.categoriesAndIndices.length);
store.categoriesAndIndices.push({
category: {
label: 'New Category',
label: 'New Label',
fillColor,
strokeColor: boundaryColor
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ export const activeLearningSteps = {
export const groupByOptions = {
0: '(None)',
1: 'Slide',
2: 'Class',
2: 'Label',
3: 'Agree/Disagree'
};

export const sortByOptions = {
0: '(None)',
1: 'Slide',
2: 'Class',
2: 'Label',
3: 'Agree/Disagree',
4: 'Confidence',
5: 'Certainty'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const updatePixelmapLayerStyle = () => {
d += 1;
}
if (d < 0 || d >= store.categories.length) {
console.warn(`No category found at index ${d} in the category map.`);
console.warn(`No label found at index ${d} in the label map.`);
return 'rgba(0, 0, 0, 0)';
}
const category = store.categories[d];
Expand Down

0 comments on commit fd665fc

Please sign in to comment.