Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Information about 6-cell_counting notebook #182

Unanswered
carmenrt asked this question in Q&A
Discussion options

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.

You must be logged in to vote

Replies: 1 comment 5 replies

Comment options

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.

You must be logged in to vote
5 replies
Comment options

Thank you! And it is normal that in each run of the training the results of predictions changes???

Comment options

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.

Comment options

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?

Comment options

It varies. The simplest and most common way is by using something like skimage.measure.label(mask) to find connected regions of foreground pixels.

Comment options

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /