
To obtain the projection phase information of the sperm, we used a self-designed optical tweezers system as shown in Fig. Our experiments analyzed the difference in rotational angular speed of sperm cells at different laser output power and verified that our method has potential applications in clinical research for sperm motility quantification and single sperm motility detection. This method is also suitable with other ellipsoidal-like cells or bacteria like Escherichia coli. We combine it with optical tweezers to dynamically trap sperms and analyze the rotational motility of individual sperm directly and simultaneously. In this study, we propose highly efficient method that extracting the orientation of the sperm head using deep learning-based segmentation. And compared with traditional methods, it has superior segmentation performance and robustness 16, 17.This tool can also be combined with optical tweezers and applied to axial localization of microspheres 18, optical force prediction of the optical tweezers 19, and trap stiffness measurement 20. Besides, for more complex motion patterns of sperm, such as rotation, the additional optical set-up should be designed, and corresponding algorithms to determine the three-dimensional motion of the sperm usually perform relatively slowly 12.ĭeep learning has been widely applied in the field of medical cell image segmentation, especially for particular cell counting 13, liver and liver-tumor segmentation 14, brain and brain-tumor segmentation 15 etc. However, In the high numerical aperture objective lens field of view, traditional segmentation methods have poor segmentation results due to complex background noise. employed this method to calculate the curvilinear velocity(VCL) of the head to characterize sperm activity 11. Currently, the main method for quickly tracking the movement of the head of a sperm cell involves tracking its centroid, which uses traditional clustering algorithms to segment 9, 10. This research direction has potential value in the single-sperm quality examination, which is crucial to the assistant reproductive technologies like intracytoplasmic sperm injection (ICSI) 8. Extensive research has been conducted on the dynamics of sperm cells trapped in optical tweezers, encompassing studies investigating diverse aspects such as chirality and motility force 6, 7. In this process, sperm with low motility will be screened out by barriers such as cervical mucus 5. During the reproductive process, sperms need to meet the egg through the female reproductive tract. Therefore, to identify the best settings for our unique use case, it is always a good idea to experiment with alternative loss functions and hyper-parameters.Optical tweezers (OT) have been widely researched for trapping and manipulating micro-particles and microorganisms such as polystyrene beads, yeast cell, sperm and Escherichia coli 1, 2, 3, 4. While cross-entropy loss is a strong and useful tool for deep learning model training, it's crucial to remember that it is only one of many possible loss functions and might not be the ideal option for all tasks or datasets. To summarize, cross-entropy loss is a popular loss function in deep learning and is very effective for classification tasks. Line 24: Finally, we print the manually computed loss. Line 21: We compute the cross-entropy loss manually by taking the negative log of the softmax probabilities for the target class indices, averaging over all samples, and negating the result. Line 18: We also print the computed softmax probabilities. Line 15: We compute the softmax probabilities manually passing the input_data and dim=1 which means that the function will apply the softmax function along the second dimension of the input_data tensor. The labels argument is the true label for the corresponding input data. The input_data argument is the predicted output of the model, which could be the output of the final layer before applying a softmax activation function. Line 9: The TF.cross_entropy() function takes two arguments: input_data and labels. The tensor is of type LongTensor, which means that it contains integer values of 64-bit precision. Line 6: We create a tensor called labels using the PyTorch library. Line 5: We define some sample input data and labels with the input data having 4 samples and 10 classes. Line 2: We also import torch.nn.functional with an alias TF.
