Automated cancer cytology assessment using a segmentation model

A hierarchical loss function strategy for transformer and CNN-based models addresses the challenges of cytology image segmentation, improving precision and reliability in nuclear-to-cytoplasm ratio assessment for bladder cancer diagnosis.

WO2026236552A1PCT designated stage Publication Date: 2026-11-12HOLOGIC INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/US2026/027184
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-09
Filing Date
2026-05-07
Publication Date
2026-11-12

AI Technical Summary

Technical Problem

Current computer vision techniques for cytology image analysis, particularly in bladder cancer diagnosis, face challenges due to low color contrast, opacity similarity, and overlapping features, leading to inaccurate segmentation of cellular structures and unreliable diagnostic outcomes.

Method used

A hierarchical loss function strategy is employed to fine-tune transformer-based and convolutional neural network-based segmentation models, incorporating components like binary cross-entropy, Dice coefficient, boundary-aware, and instance-aware components to enhance the accuracy of nuclear and cytoplasm segmentation in cytology images.

Benefits of technology

The proposed methods significantly improve the precision and reliability of nuclear-to-cytoplasm ratio assessment, outperforming existing architectures by providing sharper nuclear delineation and reducing false positives, thus enhancing diagnostic accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US2026027184_12112026_PF_FP_ABST
    Figure US2026027184_12112026_PF_FP_ABST
Patent Text Reader

Abstract

Computer-implemented methods of training a transformer-based segmentation model or a convolutional neural network (CNN)-based segmentation model to accurately segment cytology images are provided. Training the transformer-based segmentation model involves a loss function that includes a boundary-aware component. Training the CNN-based segmentation model includes calculating a value of a multi-head loss function based on a predicted nuclear mask, a predicted boundary mask, a predicted estimated distance transform, and a predicted embedding. Computer-implemented methods of using the transformer-based segmentation model or the CNN-based segmentation model to segment cytology images for tasks such as determining a nuclear-to-cytoplasm ratio (N:C ratio) are also provided.
Need to check novelty before this filing date? Find Prior Art

Description

Docket No. 4451-P2WOAUTOMATED CANCER CYTOLOGY ASSESSMENT USING A SEGMENTATION MODELCROSS-REFERENCE(S) TO RELATED APPLICATION(S)

[0001] This application claims the benefit of Provisional Application No. 64 / 000873, filed March 9, 2026, and Provisional Application No. 63 / 803469, filed May 9, 2025, the entire disclosures of which are hereby incorporated by reference herein for all purposes.BACKGROUND

[0002] Cytology is the process of examining samples of cells to determine diagnoses of various conditions. As a non-limiting example, cytology techniques may be used to examine samples to detect various types of cancer. In some cases, features of otherwise normal cells, such as relative sizes of the nucleus and cytoplasm, may be examined in order to determine the presence or absence of cancer.

[0003] It is desired to automate the analysis of cell samples through the use of computer vision techniques. While such techniques have been attempted, it is often the case that the accuracy of results are not sufficient to be the basis of reliable diagnoses. One cause for the lack of accuracy is the nature of the imagery collected: low color contrast, similarity in opacity, and overlapping features can cause traditional computer vision techniques to produce poor results for processing cytology images.

[0004] One non-limiting example where these problems are particularly acute are in the processing of cytology images for bladder cancer. Nuclei segmentation is used to identify image pixels that depict cell nuclei, in order to determine a nuclear-to-cytoplasmic (N: C) ratio assessment under The Paris System (TPS). The N: C ratio indicates a proportion of a cell's nucleus compared to its cytoplasm, which is significantly different in cancer cells compared to normal cells. Current methods face significant difficulties in reliably determining the boundaries of cellular sub-structures, such as the nuclei and / or the cytoplasm, and perform particularly poorly when there is significant cellular overlap.Staining variability and complex morphology can further contribute to segmentation inaccuracies. These factors negatively impact the diagnostic reliability of existing methods when applied to the task of urothelial carcinoma classification.

[0005] What is desired are computer vision techniques that provide improved performance for the analysis of cytology images.SUMMARYDocket No. 4451-P2WO

[0006] This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This summary is not intended to identify key features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.

[0007] In some embodiments, a computer-implemented method of training a transformerbased segmentation model to accurately segment cytology images is provided. A computing system obtains a plurality of training examples. Each training example includes a cytology image and a ground truth nuclear mask. For each training example of the plurality of training examples, the computing system provides the cytology image of the training example as input to the transformer-based segmentation model to generate one or more predicted nuclear masks, and calculates a value of a loss function based on the one or more predicted nuclear masks and the ground truth nuclear mask of the training example.Calculating the value of the loss function includes calculating a value of a boundary- aware component. The computing system updates the transformer-based segmentation model based on the values of the loss function for the plurality of training examples, and stores the updated transformer-based segmentation model.

[0008] In some embodiments, another computer-implemented method is provided. A computing system receives a cytology image. The computing system executes a transformer-based segmentation model to accept the cytology image as input and to generate a plurality of predicted nuclear masks and a corresponding plurality of confidence scores as output. The computing system selects a predicted nuclear mask from the plurality of predicted nuclear masks based on the confidence scores, and determines a nuclear to cytoplasm ratio (N: C ratio) based on the selected predicted nuclear mask.

[0009] In some embodiments, a computer-implemented method of training a convolutional neural network-based segmentation model (CNN-based segmentation model) to accurately segment cytology images is provided. A computing system obtains a plurality of training examples. Each training example includes a cytology image and a ground truth nuclear mask. For each training example of the plurality of training examples, the computing system provides the cytology image of the training example as input to the CNN-based segmentation model to generate a predicted nuclear mask, a predicted boundary mask, a predicted estimated distance transform, and a predicted embedding; and calculates a value of a multi-head loss function based on the predicted nuclear mask, the predicted boundary mask, the predicted estimated distance transform, the predicted embedding, and the training example. The computing system updates the CNN-based segmentation model based on theDocket No. 4451-P2WOvalues of the loss function for the plurality of training examples, and stores the updated CNN-based segmentation model.

[0010] In some embodiments, another computer-implemented method is provided. A computing system receives a cytology image and executes a convolutional neural networkbased segmentation model (CNN-based segmentation model) to accept the cytology image as input and to generate at least a predicted nuclear mask as output. The computing system determines a nuclear to cytoplasm ratio (N: C ratio) based on the selected predicted nuclear mask.

[0011] In some embodiments, a non-transitory computer-readable medium having computer-executable instructions stored thereon is provided. The instructions, in response to execution by one or more processors of a computing system, cause the computing system to perform actions of any one of the methods described above. In some embodiments, a computing system configured to perform actions of any one of the methods described above is provided.BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The foregoing aspects and many of the attendant advantages of this invention will become more readily appreciated as the same become better understood by reference to the following detailed description, when taken in conjunction with the accompanying drawings, wherein:

[0013] FIG. 1 is a schematic illustration of a cytology process according to various aspects of the present disclosure.

[0014] FIG. 2 is a block diagram that illustrates aspects of a non-limiting example embodiment of an image processing computing system according to various aspects of the present disclosure.

[0015] FIG. 3 is a flowchart that illustrates a non-limiting example embodiment of a method of training a transformer-based segmentation model to segment cytology images, according to various aspects of the present disclosure.

[0016] FIG. 4 is a schematic illustration of loss functions usable by the method of FIG. 3 to train a transformer-based segmentation model, according to various aspects of the present disclosure.

[0017] FIG. 5 is a flowchart that illustrates a non-limiting example embodiment of a method of using a transformer-based segmentation model to automatically evaluate a cytology image, according to various aspects of the present disclosureDocket No. 4451-P2WO

[0018] FIG. 6 is a flowchart that illustrates a non-limiting example embodiment of a method of training a convolutional neural network-based segmentation model (CNN-based segmentation model) to segment cytology images, according to various aspects of the present disclosure.

[0019] FIG. 4 is a schematic illustration of a loss function usable by the method of FIG. 6 to train a CNN-based segmentation model, according to various aspects of the present disclosure.

[0020] FIG. 8 is a flowchart that illustrates a non-limiting example embodiment of a method of using a CNN-based segmentation model to automatically evaluate a cytology image, according to various aspects of the present disclosure.DETAILED DESCRIPTION

[0021] In some embodiments of the present disclosure, a hierarchical loss function strategy with multiple components is used to address the unique challenges of segmentation of cellular images into nuclei, cytoplasm, and / or other cellular features. This improved loss function is used to tune a foundation segmentation model. The techniques described herein were determined to significantly outperform leading alternative architectures.

