Closed HaoranYueRyan closed 1 year ago
Hi @HaoranYueRyan - this looks like an issue with your segmentation. btrack
is working as expected. I would suggest you perform a watershed segmentation, to separate the nuclei, before you run the tracking:
https://scikit-image.org/docs/stable/auto_examples/segmentation/plot_watershed.html
Hi @quantumjot Thanks for your promet respone. l appreciate your insight on segmentation and l'd like to provide more information to clarify my suitation.
I utilized Cellpose for the segmentation, which generall produces separeated masks for individual nuclei. However, as shown in the images below, there are still a few cases where slight overlaps occur between nuclei in the original images, leading to connect regions in the segmenated mask These connected regions are then input into btrack as binary masks: Subsequently, in btrack, they are assigned the same ID:
Considering that the overlap in the segmented masks is relatively minor, would it's still necessary to apply watershed segmentation, or are there any btrack parameters adjustments that can handle such slight overlaps ?
Additionally, would you recommend providing btrack with the original multi-colored segmented masks (labeled mask) from Cellpose instead of the binary masks to improve tracking?
I would greatly appreciate any guidance you can offer on managing these minor overlaps and attaining more accurate tracking results with btrack.
Thank you!
Ah -- OK! That clarifies things a lot, thanks. You should just be able to pass the cellpose output (labeled mask; with the unique labels) directly to btrack.
Hi @quantumjot
Thank you for providing the guidance on this issue. Your method was indeed helpful!
Great! I will convert this issue to a discussion so that others can see the solution, even if the issue gets closed.
Hi author,
Thank you for providing the amazing tracking algorithms. I was trying to run btrack with my image data (1080, 1024, 1024) and encountered an issue where cells slightly overlap, causing btrack to assign them the same ID. Subsequently, when cells move to different areas, their IDs change to different ones.
For example, ID 1 overlaps with ID 7, they are assigned the same ID, and then ID 1 becomes ID 126.
To address this issue, I tried adjusting the maximum search radius from 50 to 25 and 16, and also used more features in the feature list:
tracker.features=["area", "perimeter", "solidity", "major_axis_length", "minor_axis_length", "orientation", 'intensity_max', 'intensity_mean', 'intensity_min'] Additionally, I doubled the values of lambda_dist, lambda_time, theta_dist, and theta_time in the hypothesis parameters.
If you have any suggestions on how to resolve this error, please let me know.