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

Iterate UI for AI job modal #7368

Merged
merged 33 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5640d14
WIP: renew ai job modal
knollengewaechs Sep 29, 2023
cd6d3d9
trying out radio buttons but probably discarding
knollengewaechs Sep 30, 2023
eeaf452
style radio button using card
knollengewaechs Sep 30, 2023
282c56f
update store with new action
knollengewaechs Oct 2, 2023
9e5faa2
Merge branch 'master' into ai-job-modal
knollengewaechs Oct 2, 2023
11b9029
not pretty but working: first version of full modal
knollengewaechs Oct 2, 2023
39a822a
improve code structure
knollengewaechs Oct 5, 2023
9444b4d
use type for ai job modal state
knollengewaechs Oct 6, 2023
157c19b
WIP: reintroduce description
knollengewaechs Oct 6, 2023
ad6e369
style disclaimer
knollengewaechs Oct 6, 2023
3b0b9ef
WIP: improve spacing
knollengewaechs Oct 7, 2023
6fd003d
remove dev remnants and style modal some more
knollengewaechs Oct 9, 2023
29ad42e
refactor code
knollengewaechs Oct 9, 2023
7d3abc5
improve styling and design
knollengewaechs Oct 9, 2023
eae3b0d
trying to fix materialize volume modal
knollengewaechs Oct 9, 2023
93f6407
Merge branch 'master' into ai-job-modal
knollengewaechs Oct 9, 2023
1ca1565
fix materialize volume annotation
knollengewaechs Oct 9, 2023
254d395
add changelog and rename
knollengewaechs Oct 9, 2023
19369ef
improve start modal state, rename classes
knollengewaechs Oct 10, 2023
313060a
Fix triggering of volume annotation materialization.
daniel-wer Oct 10, 2023
268e3de
address code review
knollengewaechs Oct 16, 2023
ca8295c
improve select title
knollengewaechs Oct 16, 2023
7a94d35
diable AI button without color layer and propose whole-layer-bb
knollengewaechs Oct 17, 2023
013f50f
merge master
knollengewaechs Oct 17, 2023
6d70123
format code and remove comment
knollengewaechs Oct 18, 2023
2f92e49
downsample images
knollengewaechs Oct 18, 2023
be1d657
chnage docs
knollengewaechs Oct 18, 2023
19e12fd
improve wording in docs and always propose whole layer bounding box
knollengewaechs Oct 19, 2023
83fc117
Merge branch 'master' into ai-job-modal
knollengewaechs Oct 19, 2023
985fec0
merge master
knollengewaechs Oct 23, 2023
b886458
lint
knollengewaechs Oct 23, 2023
334d9ba
remove wrapper
knollengewaechs Oct 23, 2023
4725215
Merge branch 'master' into ai-job-modal
knollengewaechs Oct 23, 2023
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
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Updated backend code to Scala 2.13, with upgraded Dependencies for optimized performance. [#7327](https://github.com/scalableminds/webknossos/pull/7327)
- Remote datasets with a datasource-properties.json can now also be imported without the need for OME metadata. [#7372](https://github.com/scalableminds/webknossos/pull/7372)
- Occurrences of isosurface were renamed to ad-hoc mesh. This also applies to configuration files. [#7350](https://github.com/scalableminds/webknossos/pull/7350)
- Improved user interface to start automatic AI analysis. [#7368](https://github.com/scalableminds/webknossos/pull/7368)

### Fixed
- Fixed that some segment (group) actions were not properly disabled for non-editable segmentation layers. [#7207](https://github.com/scalableminds/webknossos/issues/7207)
Expand Down
12 changes: 6 additions & 6 deletions docs/automated_analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ We would love to integrate analysis solutions for more modalities and use cases.
Automated analysis is only available on [webknossos.org](https://webknossos.org) at the moment.
If you want to set up on-premise automated analysis at your institute/workplace, then [please contact us](mailto:[email protected]).

## Nuclei Inferral
As a first trial, WEBKNOSSOS includes nuclei segmentation. This analysis is designed to work with serial block-face electron microscopy (SBEM) data of neural tissue (brain/cortex) and will find and segment all nuclei within the dataset.
## Neuron Segmentation
As a first trial, WEBKNOSSOS includes neuron segmentation. This analysis is designed to work with serial block-face electron microscopy (SBEM) data of neural tissue (brain/cortex) and will segment all neurons within the dataset.

You can launch the nuclei inferral from the `Menu` dropdown in the action bar at the top. Use the `Start AI analysis` link to start the analysis.
You can launch the AI analysis modal using the button in the action bar at the top. Use the `Start AI neuron segmentation` button in the modal to start the analysis.

![Nuclei segmentations can be launched from the action bar.](images/process_dataset.jpeg)
![Neuron segmentations can be launched from the action bar.](images/process_dataset.jpg)

Computation time for this analysis depends directly on the size of your dataset.
Expect a few hours for medium-sized volumetric EM datasets.
The finished analysis will be available as a new dataset from your dashboard. You can monitor the status and progress of the [analysis job from the `Processing Jobs` section of the `Administration` menu at the top of the screen](./jobs.md).

![Starting a new nuclei segmentation.](images/nuclei_segmentation_start.jpeg)
![Monitor the nuclei segmentation progress from the Jobs page.](images/nuclei_segmentation_job.jpeg)
![Starting a new neuron segmentation.](images/neuron_segmentation_start.jpeg)
![Monitor the segmentation progress from the Jobs page.](images/nuclei_segmentation_job.jpeg)

## Custom Analysis
At the moment, WEBKNOSSOS can not be used to train a custom classifier itself. This might be something that we add in the future if there is enough interest in this.
Expand Down
Binary file added docs/images/neuron_segmentation_start.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/nuclei_segmentation_start.jpeg
Binary file not shown.
Binary file added docs/images/process_dataset.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions frontend/javascripts/oxalis/default_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,7 @@ const defaultState: OxalisState = {
showVersionRestore: false,
showDownloadModal: false,
showPythonClientModal: false,
showAINucleiSegmentationModal: false,
showAINeuronSegmentationModal: false,
aIJobModalState: "invisible",
showRenderAnimationModal: false,
showShareModal: false,
storedLayouts: {},
Expand Down
22 changes: 6 additions & 16 deletions frontend/javascripts/oxalis/model/actions/ui_actions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { AnnotationTool, Vector3 } from "oxalis/constants";
import type { OxalisState, BorderOpenStatus, Theme } from "oxalis/store";
import { StartAIJobModalState } from "oxalis/view/action-bar/starting_job_modals";

type SetDropzoneModalVisibilityAction = ReturnType<typeof setDropzoneModalVisibilityAction>;
type SetVersionRestoreVisibilityAction = ReturnType<typeof setVersionRestoreVisibilityAction>;
Expand All @@ -15,12 +16,7 @@ type SetDownloadModalVisibilityAction = ReturnType<typeof setDownloadModalVisibi
type SetShareModalVisibilityAction = ReturnType<typeof setShareModalVisibilityAction>;
type SetBusyBlockingInfoAction = ReturnType<typeof setBusyBlockingInfoAction>;
type SetPythonClientModalVisibilityAction = ReturnType<typeof setPythonClientModalVisibilityAction>;
type SetAINucleiSegmentationModalVisibilityAction = ReturnType<
typeof setAINucleiSegmentationModalVisibilityAction
>;
type SetAINeuronSegmentationModalVisibilityAction = ReturnType<
typeof setAINeuronSegmentationModalVisibilityAction
>;
type SetAIJobModalStateAction = ReturnType<typeof setAIJobModalStateAction>;
export type EnterAction = ReturnType<typeof enterAction>;
export type EscapeAction = ReturnType<typeof escapeAction>;
export type SetQuickSelectStateAction = ReturnType<typeof setQuickSelectStateAction>;
Expand All @@ -47,8 +43,7 @@ export type UiAction =
| SetDownloadModalVisibilityAction
| SetPythonClientModalVisibilityAction
| SetShareModalVisibilityAction
| SetAINucleiSegmentationModalVisibilityAction
| SetAINeuronSegmentationModalVisibilityAction
| SetAIJobModalStateAction
| SetRenderAnimationModalVisibilityAction
| SetBusyBlockingInfoAction
| EnterAction
Expand Down Expand Up @@ -119,15 +114,10 @@ export const setShareModalVisibilityAction = (visible: boolean) =>
type: "SET_SHARE_MODAL_VISIBILITY",
visible,
} as const);
export const setAINucleiSegmentationModalVisibilityAction = (visible: boolean) =>
export const setAIJobModalStateAction = (state: StartAIJobModalState) =>
({
type: "SET_AI_NUCLEI_SEGMENTATION_MODAL_VISIBILITY",
visible,
} as const);
export const setAINeuronSegmentationModalVisibilityAction = (visible: boolean) =>
({
type: "SET_AI_NEURON_SEGMENTATION_MODAL_VISIBILITY",
visible,
type: "SET_AI_JOB_MODAL_STATE",
state,
} as const);
export const setRenderAnimationModalVisibilityAction = (visible: boolean) =>
({
Expand Down
10 changes: 2 additions & 8 deletions frontend/javascripts/oxalis/model/reducers/ui_reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,9 @@ function UiReducer(state: OxalisState, action: Action): OxalisState {
});
}

case "SET_AI_NUCLEI_SEGMENTATION_MODAL_VISIBILITY": {
case "SET_AI_JOB_MODAL_STATE": {
return updateKey(state, "uiInformation", {
showAINucleiSegmentationModal: action.visible,
});
}

case "SET_AI_NEURON_SEGMENTATION_MODAL_VISIBILITY": {
return updateKey(state, "uiInformation", {
showAINeuronSegmentationModal: action.visible,
aIJobModalState: action.state,
});
}

Expand Down
4 changes: 2 additions & 2 deletions frontend/javascripts/oxalis/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ import reduceReducers from "oxalis/model/helpers/reduce_reducers";
import ConnectomeReducer from "oxalis/model/reducers/connectome_reducer";
import { SaveQueueType } from "./model/actions/save_actions";
import OrganizationReducer from "./model/reducers/organization_reducer";
import { StartAIJobModalState } from "./view/action-bar/starting_job_modals";

export type MutableCommentType = {
content: string;
Expand Down Expand Up @@ -511,8 +512,7 @@ type UiInformation = {
readonly showDownloadModal: boolean;
readonly showPythonClientModal: boolean;
readonly showShareModal: boolean;
readonly showAINucleiSegmentationModal: boolean;
readonly showAINeuronSegmentationModal: boolean;
readonly aIJobModalState: StartAIJobModalState;
readonly showRenderAnimationModal: boolean;
readonly activeTool: AnnotationTool;
readonly storedLayouts: Record<string, any>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
getLayerByName,
is2dDataset,
} from "oxalis/model/accessors/dataset_accessor";
import { BoundingBoxSelection, LayerSelection } from "../right-border-tabs/starting_job_modals";
import {
computeBoundingBoxFromBoundingBoxObject,
computeBoundingBoxObjectFromBoundingBox,
Expand All @@ -34,6 +33,7 @@ import {
import { BoundingBoxType, Vector3 } from "oxalis/constants";
import BoundingBox from "oxalis/model/bucket_data_handling/bounding_box";
import { Model } from "oxalis/singletons";
import { BoundingBoxSelection, LayerSelection } from "./starting_job_modals";

type Props = {
isOpen: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
BoundingBoxSelection,
getReadableNameOfVolumeLayer,
MagSlider,
} from "oxalis/view/right-border-tabs/starting_job_modals";
} from "oxalis/view/action-bar/starting_job_modals";
import { getUserBoundingBoxesFromState } from "oxalis/model/accessors/tracing_accessor";
import {
getVolumeTracingById,
Expand Down
Loading