[0022] FIG. 1 is a schematic illustration of a cytology process according to various aspects of the present disclosure. A cytology process starts by obtaining a sample 104 from a subject 102. The sample 104 may be obtained using any one of a number of techniques, including but not limited to fine needle aspiration, brushing / scraping, or by obtaining a sample of body fluid such as urine, sputum, or other body fluids. For bladder cancer, the sample 104 may be a urine sample.

[0023] The sample 104 is then processed to prepare the sample 104 for imaging. In some embodiments of the process, the sample 104 may be manually mounted on a slide by a technician. In some embodiments, the sample 104 may be provided to an automated cytology preparation system 106. One non-limiting example of an automated cytology preparation system 106 is a ThinPrep® 5000 Processor with AutoLoader, from Hologic, Inc., though other automated cytology preparation systems 106 may be used in other embodiments.

[0024] Once the sample 104 is prepared for imaging, a cytology image of the sample 104 is then obtained. In some embodiments, the prepared sample 104 may be manually viewed using a microscope, and the cytology image may be captured by a technician. In some embodiments, the prepared sample 104 may be provided to an automated cytology imaging system 108 to capture the cytology image. One non-limiting example of an automatedDocket No. 4451-P2WOcytology imaging system 108 is a Genius™ Digital Diagnostics System, from Hologic, Inc., though other automated cytology imaging systems 108 may be used in other embodiments.

[0025] The cytology image is then provided to an image processing computing system 110. In some embodiments, the image processing computing system 110 may be incorporated into the cytology imaging system 108. In some embodiments, the image processing computing system 110 may be separate from the cytology imaging system 108. The image processing computing system 110, which is described in further detail below, is configured to process the cytology image to segment nuclei in the cytology image with a high degree of accuracy, and may also be configured to use the segmentation result to determine an N: C ratio and / or to provide an indication of a presence or an absence of a cancer based on the determined N: C ratio.

[0026] FIG. 2 is a block diagram that illustrates aspects of a non-limiting example embodiment of an image processing computing system according to various aspects of the present disclosure. The illustrated image processing computing system 110 may be implemented by any computing device or collection of computing devices, including but not limited to a desktop computing device, a laptop computing device, a mobile computing device, a server computing device, a computing device of a cloud computing system, and / or combinations thereof. As discussed above, in some embodiments at least some of the functionality of the image processing computing system 110 may be provided by the cytology imaging system 108. The image processing computing system 110 is configured to use computer vision techniques to segment cytology images, and to use the segmentations of the cytology images to automatically determine one or more metrics useful for medical diagnoses.

[0027] As shown, the image processing computing system 110 includes one or more processors 202, one or more communication interfaces 204, a model data store 208, a training data store 210, and a computer- readable medium 206.

[0028] In some embodiments, the processors 202 may include any suitable type of general-purpose computer processor. In some embodiments, the processors 202 may include one or more special-purpose computer processors or Al accelerators optimized for specific computing tasks, including but not limited to graphical processing units (GPUs), vision processing units (VPUs), and tensor processing units (TPUs).

[0029] In some embodiments, the communication interfaces 204 include one or more hardware and or software interfaces suitable for providing communication links between components. The communication interfaces 204 may support one or more wiredDocket No. 4451-P2WOcommunication technologies (including but not limited to Ethernet, FireWire, and USB), one or more wireless communication technologies (including but not limited to Wi-Fi, WiMAX, Bluetooth, 2G, 3G, 4G, 5G, and LTE), and / or combinations thereof.

[0030] As shown, the computer-readable medium 206 has stored thereon logic that, in response to execution by the one or more processors 202, cause the image processing computing system 110 to provide a model training engine 212, an image segmentation engine 214, and a cytology analysis engine 216.

[0031] As used herein, "computer-readable medium" refers to a removable or nonremovable device that implements any technology capable of storing information in a volatile or non-volatile manner to be read by a processor of a computing device, including but not limited to: a hard drive: a flash memory; a solid state drive; random-access memory (RAM); read-only memory (ROM); a CD-ROM, a DVD, or other disk storage; a magnetic cassette; a magnetic tape; and a magnetic disk storage.

[0032] In some embodiments, the model training engine 212 is configured to use training examples from the training data store 210 to train a segmentation model to segment specific structures within cytology images, and to store the trained segmentation model in the model data store 208. In some embodiments, the image segmentation engine 214 is configured to use a trained segmentation model from the model data store 208 to segment new cytology images. In some embodiments, the cytology analysis engine 216 is configured to process the segmented cytology images to determine at least one metric relevant to a medical diagnosis. Further description of the configuration of each of these components is provided below.

[0033] As used herein, "engine" refers to logic embodied in hardware or software instructions, which can be written in one or more programming languages, including but not limited to C, C++, C#, COBOL, JAVA™, PHP, Perl, HTML, CSS, JavaScript, VBScript, ASPX, Go, and Python. An engine may be compiled into executable programs or written in interpreted programming languages. Software engines may be callable from other engines or from themselves. Generally, the engines described herein refer to logical modules that can be merged with other engines, or can be divided into sub-engines. The engines can be implemented by logic stored in any type of computer-readable medium or computer storage device and be stored on and executed by one or more general purpose computers, thus creating a special purpose computer configured to provide the engine or the functionality thereof. The engines can be implemented by logic programmed into an application-specificDocket No. 4451-P2WOintegrated circuit (ASIC), a field-programmable gate array (FPGA), or another hardware device.

[0034] As used herein, "data store" refers to any suitable device configured to store data for access by a computing device. One example of a data store is a highly reliable, highspeed relational database management system (DBMS) executing on one or more computing devices and accessible over a high-speed network. Another example of a data store is a keyvalue store. However, any other suitable storage technique and / or device capable of quickly and reliably providing the stored data in response to queries may be used, and the computing device may be accessible locally instead of over a network, or may be provided as a cloud-based service. A data store may also include data stored in an organized manner on a computer-readable storage medium, such as a hard disk drive, a flash memory, RAM, ROM, or any other type of computer-readable storage medium. One of ordinary skill in the art will recognize that separate data stores described herein may be combined into a single data store, and / or a single data store described herein may be separated into multiple data stores, without departing from the scope of the present disclosure.

[0035] FIG. 3 is a flowchart that illustrates a non-limiting example embodiment of a method of training a segmentation model to segment cytology images, according to various aspects of the present disclosure. In the method 300, the image processing computing system 110 uses training examples and a hierarchical loss function to fine tune a foundation segmentation model to be more effective in segmenting cellular structures within cytology images.

[0036] From a start block, the method 300 proceeds to block 302, where an image processing computing system 110 obtains a plurality of training examples, wherein each training example includes a cytology image and a ground truth nuclear mask. The ground truth nuclear mask includes information for each pixel of the cytology image indicating what structure is depicted in the pixel. For example, the ground truth nuclear mask may include information for each pixel indicating whether or not a nucleus is depicted in the pixel. In some embodiments, the ground truth nuclear mask may include multiple classes of information for the pixels. For example, the ground truth nuclear mask may indicate whether each pixel depicts a nucleus, cytoplasm, or background.

[0037] In some embodiments, the segmentation model may use point prompts as part of its fine tuning process to indicate regions that should be segmented. A point prompt is a point within the image that indicates to the transformer-based segmentation model a region to be segmented. Accordingly, at block 304, a model training engine 212 of the image processingDocket No. 4451-P2WOcomputing system 110 generates one or more point prompts for each training example. In some embodiments, one or more of the training examples may already include a point prompt, and the model training engine 212 may generate additional point prompts in order to automatically increase the number of training examples. The image processing computing system 110 may generate the point prompts using any suitable technique. In some embodiments, the image processing computing system 110 may randomly select points within the area indicated by the ground truth nuclear mask as being within a nucleus as a point prompt. In some embodiments, the image processing computing system 110 may erode the areas indicated by the ground truth nuclear mask as being within a nucleus, and then randomly select points within the eroded areas as point prompts in order to avoid randomly selecting points near a boundary. In some embodiments, the image processing computing system 110 may purposefully select points within a threshold distance of a centroid of the areas indicated by the ground truth nuclear mask as being within a nucleus to be used as point prompts. In some embodiments, the model training engine 212 may generate multiple point prompts for any given nucleus, such that more than one training example that include different point prompts for the visible nuclei a may be created for any given labeled cytology image, thus increasing the amount of available training data without requiring additional images to be captured or annotated.

