Skip to content

Commit

Permalink
add new tensorflow model, apply PR feedback #1
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-wer committed Apr 8, 2019
1 parent 6d706d1 commit 7dcae93
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/keyboard_shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Find all available keyboard shortcuts for webKnossos listed below.
| Key Binding | Operation |
| ----------------------------- | ------------------------------------------- |
| Left Mouse Drag or Arrow Keys | Move |
| Alt + Mouse Move | Move |
| SPACE | Move Forward by a Single Slice |
| Scroll Mousewheel (3D View) | Zoom In And Out |
| Right Click Drag (3D View) | Rotate 3D View |
Expand Down Expand Up @@ -78,6 +79,7 @@ Find all available keyboard shortcuts for webKnossos listed below.
| CTRL + Left Mouse Drag | Add Empty Voxels To Current Cell (in Trace / Brush Mode) |
| Right Mouse Drag | Remove Voxels From Current Cell |
| CTRL + Right Mouse Drag | Remove Voxels From Any Cell |
| Alt + Mouse Move | Move |
| C | Create New Cell |
| W, 1 | Toggle Modes (Move / Trace / Brush) |
| SHIFT + Mousewheel or SHIFT + I, O | Change Brush Size (Brush Mode) |
Expand Down
8 changes: 8 additions & 0 deletions frontend/javascripts/admin/help/keyboardshortcut_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ const KeyboardShortcutView = () => {
keybinding: "Left Mouse Drag or Arrow Keys",
action: "Move",
},
{
keybinding: "Alt + Mouse Move",
action: "Move",
},
{
keybinding: "I, O, or Alt + Mousewheel",
action: "Zoom In/out",
Expand Down Expand Up @@ -211,6 +215,10 @@ const KeyboardShortcutView = () => {
keybinding: "Ctrl + Right Mouse Drag",
action: "Remove Voxels From Any Cell",
},
{
keybinding: "Alt + Mouse Move",
action: "Move",
},
{
keybinding: "C",
action: "Create New Cell",
Expand Down
8 changes: 6 additions & 2 deletions frontend/javascripts/oxalis/model/sagas/volumetracing_saga.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import mainThreadPredict from "oxalis/workers/tensorflow.impl";
import ThreeDMap from "libs/ThreeDMap";

// Will remove model validation, NaN checks, and other correctness checks in favor of performance
// tf.enableProdMode();
if (process.env.NODE_ENV === "production") tf.enableProdMode();

const workerPredict = createWorker(TensorFlowWorker);

Expand Down Expand Up @@ -298,8 +298,12 @@ function* inferSegmentInViewport(action: InferSegmentationInViewportAction): Sag
Toast.info(toastDescription, toastConfig);

const colorLayers = yield* call([Model, Model.getColorLayers]);
// TODO: Which color layer to pick?
const colorLayer = colorLayers[0];
if (colorLayers.length > 1) {
Toast.warning(
`There are multiple color layers. Using ${colorLayer.name} for automatic segmentation.`,
);
}
const [halfViewportExtentX, halfViewportExtentY] = yield* call(
getHalfViewportExtents,
activeViewport,
Expand Down
Binary file modified public/tf-models/group1-shard1of1
Binary file not shown.

0 comments on commit 7dcae93

Please sign in to comment.