-
Notifications
You must be signed in to change notification settings - Fork 58
-
Hi, I am working with the 6-cell_counting notebook for an assignment to count microalgae cells in microscopy images. The image input data is in 16bit greyscale format while the masks are in RGB format (black and red). However, the final predictions and deeptrack's count of my cells in the masks and the predictions give totally wrong values. The counting problem is in the lines np.ceil(np.sum(prediction[:, :, 0]) / NORM_FACTOR) and np.ceil(np.sum(mask[:, :, 0]) / NORM_FACTOR) because it tells me that it counts like 160 cells out of 16000 and in my average masks there are about 8. I thought that it could be because of NORM_FACTOR that I don't understand well if it is the average number of pixels of the region of interest (Cell). I would be very grateful if someone could help me with this problem and I could get a good result with my masks.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 5 replies
-
Yes! The idea of the cell counting example is that the sum of the pixels in the image should sum to the number of objects in the image. However, this would typically result in individual pixels in the range of 0-0.001, which is not optimal for a network. Therefore, we multiply it by NORM_FACTOR, which is 1000, to get reasonable pixel values. Then we need to divide that away again to get the correct count. Since you're off by about 1000, it seems likely that the norm factor is the culprit here.
Beta Was this translation helpful? Give feedback.
All reactions
-
Thank you! And it is normal that in each run of the training the results of predictions changes???
Beta Was this translation helpful? Give feedback.
All reactions
-
Some variation is expected for sure. If the variations are large and you are working with simulated data, then it may be a symptom of the synthetic data not being representative enough of the experimental data.
Beta Was this translation helpful? Give feedback.
All reactions
-
Thank you! I have another question related to the previous one. ¿How can the segmentation model count cells from segmented images? ¿By counting color fill pixels?
Beta Was this translation helpful? Give feedback.
All reactions
-
It varies. The simplest and most common way is by using something like skimage.measure.label(mask) to find connected regions of foreground pixels.
Beta Was this translation helpful? Give feedback.
All reactions
-
Okey, thank youu!!! I have another question of the code, why in 6-cell_counting notebook it uses dt.Ellipsoidal but you refers to the creation of ellipses?
Beta Was this translation helpful? Give feedback.