[0038] At block 306, the model training engine 212 obtains a foundation transformer-based segmentation model. In some embodiments, the foundation transformer-based segmentation model may be obtained from a third party that has trained the foundation model for general tasks and made the foundation model available for fine tuning. Any suitable foundation model may be used. One non-limiting example of a suitable foundation transformer-based segmentation model is the Segment Anything Model 2 (or later versions), by Meta Platforms, Inc. In some embodiments, a different foundation transformer-based segmentation model may be obtained from a third-party. In some embodiments, a foundation transformer-based segmentation model may be trained from scratch.

[0039] The method 300 then proceeds through a continuation terminal ("terminal A") to a for- loop defined between for- loop start block 308 and for-loop end block 316. In the for-loop, each of the training examples is processed by the transformer-based segmentation model, and the performance of the transformer-based segmentation model is evaluated using a loss function.

[0040] Accordingly, from the for-loop start block 308, the method 300 proceeds to block 310, where the model training engine 212 provides at least the cytology image of the training example to the transformer-based segmentation model to generate one or moreDocket No. 4451-P2WOpredicted nuclear masks. Each predicted nuclear mask indicates, for each pixel of the cytology image, whether or not the pixel is within a representation of a nucleus. In some embodiments, the value for each pixel may be a real value between zero and one that represents a likelihood of the pixel being within a representation of a nucleus. In some embodiments, the transformer-based segmentation model may generate predicted nuclear masks that contain multiple values for each pixel to perform a multi-class segmentation. For example, a predicted nuclear mask may include a first value for each pixel indicating whether or not the pixel is within a representation of a nucleus, a second value for each pixel indicating whether or not the pixel is within a representation of cytoplasm, and / or a third value for each pixel indicating whether or not the pixel is within a representation of a background. These example classes should not be seen as limiting, and in some embodiments, more, fewer, or different classes may be used in a multi-class segmentation. In some embodiments, the output of the transformer-based segmentation model may also include an overall confidence score for the overall predicted nuclear mask. In some embodiments, multiple predicted nuclear masks may be generated separately using different parameters for the transformer-based segmentation model. In some embodiments, the transformer-based segmentation model may be configured to automatically generate multiple predicted nuclear masks for a given point prompt, with each predicted nuclear mask having a different confidence level.

[0041] The method 300 then proceeds to block 312, where the model training engine 212 calculates a value of a segmentation loss function based on the one or more predicted nuclear masks and the ground truth nuclear mask of the training example. The value of the segmentation loss function represents a difference between the one or more predicted nuclear masks and the ground truth nuclear mask.

[0042] FIG. 4 is a schematic illustration of a non-limiting example embodiment of loss functions that may be used by the model training engine 212 within the method 300, according to various aspects of the present disclosure. In some embodiments, a comprehensive segmentation loss function 402 may be used that combines at least a binary cross-entropy, a Dice coefficient, and a boundary- aware component to address the unique challenges of cytological nuclear segmentation.

[0043] In some embodiments, the binary cross-entropy 404 may be used to measure the accuracy of pixel-wise classification. This component of the comprehensive segmentation loss function 402 evaluates how well each pixel is classified as either nucleus or background. It has been found that this term is particularly effective for handling the imbalance between nuclear and non-nuclear regions in cytology images. The binary cross-Docket No. 4451-P2WOentropy 404 evaluates each pixel individually, calculating how confident and accurate the transformer-based segmentation model is in its classification of each pixel. When a pixel is labeled in the ground truth nuclear mask as being a nuclear pixel but is predicted otherwise by the transformer-based segmentation model, the binary cross-entropy 404 increases substantially, guiding the model toward better pixel-level decisions.

[0044] In some embodiments, the loss contribution from binary cross-entropy 404 (LBCE) may be defined as:yjlog (1 - y)

[0045] In other words, for each pixel, the binary cross-entropy 404 compares what the transformer-based segmentation model predicted (yi, a probability between zero and one) with the ground truth nuclear mask (yf, either zero or one). The closer the predicted values are to the ground truth nuclear mask, the lower the loss contribution from binary crossentropy 404.

[0046] In some embodiments, the Dice coefficient 406 measures how well two shapes overlap. This can be particularly useful for segmentation tasks because it considers the spatial relationship between pixels. In some embodiments, the loss contribution from the Dice coefficient 406 LDice) may be defined as:

[0047] This formula compares the area of overlap between the predicted nuclear mask (T) and the ground truth nuclear mask (T), divided by the sum of their areas. A perfect overlap would result in a Dice coefficient 406 of one, and a loss contribution from the Dice coefficient 406 of zero.

[0048] In some embodiments, the boundary-aware component 408 may be used to improve the precision of the detection of nuclear boundaries. Detecting the exact edges of nuclei is a particular technical challenge in cytology images, due to gradual intensity transitions and touching nuclei. In some embodiments, the boundary-aware component 408 may use morphological operations to generate boundary maps that highlight the borders of nuclei in the ground truth nuclear mask, and classification error within these border areas may beDocket No. 4451-P2WOpenalized more by the boundary-aware component 408 than central regions. This targeted approach helps establish sharper, more accurate nuclear delineation.

[0049] In some embodiments, the boundary-aware component 408 may create boundary maps by applying morphological operations to the ground truth nuclear mask with a five-pixel kernel (or a kernel of another suitable size) in order to detect the boundary region around the nuclei. A heightened importance (e.g., three times as much weight) may then be applied to errors within the boundary region compared to central regions. In some embodiments, the loss contribution from the boundary-aware component 408 (LBoundary) may be formulated as:

[0050] In this equation, B indicates the set of pixels of the boundary region, Nbis the total number of pixels within the boundary region, andis the weight assigned to each pixel, with the weight for pixels within the boundary region being higher than the weight for pixels outside of the boundary region. In some embodiments, the weight for pixels within the boundary region may be three times higher than the weight for pixels outside of the boundary region. This weighted approach forces the training of the transformer-based segmentation model to give greater weight to errors within the boundary regions.

[0051] Once the binary cross-entropy 404, the Dice coefficient 406, and the boundary-aware component 408 have been determined, the values may be combined to contribute to the comprehensive segmentation loss function 402 as follows:

[0052] In this equation, wBCE, wDice, and wBoundaryare weights to be applied to the loss contribution for the binary cross-entropy 404, Dice coefficient 406, and boundary-aware component 408, respectively. Any suitable weights may be used. In some embodiments, the value for wBCEmay be 0.3, the value for wDicemay be 0.4, and the value for wBoundarymay be 0.3, but in other embodiments, other weights may be used for these values.

[0053] In some embodiments, additional terms may also contribute to the comprehensive segmentation loss function 402. For example, in some embodiments, an instance-aware component 410 may be used to address the difficult technical challenge in nuclear segmentation of distinguishing between adjacent nuclei, which often appear as a singleDocket No. 4451-P2WOentity in cytology images. The instance-aware component 410 may be configured to specifically identify regions where nuclei are likely to touch or overlap, and to help train the transformer-based segmentation model to predict these pixels as not being part of a nucleus, thus creating separation between adjacent nuclei.

[0054] In order to identify potential inter-nuclear regions, the instance-aware component 410 may dilate the ground truth nuclear mask (expanding the regions identified in the ground truth nuclear mask outward), and may identify regions where dilated shapes within the ground truth nuclear mask overlap each other as potential inter-nuclear regions. The instance-aware component 410 may then apply a weighted penalty (for example, a 0.5x weighted penalty) for false positives in these regions in order to teach the transformer-based segmentation model to be cautious about merging adjacent nuclei. This technique has been shown to be highly effective in preventing fusion errors in dense cellular clusters where traditional segmentation techniques often fail.

[0055] The loss contribution of the instance-aware component 410 may be expressed as:

[0056] In this equation, Rinterrepresents the set of pixels in the inter-nuclear regions, Ninteris the number of such pixels, and winstis a weighting factor for the instanceloss component. The transformer-based segmentation model may thus be trained to predict these pixels as not being nuclei rather than being part of a nucleus, creating separation between adjacent nuclei.

[0057] In some embodiments, still further enhancements may be made to the comprehensive segmentation loss function 402 in order to further improve performance. As non-limiting examples, one or more of a size constraint component 412 or a Lovasz hinge component 414 may be used.

