diff --git a/atlas_server/src/static/training/config.py b/atlas_server/src/static/training/config.py index a3663da50b624af25825d43c4a23e84dd723142b..654a017bb67a768265e97b74a5f20ef41e0e1ef3 100644 --- a/atlas_server/src/static/training/config.py +++ b/atlas_server/src/static/training/config.py @@ -17,8 +17,7 @@ def make_training_parameters(**kwargs): from_section = min(sections) to_section = max(sections) section_range = to_section - from_section - section_range = int(math.ceil((1 + increase) * section_range)) - increase = int(math.ceil(section_range / 2)) + increase = int(math.ceil(section_range * increase)) // 2 min_section = max(from_section - increase, 1) max_section = to_section + increase @@ -153,6 +152,7 @@ def make_training_parameters(**kwargs): congruent_slices=congruent_slices, use_pre_registration_for_congruent_sections=True, congruent_mode="match", + combine_areas=True, ) ) ), diff --git a/microdraw/src/atlas_ui.js b/microdraw/src/atlas_ui.js index 3b7ad6363c00b74a0d27749aba59f9ada84e7ab3..657ff7b2f45892330e1d264dceef6303954ac02a 100644 --- a/microdraw/src/atlas_ui.js +++ b/microdraw/src/atlas_ui.js @@ -109,6 +109,7 @@ var app = new Vue({ selected_job: null, enable_auto_rename: true, annotation_import: new AnnotationImport(), + annotation_filter: null, }, methods: { getProjects: function () { @@ -379,6 +380,20 @@ var app = new Vue({ this.available_annotations.push(new_annotation); } }, + filterAnnotation: function(annotation) { + if (this.annotation_filter === null || this.annotation_filter === "") { + return true; + } + try { + // Ignore case + var re = new RegExp(this.annotation_filter, "i"); + } catch(err) { + // Invalid regex, might also occur during typing + return true; + } + var match = re.exec(annotation.name); + return match !== null; + }, deleteTask(project, task_index) { // Delete the task from the project let task = project.tasks[task_index]; diff --git a/microdraw/src/microdraw.html b/microdraw/src/microdraw.html index f76c08dc90cb6a41dd3b4485aefadde0f9ec3205..0effafec96baab6d0bf952c8dfcf3ccb049c5484 100755 --- a/microdraw/src/microdraw.html +++ b/microdraw/src/microdraw.html @@ -335,6 +335,9 @@ <label for="atlas_ui_task_form_name">Name</label> <input v-model="selected_task.name" type="text" class="form-control" id="atlas_ui_task_form_name"> + <label for="atlas_ui_task_form_filter">Annotation filter</label> + <input v-model="annotation_filter" type="text" class="form-control" + id="atlas_ui_task_form_filter"> <input type="checkbox" v-model="enable_auto_rename" id="atlas_ui_task_form_auto_rename"/> <label for="atlas_ui_task_form_auto_rename">Enable auto-rename</label> </div> @@ -372,6 +375,7 @@ class="list-group atlas_annotation_list border border-dark rounded bg-light" v-if="selected_task !== null"> <li v-for="(annotation, index) in available_annotations" + v-if="filterAnnotation(annotation)" class="list-group-item list-group-item-action"> <div class="form-row"> <label class="col-1 col-form-label">Name</label>