Skip to content

Commit

Permalink
Correct minor error in SSL using mae and inferring
Browse files Browse the repository at this point in the history
  • Loading branch information
danifranco committed Feb 26, 2024
1 parent da89c67 commit 942b3ad
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 19 deletions.
2 changes: 1 addition & 1 deletion biapy/engine/self_supervised.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def process_sample(self, norm):
if self.cfg.PROBLEM.SELF_SUPERVISED.PRETEXT_TASK == "masking":
loss, p, mask = p
p = self.apply_model_activations(p)
p, m, pv = self.model.save_images(to_pytorch_format(self._X[k*self.cfg.TRAIN.BATCH_SIZE:top], self.axis_order, self.device),
p, m, pv = self.model_without_ddp.save_images(to_pytorch_format(self._X[k*self.cfg.TRAIN.BATCH_SIZE:top], self.axis_order, self.device),
p, mask, self.dtype)
else:
p = self.apply_model_activations(p)
Expand Down
3 changes: 2 additions & 1 deletion templates/classification/2d_classification.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SYSTEM:
NUM_WORKERS: -1
NUM_CPUS: -1
NUM_WORKERS: 5

PROBLEM:
TYPE: CLASSIFICATION
Expand Down
3 changes: 2 additions & 1 deletion templates/classification/2d_classification_rgb.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SYSTEM:
NUM_WORKERS: -1
NUM_CPUS: -1
NUM_WORKERS: 5

PROBLEM:
TYPE: CLASSIFICATION
Expand Down
3 changes: 2 additions & 1 deletion templates/classification/3d_classification.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SYSTEM:
NUM_WORKERS: -1
NUM_CPUS: -1
NUM_WORKERS: 5

PROBLEM:
TYPE: CLASSIFICATION
Expand Down
3 changes: 2 additions & 1 deletion templates/denoising/2d_denoising.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# We try to mimic here N2Void project parameters
SYSTEM:
NUM_WORKERS: -1
NUM_CPUS: -1
NUM_WORKERS: 5

PROBLEM:
TYPE: DENOISING
Expand Down
3 changes: 2 additions & 1 deletion templates/denoising/3d_denoising.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# We try to mimic here N2Void project parameters

SYSTEM:
NUM_WORKERS: -1
NUM_CPUS: -1
NUM_WORKERS: 5

PROBLEM:
TYPE: DENOISING
Expand Down
3 changes: 2 additions & 1 deletion templates/detection/2d_detection.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SYSTEM:
NUM_WORKERS: -1
NUM_CPUS: -1
NUM_WORKERS: 5

PROBLEM:
TYPE: DETECTION
Expand Down
3 changes: 2 additions & 1 deletion templates/detection/3d_detection.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SYSTEM:
NUM_WORKERS: -1
NUM_CPUS: -1
NUM_WORKERS: 5

PROBLEM:
TYPE: DETECTION
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SYSTEM:
NUM_WORKERS: -1
NUM_CPUS: -1
NUM_WORKERS: 5

PROBLEM:
TYPE: INSTANCE_SEG
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SYSTEM:
NUM_WORKERS: -1
NUM_CPUS: -1
NUM_WORKERS: 5

PROBLEM:
TYPE: INSTANCE_SEG
Expand Down
3 changes: 2 additions & 1 deletion templates/instance_segmentation/MitoEM_paper/mitoem.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SYSTEM:
NUM_WORKERS: -1
NUM_CPUS: -1
NUM_WORKERS: 5

PROBLEM:
TYPE: INSTANCE_SEG
Expand Down
3 changes: 2 additions & 1 deletion templates/self-supervised/2d_self-supervised.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SYSTEM:
NUM_WORKERS: -1
NUM_CPUS: -1
NUM_WORKERS: 5

PROBLEM:
TYPE: SELF_SUPERVISED
Expand Down
3 changes: 2 additions & 1 deletion templates/self-supervised/3d_self-supervised.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SYSTEM:
NUM_WORKERS: -1
NUM_CPUS: -1
NUM_WORKERS: 5

PROBLEM:
TYPE: SELF_SUPERVISED
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SYSTEM:
NUM_WORKERS: -1
NUM_CPUS: -1
NUM_WORKERS: 5

PROBLEM:
TYPE: SEMANTIC_SEG
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SYSTEM:
NUM_WORKERS: -1
NUM_CPUS: -1
NUM_WORKERS: 5

PROBLEM:
TYPE: SEMANTIC_SEG
Expand Down
3 changes: 2 additions & 1 deletion templates/super-resolution/2d_super-resolution.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SYSTEM:
NUM_WORKERS: -1
NUM_CPUS: -1
NUM_WORKERS: 5

PROBLEM:
TYPE: SUPER_RESOLUTION
Expand Down
3 changes: 2 additions & 1 deletion templates/super-resolution/2d_super-resolution_rgb.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SYSTEM:
NUM_WORKERS: -1
NUM_CPUS: -1
NUM_WORKERS: 5

PROBLEM:
TYPE: SUPER_RESOLUTION
Expand Down
5 changes: 3 additions & 2 deletions templates/super-resolution/3d_super-resolution.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
SYSTEM:
NUM_WORKERS: -1

NUM_CPUS: -1
NUM_WORKERS: 5

PROBLEM:
TYPE: SUPER_RESOLUTION
NDIM: 3D
Expand Down

0 comments on commit 942b3ad

Please sign in to comment.