[0058] In some embodiments, the size constraint component 412 may be used to penalize predicted nuclear regions that are biologically implausible in size. In cytological specimens, nuclei have a relatively consistent size range, and this constraint helps leverage that biological knowledge. This can help prevent both noise-induced small detections and over-merged large regions from being detected. For one non-limiting example of a typical magnification level, the size constraint component 412 may penalize predicted nuclear regions that have fewer than 10 pixels or greater than 500 pixels, though in other examples and at other magnification levels, other thresholds of biological plausibility may be used. InDocket No. 4451-P2WOsome embodiments, the size constraint component 412 may be applied during training as a conditional function:

[0059] In this function, A represents the area of the predicted nuclear mask in pixels, while Atand Ahare suitably determined thresholds. Essentially, this penalizes any area detected as a nucleus that is too small or too large based on biological expectations.

[0060] In some embodiments, the Lovasz hinge component 414 may be used to directly optimize the Intersection over Union (loU) metric, which is a standard evaluation metric for segmentation tasks. By optimizing directly for loU using the Lovasz hinge component 414 rather than using proxy metrics, the transformer-based segmentation model can achieve better performance on the target evaluation criteria.

[0061] As discussed above, the transformer-based segmentation model may output a predicted nuclear mask as well as a confidence score. In some embodiments, the model training engine 212 may use a confidence score loss function 416 in order to train the transformer-based segmentation model to output accurate confidence scores. Through LI loss between predicted confidence scores and measured loU values, the transformer-based segmentation model may be trained to accurately estimate its own performance on each nuclear detection. This self-assessment capability may be useful in clinical applications, as it allows the system to flag uncertain detections for human review. In some embodiments, the confidence score loss function 416 may be represented as:

[0062] Any suitable weight (wcon) may be used, including but not limited to a weight of 0.05. This confidence score loss function 416 encourages the confidence scores generated by the transformer-based segmentation model (Spred) to match the actual IoU between its predicted nuclear mask and the ground truth nuclear mask. In practical terms, this means that when the transformer-based segmentation model gives a high confidence score to a predicted nuclear mask, it is likely to be accurate, and when the transformer-based segmentation model gives a low confidence score to a predicted nuclear mask, human verification may be recommended.Docket No. 4451-P2WO

[0063] Returning to FIG. 3, once the value of the loss function has been calculated, the method 300 proceeds to the for-loop end block 316. If further training examples remain to be processed, then the method 300 returns to for-loop start block 308 to process the next training example. Otherwise, if all of the training examples have been processed, then the method 300 advances from the for-loop end block 316 to block 318.

[0064] At block 318, the model training engine 212 updates the transformer-based segmentation model based on the values of the loss function. Any suitable technique may be used to update the transformer-based segmentation model based on the values of the loss function. For example, a gradient of the loss function may be determined based on the values, and the transformer-based segmentation model may be updated based on the gradient. Overall, the prediction-update loop described above may be implemented using any suitable framework. As a non-limiting example, AdamW optimization with a learning rate of 5e-5 may be used, combined with cosine annealing with warm restarts. AdamW is an improved version of the Adam optimizer that better handles weight decay and thereby helps prevent overfitting. The cosine annealing schedule may gradually reduce the learning rate following a cosine function, with periodic “restarts” that allow the model to escape local minimal in the loss landscape.

[0065] The method 300 then advances to a decision block 320, where a determination is made regarding whether the updates to the transformer-based segmentation model are complete. This determination may be based on any suitable factors. In some embodiments, a predetermined number of update iterations may be performed, and the determination may therefore be based on whether the predetermined number of iterations have yet been completed. In some embodiments, the performance of the transformer-based segmentation model may be measured, and the determination of whether the updates are complete may be based on whether the transformer-based segmentation model has converged to an acceptable performance level.

[0066] If the determination at decision block 320 is that the improvements to the transformer-based segmentation model are not complete, then the result of decision block 320 is NO, and the method 300 returns to the for-loop start block 308 via terminal A in order to repeat the processing of the training examples and the updates to the transformerbased segmentation model. Otherwise, if the determination at decision block 320 is that the improvements to the transformer-based segmentation model are complete, then the result of decision block 320 is YES, and the method 300 proceeds to block 322.Docket No. 4451-P2WO

[0067] At block 322, the model training engine 212 stores the updated transformer-based segmentation model in a model data store 208 of the image processing computing system 110.

[0068] The method 300 then proceeds to an end block and terminates.

[0069] While FIG. 3 illustrates and describes the method 300 as processing all of the training examples and then updating the transformer-based segmentation model, this description is provided for the sake of clearly describing the individual steps, and in other embodiments, other orders may be used for the steps of the method 300. For example, in some embodiments, the transformer-based segmentation model may be updated more frequently, such as after processing only a subset of the training examples, or even after processing a single training example. Further, while the method 300 describes loss functions and predicted nuclear masks that reference only a single class of pixels (i.e., nuclear pixels), one will recognize that similar techniques may be used for multi-class segmentations, with similar loss values being generated for each class (e.g., cytoplasm pixels, background pixels, etc.).

[0070] FIG. 5 is a flowchart that illustrates a non-limiting example embodiment of a method of using a transformer-based segmentation model to automatically evaluate a cytology image, according to various aspects of the present disclosure. In the method 500, a transformer-based segmentation model generates a predicted nuclear mask and a confidence score for a cytology image, which may then be used for any suitable downstream task.

[0071] From a start block, the method 500 proceeds to block 502, where a cytology analysis engine 216 of an image processing computing system 110 receives a cytology image. As discussed above, in some embodiments, the cytology image may be captured by a cytology imaging system 108 and transmitted to the image processing computing system 110. As also discussed above, in some embodiments, the functionality of the cytology imaging system 108 and the image processing computing system 110 may be provided by the same system, and so the cytology image may be captured by the image processing computing system 110 itself at block 502.

[0072] At block 504, an image segmentation engine 214 of the image processing computing system 110 loads a transformer-based segmentation model from a model data store 208 of the image processing computing system 110. It is assumed in method 500 that the transformer-based segmentation model retrieved from the model data store 208 has been trained using a method such as the method 300 illustrated in FIG. 3 and discussed in detail above.Docket No. 4451-P2WO

[0073] At block 506, the image segmentation engine 214 determines one or more point prompts from the cytology image. The point prompts from the cytology image may be determined using any suitable technique. In some embodiments, the point prompts may be manually provided by a technician reviewing the cytology image. In some embodiments, the point prompts may be generated by detecting nuclei using a watershed technique, a naive segmentation model, or any other technique that can at least roughly detect the location of nuclei within the cytology image.

[0074] At block 508, the image segmentation engine 214 provides the cytology image and one or more point prompts as input to the transformer-based segmentation model to generate a plurality of predicted nuclear masks and a plurality of confidence scores. In some embodiments, the transformer-based segmentation model may generate a plurality of predicted nuclear masks along with corresponding confidence scores in a single inference pass. In some embodiments, the image segmentation engine 214 may provide the cytology image and the one or more point prompts to the transformer-based segmentation model multiple times with different settings in order to generate the plurality of predicted nuclear masks and corresponding confidence scores.

[0075] At block 510, the image segmentation engine 214 selects a predicted nuclear mask from the plurality of predicted nuclear masks based on the plurality of confidence scores. In some embodiments, the image segmentation engine 214 may select the predicted nuclear mask having the highest confidence score. In some embodiments, the image segmentation engine 214 may select a predicted nuclear mask that meets some other criteria (e.g., a number of detected nuclear pixels within plausible ranges, etc.) and has a confidence score greater than a threshold confidence score.

[0076] At block 512, the cytology analysis engine 216 determines a nuclear-to-cytoplasm (N: C) ratio using the selected predicted nuclear mask. In some embodiments, the cytology analysis engine 216 may simply count pixels that were segmented as nuclear pixels and pixels that were segmented as cytoplasm pixels, and may divide these values to determine the N: C ratio.

[0077] At block 514, the cytology analysis engine 216 provides the N: C ratio for use in a diagnosis. In some embodiments, the N: C ratio may be presented to a technician to help enable the technician to make a diagnosis, in some embodiments, the N: C ratio may automatically be compared by the cytology analysis engine 216 to one or more thresholds to determine whether the N: C ratio is indicative of a condition (e.g., whether the N: C ratio is indicative of the presence or absence of a cancer).Docket No. 4451-P2WO

[0078] The method 500 then proceeds to an end block and terminates.

