Lee-Gihun / MEDIAR

(NeurIPS 2022 CellSeg Challenge - 1st Winner) Open source code for "MEDIAR: Harmony of Data-Centric and Model-Centric for Multi-Modality Microscopy"
MIT License
137 stars 30 forks source link

What is "classes" parameter in config? #5

Closed mese79 closed 1 year ago

mese79 commented 1 year ago

Hi
What does "classes" parameter in configs do? Is it about label classes like cell, background, and ?! classes in config

Lee-Gihun commented 1 year ago

classes config is the model-specific config. It decides the number of final output neurons of the fully-connected layer.

As cell segmentation is binary problem (0:bgd, 1:cell), we either use 1 or 2 neurons. We used a single neuron for the segmentation.

In the config file, you can see we set 3 for the classes. Here, the other two dimensions each stand for x-axis and y-axis gradient field. They predicts the relative position w.r.t. center of the cell center (median of h,w).

Lee-Gihun commented 1 year ago

Although we also mentioned in our paper as "Gradient Tracking" Sections, the act of how this tracking works is explained in more details at the CellPose paper. The gradient tracking parts in our code is a refactored version of their official code.