Reproducing baseline

Reproducing baseline  

  By: vj2212 on Nov. 24, 2024, 8:34 p.m.

Hi organizers, I've been working with the baseline implementation and noticed some potential discrepancies between the code in algorithm-tutorial/2_training.ipynb and the baseline model described in the webinar (the one that achieved ~0.2 FROC score). The main issues I spotted in the tutorial code are:

The ROI heads num_classes is set to 1, which seems odd for a two-class detection problem (lymphocytes and monocytes) The data loader doesn't seem to include monocyte labels in its configuration

Could you please confirm if this tutorial code matches what was used to achieve the baseline results? If not, would it be possible to share the correct hyperparameters used for the baseline model? This would really help ensure we're all working from the same reference point. Thanks in advance for any clarification!

Re: Reproducing baseline  

  By: FazaelAyatollahi on Nov. 27, 2024, 8:26 a.m.

Hi

As you mentioned the training notebook is only consider lymphocytes and evaluates it as 1 class detection.

For baseline method, I converted both lymphocytes and monocytes annotations in one class (inf_cell) and evaluated them. so it is also one class detection and not really discriminate between lymphocytes and monocytes.

But you have the flexibility by using "whole slide data" to configure your data as you like. for example I believe the following config file works for 2 classes

'''

  user_config = {
      'wholeslidedata': {
          'default': {
              'yaml_source': "./configs/training_sample_all.yml",
              "seed": 42,
              "image_backend": "asap",
              'labels': {
                  "ROI": 0,
                  "lymphocytes": 1,
                  "monocytes": 2
              },

              'batch_shape': {
                  'batch_size': 10,
                  'spacing': 0.5,
                  'shape': [128, 128, 3],
                  'y_shape': [1000, 6],
              },

              "annotation_parser": {
                  "sample_label_names": ['roi'],
              },

              'point_sampler_name': "RandomPointSampler",
              'point_sampler': {
                  "buffer": {'spacing': "${batch_shape.spacing}", 'value': -64},
              },

              'patch_label_sampler_name': 'DetectionPatchLabelSampler',
              'patch_label_sampler': {
                  "max_number_objects": 1000,
                  "detection_labels": ['lymphocytes','monocytes'],

              },

          }
      }
  }

'''
if you want to use one class detection you can map lymphocyte and monocyte to the same label