[0079] An example embodiment of the method 300 and method 500 were tested to determine their effectiveness. As described above, the foundation transformer-based segmentation model was SAM2, and the training utilized AdamW optimization with a learning rate of 5e-5. Training progress was monitored through mean loU using exponential moving average smoothing (a=0.01), which provides a stable assessment of performance by reducing the impact of individual batch variations. Validation was performed every 100 steps and checkpoints were saved every 500 steps, allowing the best-performing model configuration to be selected.

[0080] The performance of the transformer-based segmentation model was compared to two previously available segmentation models: SegFormer and UNet. SegFormer is an alternative architecture for a transformer-based segmentation model that was not fine-tuned using the method 300 described above. UNet is a convolutional neural network architecture that is commonly used for biomedical image processing. To ensure unbiased evaluation, performance was tested against human-annotated images using Napari, an open source tool for bioimage annotation, and the original SAM model architecture to obtain expert segmentations. These annotations were used exclusively for test data and were not part of the training process, in order to provide a fair assessment of model performance. The metrics measured were loU (the overlap between predicted and actual nuclei), Dice (another measure of overlap, which is slightly more forgiving than loU), Precision (the proportion of predicted nuclear pixels that are actually nuclear pixels), Recall (the proportion of actual nuclear pixels that were correctly identified), and Fl score (harmonic mean of precision and recall).

[0081] The results of this testing were as follows:

[0082] As apparent from this table, the results of the current disclosure significantly outperform leading alternative architectures. The particularly high precision score (0.9444) indicates that when the transformer-based segmentation model of the present disclosure identifies a pixel as part of a nucleus, it is very likely to be correct. This is helpful for clinical applications where false positives could lead to diagnostic errors. The slightly lower recall (0.8637) suggests that the model occasionally misses some nuclear regions, butDocket No. 4451-P2WOthis trade-off favors precision over recall, which is generally preferred in medical applications, and nevertheless outperforms at least the SegFormer example.

[0083] Transformer-based segmentation models, including the SAM-class of foundation models described above, are primarily prompt driven modes that are designed to work for a broad class of objects, a wide range of spatial scales, a range appearance variability, and a multitude of prompt formats. As such, while models using these architectures can generate high-quality segmentation results when trained using the techniques discussed above, the complex architectures may provide slower than desired performance when used for specific tasks that are limited in terms of functional requirements (such as nuclear segmentation). Accordingly, more efficient model architectures may be desired to be trained and used by the image processing computing system 110.

[0084] In some embodiments, instead of a transformer-based segmentation model, a convolutional neural network-based segmentation model (CNN-based segmentation model) may be trained and used for nuclear segmentation of cytology images. Like the transformer-based segmentation models, CNN-based segmentation models may reliably segment multiple instances of object categories on which they are trained (e.g., cell nuclei, cytoplasm, etc.). Unlike transformer-based segmentation models, CNN-based segmentation models may provide a relatively lower resource footprint, leading to improved runtime performance.

[0085] FIG. 6 is a flowchart that illustrates a non-limiting example embodiment of a method of training a convolutional neural network-based segmentation model (CNN-based segmentation model) to segment cytology images, according to various aspects of the present disclosure. Any suitable CNN-based segmentation model architecture may be used. As one non-limiting example of an appropriate model architecture, a U-Net encoder-decoder architecture that is coupled with attention gates that filter the features propagated through the skip connections may be used. This model architecture may include multiple output heads, with each output head targeting a specific loss term, and may be trained and used as described below.

[0086] From a start block, the method 600 proceeds to block 602, where an image processing computing system 110 obtains a plurality of training examples, wherein each training example includes a cytology image and a ground truth nuclear mask. As discussed above with respect to block 302 of FIG. 3, the ground truth nuclear mask may include information for each pixel of the cytology image indicating what structure is depicted in the pixel. For example, the ground truth nuclear mask may include information for each pixelDocket No. 4451-P2WOindicating whether or not a nucleus is depicted in the pixel. In some embodiments, the ground truth nuclear mask may include multiple classes of information for the pixels. For example, the ground truth nuclear mask may indicate whether each pixel depicts a nucleus, cytoplasm, or background. For the method 600, the ground truth nuclear mask may also include an additional class indicating whether a pixel depicts a inter-cellular boundary between cells, an intra-cellular boundary between cell features within a single cell (e.g., between nucleus and cytoplasm), and / or may include additional information such as an embedding value that indicates an identifier of a particular cell in the cytology image to which the pixel belongs. In some embodiments, the ground truth nuclear masks may be generated using manual annotation of cytology images, or via any other suitable technique. In some embodiments, some aspects of the ground truth nuclear masks may be determined automatically, such as by determining boundary pixels using morphological operations as discussed above. In some embodiments, a set of manually annotated cytology images may be automatically augmented by rotating, mirroring, scaling, stretching, or otherwise automatically altering the cytology images and manually created ground truth nuclear masks.

[0087] At block 604, the model training engine 212 of the image processing computing system 110 initializes a CNN-based segmentation model. In some embodiments, a CNNbased segmentation model that had previously been trained for another task may be used as the initial CNN-based segmentation model. In some embodiments, weights, biases, and / or other parameters of the CNN-based segmentation model may be set to random values or to any other suitable values in order to initialize the CNN-based segmentation model for training.

[0088] The method 600 then proceeds through a continuation terminal ("terminal A") to a for-loop defined between for- loop start block 606 and for-loop end block 612, wherein each of the training examples is processed. From the for-loop start block 606, the method 600 advances to block 608, where the model training engine 212 provides the cytology image of the training example to the CNN-based segmentation model to generate a predicted nuclear mask, a predicted boundary mask, a predicted estimated distance transform, and a predicted embedding. The predicted nuclear mask is generated by a semantic head and outputs a multi-class segmentation of the cytology image. The predicted boundary mask is generated by a boundary head and indicates locations of inter- and intra-cellular boundaries. The predicted estimated distance transform is generated by a distance head and targets a distance transform derived from the ground truth nuclear mask. The predicted embedding isDocket No. 4451-P2WOgenerated by an embedding head and produces a per-pixel embedding that lends itself to a straight-forward instance clustering technique.

[0089] At block 610, the model training engine 212 calculates a value of a multi-head loss function based on the predicted nuclear mask, the predicted boundary mask, the predicted estimated distance transform, the predicted embedding, and the training example. The multi-head loss function combines loss values for each of the multiple output heads of the CNN-based segmentation model.

[0090] FIG. 7 is a schematic illustration of a non-limiting example embodiment of a multihead loss function that may be used by the model training engine 212 within the method 600, according to various aspects of the present disclosure. In some embodiments, the multi-head loss function 702 may combine a semantic head loss 704 with one or more of a boundary head loss 706, a distance head loss 708, and / or an embedding loss 710 to create a multi-head loss usable to train the CNN-based segmentation model.

[0091] In some embodiments, the semantic head loss 704 measures performance with respect to multi-class semantic segmentation objectives. The semantic head loss 704 may be represented as a cross-entropy loss between the output predicted nuclear mask and the ground truth nuclear mask as follows:

[0092] The value ncrepresents the number of semantic classes being compared by the semantic head loss 704. In some embodiments, this value may be 3, corresponding to cytoplasm, nucleus, and background.

[0093] In some embodiments, the boundary head loss 706 measures performance with respect to boundary regions, and may be represented as:

[0094] This loss value is applied to the pixels of the boundary regions, and because it measures a binary cross-entropy within the boundary region, it is similar to the binary crossentropy loss described above in FIG. 4.

[0095] In some embodiments, the distance head loss 708 measures a comparison between the predicted estimated distance transform and a target distance transform derived from theDocket No. 4451-P2WOground truth nuclear mask. The distance transform is a region descriptor that, for each point within a region, specifies its distance to the boundary of the region. When incorporated into the training process, it leads to superior performance by providing additional constraints on the solution. The measurement may be the LI loss between the two values, and may be represented as:

[0096] In this equation, NMrepresents the size of the ground truth nuclear mask, while D and D are the target and estimated distance transforms. Apart from significantly improving the quality of segmentation, the ability to compute distance functions also equips the CNN-based segmentation model with desirable post-processing functionality, such as deriving various watershed-based features.

[0097] In some embodiments, the embedding loss 710 facilitates the determination of individual cellular instances. In some embodiments, the embedding loss 710 may include three terms: a variance term (Lvar), a distance term (Ldist), and a regularization term (Lreg):

[0098] The number of clusters (i.e., cells) in the ground truth nuclear mask may be given by C, the number of elements in cluster c may be given by Nc, the embedding may be given by xithe mean embedding of cluster c may be given by / zc, 1. 1 may indicate the LI or L2 distance, and [x]+= max(0, x).

[0099] The variance term, Lvar, acts as an intra-cluster pull force that draws embeddings towards the cluster center, and is given by:c NC'var= C -LVi - N, y [i c - ii - <^]+c=l i=l

[0100] The distance term, Ldist, acts as an inter-cluster push force pushing clusters away from each other, thereby increasing the distance between the cluster centers, and is given by:Docket No. 4451-P2WO

[0101] The regularization term, Lreg, is a small pull force that draws all clusters towards the origin to keep the activations bounded:

[0102] The multi-head loss function 702 may be computed as the weighted mean of the four loss terms:^Total ^CE^CE 4” ^boundary ^boundary T dist^dist T ^embed^embed

[0103] Returning to FIG. 6, once the value of the multi-head loss function 702 has been calculated, the method 600 advances to the for-loop end block 612. If further training examples remain to be processed, then the method 600 returns from for-loop end block 612 to for-loop start block 606 to process the next training example. Otherwise, if all of the training examples have been processed, then the method 600 advances from for-loop end block 612 to block 614.

[0104] At block 614, the model training engine 212 updates the CNN-based segmentation model based on the values of the multi-head loss function. Any suitable technique may be used to update the CNN-based segmentation model based on the values of the loss function. For example, a gradient of the loss function may be determined based on the values, and the CNN-based segmentation model may be updated based on the gradient. Overall, the prediction-update loop described above may be implemented using any suitable framework. As a non-limiting example, AdamW optimization may be used with a suitable learning rate.

[0105] The method 600 then proceeds to a decision block 616, where a determination is made regarding whether the updates to the CNN-based segmentation model are complete. This determination may be based on any suitable factors. In some embodiments, a predetermined number of update iterations may be performed, and the determination may therefore be based on whether the predetermined number of iterations have yet been completed. In some embodiments, the performance of the CNN-based segmentation model may be measured, and the determination of whether the updates are complete may be basedDocket No. 4451-P2WOon whether the CNN-based segmentation model has converged to an acceptable performance level.

[0106] If the determination at decision block 616 is that the improvements to the CNNbased segmentation model are not complete, then the result of decision block 616 is NO, and the method 600 returns to the for-loop start block 606 via terminal A in order to repeat the processing of the training examples and the updates to the CNN-based segmentation model. Otherwise, if the determination at decision block 616 is that the improvements to the CNN-based segmentation model are complete, then the result of decision block 616 is YES, and the method 600 proceeds to block 618.

[0107] At block 618, the model training engine 212 stores the updated CNN-based segmentation model in a model data store 208 of the image processing computing system 110. The method 600 then proceeds to an end block and terminates.

[0108] While FIG. 6 illustrates and describes the method 600 as processing all of the training examples and then updating the CNN-based segmentation model, this description is provided for the sake of clearly describing the individual steps, and in other embodiments, other orders may be used for the steps of the method 600. For example, in some embodiments, the CNN-based segmentation model may be updated more frequently, such as after processing only a subset of the training examples, or even after processing a single training example. Further, while the method 600 describes loss functions and optimizing the CNN-based segmentation model to optimize all of the output heads at once, in some embodiments, the CNN-based segmentation model may be optimized for a subset of the output heads at a time.

[0109] In one non-limiting example embodiment, the CNN-based segmentation model may be trained using an AdamW optimizer with an appropriately determined initial learning rate combined with a plateau-based rate reduction scheduler. Training progress may be monitored via training and validation losses, and models may be checkpointed whenever the epoch-mean of the validation loss improved.

[0110] FIG. 8 is a flowchart that illustrates a non-limiting example embodiment of a method of using a CNN-based segmentation model to automatically evaluate a cytology image, according to various aspects of the present disclosure.

[0111] From a start block, the method 800 proceeds to block 802, where a cytology analysis engine 216 of an image processing computing system 110 receives a cytology image. As discussed above, in some embodiments, the cytology image may be captured by a cytology imaging system 108 and transmitted to the image processing computing systemDocket No. 4451-P2WO110. As also discussed above, in some embodiments, the functionality of the cytology imaging system 108 and the image processing computing system 110 may be provided by the same system, and so the cytology image may be captured by the image processing computing system 110 itself at block 502.

[0112] At block 804, an image segmentation engine 214 of the image processing computing system 110 loads a CNN-based segmentation model from a model data store 208 of the image processing computing system 110. It is assumed in method 800 that the CNNbased segmentation model retrieved from the model data store 208 has been trained using a method such as the method 600 illustrated in FIG. 6 and discussed in detail above.

[0113] At block 806, the image segmentation engine 214 provides the cytology image as input to the CNN-based segmentation model to generate a predicted nuclear mask and, optionally, one or more of a predicted boundary mask, a predicted estimated distance transform, or a predicted embedding. In some embodiments, the CNN-based segmentation model may retain all of the output heads that were used during training. In some embodiments, one or more of the output heads other than the semantic head that generates the predicted nuclear mask may be used during training, but may be removed for the purpose of inference in order to further accelerate the performance of the CNN-based segmentation model. One will note that one difference between the use of the CNN-based segmentation model and the transformer-based segmentation model discussed above is that the CNN-based segmentation model does not involve the use of point prompts.

[0114] At block 808, the cytology analysis engine 216 determines an N: C ratio using at least the predicted nuclear mask. In some embodiments, the cytology analysis engine 216 may simply count pixels that were segmented as nuclear pixels and pixels that were segmented as cytoplasm pixels, and may divide these values to determine the N: C ratio.

[0115] At block 810, the cytology analysis engine 216 provides the N: C ratio for use in a diagnosis. In some embodiments, the N: C ratio may be presented to a technician to help enable the technician to make a diagnosis, in some embodiments, the N: C ratio may automatically be compared by the cytology analysis engine 216 to one or more thresholds to determine whether the N: C ratio is indicative of a condition (e.g., whether the N: C ratio is indicative of the presence or absence of a cancer).

[0116] The method 800 then proceeds to an end block and terminates.

[0117] The foregoing detailed description and examples have been given for clarity of understanding only. No unnecessary limitations are to be understood therefrom. TheDocket No. 4451-P2WOdisclosure is not limited to the exact details shown and described, for variations obvious to one skilled in the art will be included within the disclosure defined by the claims.

[0118] The description of embodiments of the disclosure is not intended to be exhaustive or to limit the disclosure to the precise form disclosed. While the specific embodiments of, and examples for, the disclosure are described herein for illustrative purposes, various equivalent modifications are possible within the scope of the disclosure.

[0119] Specific elements of any foregoing embodiments can be combined or substituted for elements in other embodiments. Moreover, the inclusion of specific elements in at least some of these embodiments may be optional, wherein further embodiments may include one or more embodiments that specifically exclude one or more of these specific elements. Furthermore, while advantages associated with certain embodiments of the disclosure have been described in the context of these embodiments, other embodiments may also exhibit such advantages, and not all embodiments need necessarily exhibit such advantages to fall within the scope of the disclosure.

[0120] Unless otherwise indicated, all numbers expressing quantities of components, weights, coefficients, and so forth used in the description are to be understood as being modified in all instances by the term “about.” Accordingly, unless otherwise indicated to the contrary, the numerical parameters set forth in the description are approximations that may vary depending upon the desired properties sought to be obtained by the present disclosure. At the very least, and not as an attempt to limit the doctrine of equivalents to the scope of the claims, each numerical parameter should at least be construed in light of the number of reported significant digits and by applying ordinary rounding techniques, one will also note that where the description uses a specific number as a setting for a weight, other reasonable settings for that weight may be used, such as other values within 10% of the described specific number.

[0121] Nothwithstanding that the numerical ranges and parameters setting forth the broad scope of the disclosure are approximations, the numerical values set forth in the specific examples are reported as precisely as possible. All numerical values, however, inherently contain a range necessarily resulting from the standard deviation found in their respective testing measurements.

[0122] All headings are for the convenience of the reader and should not be used to limit the meaning of the text that follows the heading, unless so specified.

[0123] All of the references cited herein are incorporated by reference. Aspects of the disclosure can be modified, if necessary, to employ the systems, functions, and concepts ofDocket No. 4451-P2WOthe above references and application to provide yet further embodiments of the disclosure. These and other changes can be made to the disclosure in light of the detailed description.

[0124] It will be appreciated that, although specific embodiments of the disclosure have been described herein for purposes of illustration, various modifications may be made without deviating from the spirit and scope of the disclosure. Accordingly, the disclosure is not limited except as by the claims.EXAMPLES

[0125] The following numbered paragraphs provide a set of non-limiting example embodiments of the present disclosure.

[0126] Example 1: A computer-implemented method of training a transformer-based segmentation model to accurately segment cytology images, the method comprising: obtaining, by a computing system, a plurality of training examples, wherein each training example includes a cytology image and a ground truth nuclear mask; for each training example of the plurality of training examples: providing, by the computing system, the cytology image of the training example as input to the transformer-based segmentation model to generate one or more predicted nuclear masks; and calculating, by the computing system, a value of a loss function based on the one or more predicted nuclear masks and the ground truth nuclear mask of the training example, wherein calculating the value of the loss function includes calculating a value of a boundary-aware component; updating, by the computing system, the transformer-based segmentation model based on the values of the loss function for the plurality of training examples; and storing, by the computing system, the updated transformer-based segmentation model.

[0127] Example 2: The computer-implemented method of example 1, wherein calculating the value of the boundary-aware component includes: determining, by the computing system, a set of boundary pixels for the ground truth nuclear mask; comparing, by the computing system, pixels of the one or more predicted nuclear masks to pixels of the ground truth nuclear mask; and assigning, by the computing system, a greater weight to errors for pixels of the set of boundary pixels than for errors for pixels outside of the set of boundary pixels.

[0128] Example 3: The computer-implemented method of any one of examples 1-2, wherein calculating the value of the loss function includes calculating a value of an instance-aware component.

[0129] Example 4: The computer-implemented method of example 3, wherein calculating the value of the instance-aware component includes: determining, by the computing system,Docket No. 4451-P2WOa set of inter-nuclear region pixels for the ground truth nuclear mask by dilating the ground truth nuclear mask and identifying overlapping pixels as the set of inter-nuclear region pixels; comparing, by the computing system, pixels of the one or more predicted nuclear masks to pixels of the ground truth nuclear mask; and assigning, by the computing system, a weighted penalty for false positives within the set of inter-nuclear region pixels.

[0130] Example 5: The computer-implemented method of any one of examples 1-4, wherein calculating the value of the loss function includes calculating a value of a size constraint penalty that penalizes predicted regions that are smaller than or bigger than a predetermined range that indicates biological plausibility.

[0131] Example 6: The computer-implemented method of any one of examples 1-5, wherein calculating the value of the loss function includes calculating a binary crossentropy and a Dice coefficient.

[0132] Example 7: The computer-implemented method of any one of examples 1-6, wherein obtaining the plurality of training examples includes, for at least one training example: eroding, by the computing system, the ground truth nuclear mask; and generating, by the computing system, point prompts by selecting points inside the eroded ground truth nuclear mask.

[0133] Example 8: The computer-implemented method of any one of examples 1 -7, further comprising: receiving, by the computing system, a new cytology image; providing, by the computing system, the new cytology image to the updated transformer-based segmentation model to generate at least one predicted nuclear mask for the new cytology image; and generating, by the computing system, a nuclear-to-cytoplasmic ratio based on the at least one predicted nuclear mask for the new cytology image.

[0134] Example 9: The computer-implemented method of example 8, wherein generating at least one predicted nuclear mask for the new cytology image includes generating a plurality of predicted nuclear masks and a corresponding plurality of confidence scores.

[0135] Example 10: The computer-implemented method of any one of examples 8-9, further comprising: generating, by the computing system, an indication of a presence or an absence of a cancer based on the nuclear-to-cytoplasmic ratio.

[0136] Example 11: The computer-implemented method of any one of examples 1-10, wherein the transformer-based segmentation model uses a Segment Anything Model 2 (SAM2) architecture or a MicroSAM architecture.

[0137] Example 12: A non-transitory computer-readable medium having computerexecutable instructions stored thereon that, in response to execution by one or moreDocket No. 4451-P2WOprocessors of a computing system, cause the computing system to perform actions of a method as recited in any one of examples 1 to 11.

[0138] Example 13: A computing system configured to perform actions of a method as recited in any one of examples 1 to 11.

[0139] Example 14: A computer-implemented method, comprising: receiving, by a computing system, a cytology image; executing, by the computing system, a transformerbased segmentation model to accept the cytology image as input and to generate a plurality of predicted nuclear masks and a corresponding plurality of confidence scores as output; selecting, by the computing system, a predicted nuclear mask from the plurality of predicted nuclear masks based on the confidence scores; and determining, by the computing system, a nuclear to cytoplasm ratio (N: C ratio) based on the selected predicted nuclear mask.

[0140] Example 15: The computer-implemented method of example 14, further comprising determining, by the computing system, a presence or an absence of cancer based on the N: C ratio.

[0141] Example 16: The computer-implemented method of example 15, wherein the cancer is urothelial carcinoma.

[0142] Example 17: The computer-implemented method of any one of examples 14-16, further comprising: detecting, by the computing system, a plurality of nuclei within the cytology image; generating, by the computing system, a plurality of point prompts based on the plurality of nuclei; and providing, by the computing system, the plurality of point prompts as an additional input to the transformer-based segmentation model.

[0143] Example 18: The computer-implemented method of example 17, wherein detecting the plurality of nuclei within the cytology image includes using a watershed technique.

[0144] Example 19: A non-transitory computer-readable medium having computerexecutable instructions stored thereon that, in response to execution by one or more processors of a computing system, cause the computing system to perform actions of a method as recited in any one of examples 14 to 18.

[0145] Example 20: A computing system configured to perform actions of a method as recited in any one of examples 14 to 18.

[0146] Example 21: A computer-implemented method of training a convolutional neural network-based segmentation model (CNN-based segmentation model) to accurately segment cytology images, the method comprising: obtaining, by a computing system, a plurality of training examples, wherein each training example includes a cytology image and a ground truth nuclear mask; for each training example of the plurality of training examples:Docket No. 4451-P2WOproviding, by the computing system, the cytology image of the training example as input to the CNN-based segmentation model to generate a predicted nuclear mask, a predicted boundary mask, a predicted estimated distance transform, and a predicted embedding; and calculating, by the computing system, a value of a multi-head loss function based on the predicted nuclear mask, the predicted boundary mask, the predicted estimated distance transform, the predicted embedding, and the training example; updating, by the computing system, the CNN-based segmentation model based on the values of the loss function for the plurality of training examples; and storing, by the computing system, the updated CNN-based segmentation model.

[0147] Example 22: The computer-implemented method of example 21, wherein the CNNbased segmentation model uses a U-Net architecture with attention gates.

[0148] Example 23: The computer-implemented method of any one of examples 21-22, wherein calculating the value of the multi-head loss function includes: calculating a value of a semantic head loss; calculating a value of a boundary head loss; calculating a value of a distance head loss; calculating a value of an embedding head loss; and combining the values of the semantic head loss, the boundary head loss, the distance head loss, and the embedding head loss to create the value of the multi-head loss function.

[0149] Example 24: The computer-implemented method of any one of examples 21-23, further comprising: receiving, by the computing system, a new cytology image; providing, by the computing system, the new cytology image to the updated CNN-based segmentation model to generate a predicted nuclear mask for the new cytology image; and generating a nuclear- to-cytoplasmic ratio (N: C ratio) based on the predicted nuclear mask for the new cytology image.

[0150] Example 25: A non-transitory computer-readable medium having computerexecutable instructions stored thereon that, in response to execution by one or more processors of a computing system, cause the computing system to perform actions of a method as recited in any one of examples 21 to 24.

[0151] Example 26: A computing system configured to perform actions of a method as recited in any one of examples 21 to 24.

[0152] Example 27: A computer-implemented method, comprising: receiving, by a computing system, a cytology image; executing, by the computing system, a convolutional neural network-based segmentation model (CNN-based segmentation model) to accept the cytology image as input and to generate at least a predicted nuclear mask as output; andDocket No. 4451-P2WOdetermining, by the computing system, a nuclear to cytoplasm ratio (N: C ratio) based on the selected predicted nuclear mask.

[0153] Example 28: The computer-implemented method of example 27, wherein the CNNbased segmentation model uses a U-Net architecture with attention gates.

[0154] Example 29: The computer-implemented method of any one of examples 27-28, further comprising determining, by the computing system, a presence or an absence of cancer based on the N: C ratio.

[0155] Example 30: The computer-implemented method of any one of examples 27-29, wherein the cancer is a urothelial carcinoma.

[0156] Example 31: A non-transitory computer-readable medium having computerexecutable instructions stored thereon that, in response to execution by one or more processors of a computing system, cause the computing system to perform actions of a method as recited in any one of examples 27 to 30.

[0157] Example 32: A computing system configured to perform actions of a method as recited in any one of examples 27 to 30.

Claims

Docket No. 4451-P2WOCLAIMSThe embodiments of the invention in which an exclusive property or privilege is claimed are defined as follows:

1. A computer-implemented method of training a transformer-based segmentation model to accurately segment cytology images, the method comprising:obtaining, by a computing system, a plurality of training examples, wherein each training example includes a cytology image and a ground truth nuclear mask;for each training example of the plurality of training examples:providing, by the computing system, the cytology image of the training example as input to the transformer-based segmentation model to generate one or more predicted nuclear masks; andcalculating, by the computing system, a value of a loss function based on the one or more predicted nuclear masks and the ground truth nuclear mask of the training example, wherein calculating the value of the loss function includes calculating a value of a boundary-aware component;updating, by the computing system, the transformer-based segmentation model based on the values of the loss function for the plurality of training examples; andstoring, by the computing system, the updated transformer-based segmentation model.

2. The computer-implemented method of claim 1, wherein calculating the value of the boundary-aware component includes:determining, by the computing system, a set of boundary pixels for the ground truth nuclear mask;comparing, by the computing system, pixels of the one or more predicted nuclear masks to pixels of the ground truth nuclear mask; andassigning, by the computing system, a greater weight to errors for pixels of the set of boundary pixels than for errors for pixels outside of the set of boundary pixels.

3. The computer-implemented method of claim 1, wherein calculating the value of the loss function includes calculating a value of an instance-aware component.

4. The computer-implemented method of claim 3, wherein calculating the value of the instance-aware component includes:Docket No. 4451-P2WOdetermining, by the computing system, a set of inter-nuclear region pixels for the ground truth nuclear mask by dilating the ground truth nuclear mask and identifying overlapping pixels as the set of inter- nuclear region pixels;comparing, by the computing system, pixels of the one or more predicted nuclear masks to pixels of the ground truth nuclear mask; andassigning, by the computing system, a weighted penalty for false positives within the set of inter- nuclear region pixels.

5. The computer-implemented method of claim 1, wherein calculating the value of the loss function includes calculating a value of a size constraint penalty that penalizes predicted regions that are smaller than or bigger than a predetermined range that indicates biological plausibility.

6. The computer-implemented method of claim 1, wherein calculating the value of the loss function includes calculating a binary cross-entropy and a Dice coefficient.

7. The computer-implemented method of claim 1, wherein obtaining the plurality of training examples includes, for at least one training example:eroding, by the computing system, the ground truth nuclear mask; and generating, by the computing system, point prompts by selecting points inside the eroded ground truth nuclear mask.

8. The computer-implemented method of claim 1, further comprising:receiving, by the computing system, a new cytology image;providing, by the computing system, the new cytology image to the updated transformer-based segmentation model to generate at least one predicted nuclear mask for the new cytology image; andgenerating, by the computing system, a nuclear-to-cytoplasmic ratio based on the at least one predicted nuclear mask for the new cytology image.

9. The computer-implemented method of claim 8, wherein generating at least one predicted nuclear mask for the new cytology image includes generating a plurality of predicted nuclear masks and a corresponding plurality of confidence scores.

10. The computer-implemented method of claim 8, further comprising:generating, by the computing system, an indication of a presence or an absence of a cancer based on the nuclear-to-cytoplasmic ratio.Docket No. 4451-P2WO11. The computer-implemented method of claim 1, wherein the transformer-based segmentation model uses a Segment Anything Model 2 (SAM2) architecture or a MicroSAM architecture.

12. A non-transitory computer- readable medium having computer-executable instructions stored thereon that, in response to execution by one or more processors of a computing system, cause the computing system to perform actions of a method as recited in any one of claims 1 to 11.

13. A computing system configured to perform actions of a method as recited in any one of claims 1 to 11.

14. A computer-implemented method, comprising:receiving, by a computing system, a cytology image;executing, by the computing system, a transformer-based segmentation model to accept the cytology image as input and to generate a plurality of predicted nuclear masks and a corresponding plurality of confidence scores as output;selecting, by the computing system, a predicted nuclear mask from the plurality of predicted nuclear masks based on the confidence scores; anddetermining, by the computing system, a nuclear to cytoplasm ratio (N: C ratio) based on the selected predicted nuclear mask.

15. The computer-implemented method of claim 14, further comprising determining, by the computing system, a presence or an absence of cancer based on the N: C ratio.

16. The computer-implemented method of claim 15, wherein the cancer is urothelial carcinoma.

17. The computer-implemented method of claim 14, further comprising:detecting, by the computing system, a plurality of nuclei within the cytology image; generating, by the computing system, a plurality of point prompts based on the plurality of nuclei; andproviding, by the computing system, the plurality of point prompts as an additional input to the transformer-based segmentation model.

18. The computer-implemented method of claim 17, wherein detecting the plurality of nuclei within the cytology image includes using a watershed technique.Docket No. 4451-P2WO19. A non-transitory computer- readable medium having computer-executable instructions stored thereon that, in response to execution by one or more processors of a computing system, cause the computing system to perform actions of a method as recited in any one of claims 14 to 18.

20. A computing system configured to perform actions of a method as recited in any one of claims 14 to 18.

21. A computer-implemented method of training a convolutional neural network-based segmentation model (CNN-based segmentation model) to accurately segment cytology images, the method comprising:obtaining, by a computing system, a plurality of training examples, wherein each training example includes a cytology image and a ground truth nuclear mask;for each training example of the plurality of training examples:providing, by the computing system, the cytology image of the training example as input to the CNN-based segmentation model to generate a predicted nuclear mask, a predicted boundary mask, a predicted estimated distance transform, and a predicted embedding; andcalculating, by the computing system, a value of a multi-head loss function based on the predicted nuclear mask, the predicted boundary mask, the predicted estimated distance transform, the predicted embedding, and the training example: updating, by the computing system, the CNN-based segmentation model based on the values of the loss function for the plurality of training examples; andstoring, by the computing system, the updated CNN-based segmentation model.

22. The computer-implemented method of claim 21, wherein the CNN-based segmentation model uses a U-Net architecture with attention gates.

23. The computer-implemented method of claim 21, wherein calculating the value of the multi-head loss function includes:calculating a value of a semantic head loss;calculating a value of a boundary head loss;calculating a value of a distance head loss;calculating a value of an embedding head loss; andcombining the values of the semantic head loss, the boundary head loss, the distance head loss, and the embedding head loss to create the value of the multi-head loss function.Docket No. 4451-P2WO24. The computer-implemented method of claim 21, further comprising:receiving, by the computing system, a new cytology image;providing, by the computing system, the new cytology image to the updated CNN-based segmentation model to generate a predicted nuclear mask for the new cytology image; andgenerating a nuclear-to-cytoplasmic ratio (N: C ratio) based on the predicted nuclear mask for the new cytology image.

25. A non-transitory computer- readable medium having computer-executable instructions stored thereon that, in response to execution by one or more processors of a computing system, cause the computing system to perform actions of a method as recited in any one of claims 21 to 24.

26. A computing system configured to perform actions of a method as recited in any one of claims 21 to 24.

27. A computer-implemented method, comprising:receiving, by a computing system, a cytology image;executing, by the computing system, a convolutional neural network-based segmentation model (CNN-based segmentation model) to accept the cytology image as input and to generate at least a predicted nuclear mask as output; anddetermining, by the computing system, a nuclear to cytoplasm ratio (N: C ratio) based on the selected predicted nuclear mask.

28. The computer-implemented method of claim 27, wherein the CNN-based segmentation model uses a U-Net architecture with attention gates.

29. The computer-implemented method of claim 27, further comprising determining, by the computing system, a presence or an absence of cancer based on the N: C ratio.

30. The computer-implemented method of claim 27, wherein the cancer is a urothelial carcinoma.

31. A non-transitory computer-readable medium having computer-executable instructions stored thereon that, in response to execution by one or more processors of a computing system, cause the computing system to perform actions of a method as recited in any one of claims 27 to 30.Docket No. 4451-P2WO32. A computing system configured to perform actions of a method as recited in any one of claims 27 to 30.