Method for classifying oocysts of protozoa of the genus eimeria that cause avian coccidiosis

A computer vision model using deep neural networks and data augmentation addresses the inefficiencies of manual oocyst classification, achieving accurate and efficient identification and classification of Eimeria species, reducing costs and time.

WO2026097155A1PCT designated stage Publication Date: 2026-05-15LAB BIO-VET LTDA +1
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
LAB BIO-VET LTDA
Filing Date
2025-10-31
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Current methods for identifying and classifying oocysts of Eimeria species causing avian coccidiosis are manual, slow, and require specialized professionals, with PCR analysis being expensive and prone to inconsistencies, while deep neural networks face high computational costs and challenges with overlapping objects.

Method used

A computer vision model using machine learning, specifically deep neural networks, is developed to automate the classification of oocysts, employing data augmentation and transfer learning, and utilizing CRISP-DM methodology for data science processes to improve accuracy and efficiency.

Benefits of technology

The model achieves high accuracy in identifying and classifying oocysts, reducing computational costs and time, and providing reliable quantitative results, with improved precision and robustness across various scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BR2025050495_15052026_PF_FP_ABST
    Figure BR2025050495_15052026_PF_FP_ABST
Patent Text Reader

Abstract

Avian coccidiosis is a disease caused by an intracellular parasitic protozoan of the genus Eimeria, which induces lesions in the gastrointestinal tissues of birds due to its replication. The process of qualifying an oocyst is almost entirely manual, using, in particular, the optical microscope counting technique, in which each identified object must be classified as sporulated or non-sporulated, stained or unstained. For the identification process, the method used is PCR (polymerase chain reaction), in which the presence of each species is detected, but without identifying each oocyst. This manual process is time-consuming and susceptible to errors. The method proposed herein introduces a computer vision model, based on Artificial Intelligence, capable of automating this classification process. The model analyzes samples and provides quantitative results, including the classification of oocysts into the categories of sporulated, non-sporulated, stained, and unstained, as well as the identification of Eimeria species (acervulina, brunetti, maxima, mitis, necatrix, praecox, or tenella). This computational model is entirely based on machine learning and is capable of identifying the presence of oocysts in a sample (image), classifying each identified oocyst into categories such as sporulated or non-sporulated, stained or unstained, quantifying the objects in each category, and identifying the Eimeria species.
Need to check novelty before this filing date? Find Prior Art

Description

"METHOD FOR CLASSIFICATION OF OOCYSTS OF PROTOZOANS OF THE GENUS EIMERIA THAT CAUSE AVIAN COCCIDIOSIS" Field of Invention

[0001] The present invention belongs to the fields of biology and veterinary medicine and describes a method that uses an artificial intelligence model to classify the oocysts of seven species of Eimeria (acervulina, brunetti, maxima, mitis, necatrix, praecox and tenella), a protozoan that causes avian coccidiosis. Background

[0002] Avian coccidiosis is a disease caused by an intracellular parasitic protozoan of the genus Eimeria, which induces lesions in the gastrointestinal tissues of birds due to its replication. After reproduction, Eimeria is excreted in the feces in the form of unsporulated oocysts. When exposed to the environment under suitable conditions of temperature, humidity, and pressure, these oocysts undergo sporulation. Once in sporulated form, an oocyst becomes infectious when ingested by other birds, thus forming a cycle of reproduction and infection.

[0003] Currently, the process of identifying and classifying an oocyst is practically manual, being a highly specialized and slow procedure. A specialist must observe a slide containing collected fecal samples and quantify the structures. Furthermore, each identified object must be cataloged as sporulated or non-sporulated and stained or unstained. For species differentiation, PCR analysis is used, which allows the identification of each species (acervulina, brunetti, maxima, mitis, necatrix, praecox, or tenella), but not the precise quantity of each species. These two methods require qualified professionals, while slide observation can be slow due to the number of slides, and PCR analysis can be more expensive.

[0004] One possible approach to this problem is a computer vision model capable of analyzing any sample and providing quantitative results. This model should be entirely based on machine learning (artificial intelligence - AI) due to the impossibility of applying pre-defined rules. defined, as in conventional software.

[0005] Deep neural networks are computational models composed of multiple hierarchical processing layers designed to capture the essence of the given data. Despite achieving good accuracy, this methodology incurs high computational costs during training and difficulties with overlapping objects in the same image. The high computational cost results in long experimentation periods or a reduction in the number of models that can be validated.

[0006] Another difficulty concerns the metric used. Although precision is a good validation measure, analyzing it in isolation does not guarantee a reliable methodology for interpreting the results due to its low consistency with unbalanced data, requiring the use of additional metrics in conjunction.

[0007] This study used the Coccidia-USP dataset in the initial tests. The main data came from an internal dataset obtained by Vaxxinova. After further analysis, this dataset showed good visual behavior, without occlusions or significant artifacts that hindered the classification process, and presented a data distribution quite different from the context of the problem faced by Vaxxinova.

[0008] The state of the art involves reusing pre-trained deep neural networks from previous computer vision problems [He et al., 2016; Szegedy et al., 2016] and performing transfer learning [Yosinski et al., 2014]. These networks have already been validated, and their reproducibility has been proven by numerous studies. Therefore, building a shallow neural network "from scratch" is a costly process with no guarantees of model generalization. Additionally, in highly complex scenarios, such as the problem described in this project, the use of shallow networks compromises the current solution due to the high risk involved; some layers are insufficient to capture all the variations present in the dataset. Description of the State of the Art

[0009] Patent application US20210248419, entitled "METHODS FOR IDENTIFYING BIOLICAL MATERIAL BY MICROSCOPY", describes a machine learning method implemented by computer to identify target biological material in a sample. This learning method is designed to link one or more features extracted from the biological material to the target biological material. It is noted that the application uses a machine learning method for fecal samples targeting fuchsin / malachite green.

[0010] The document US20220392060, entitled "System, Microscope System, Methods, and Computer Programs for Training or Using a Machine-Learning Model", is suitable for detecting the properties of an organic tissue sample in image input data, reproducing a suitable subset of the various image characteristics.

[0011] Document WO2022169905A1, entitled "FERROFLUID-BASED ASSAY METHODS AND SYSTEMS FOR PARASITE EGGS OR OOCYSTS DETECTION," compares a traditional and laborious method for measuring oocysts in feces with a new automated method that significantly increases throughput, reduces the need for extensive training, and minimizes subjectivity in the analysis. The new method employs the PIPER™ instrument and ferrofluid-based cytometry within a disposable microfluidic device. It should be noted that document WO2022169905A1 utilizes ferrofluid-based cytometry, while the invention described herein involves AI for the analysis of oocysts causing coccidiosis.

[0012] Document WO2018206802, entitled "A SYSTEM AND DEVICE," provides the distinct advantage of analyzing larger volumes while acquiring fewer images, thus differentiating shapes based on aspect ratio, contrast, and internal oocyst characteristics. The invention focuses on differentiating egg types, whether sporulated or non-sporulated. Although this document does not discuss machine learning training with images, it, along with the others mentioned here, could contribute to the development of the invention.

[0013] The document US20230377354, entitled “Continuous Detection and Species Classification of Biological Particles in a Sample”, describes a method for continuous detection and classification of biological particle species in a sample through continuous scanning of at least part of the sample. It analyzes the sequence for the presence of biological particles using a trained machine learning model, such as a convolutional neural network, thus obtaining a scanning indicator and continuously detecting and classifying the biological particle species in the sample.

[0014] US patent document 8116551 B2, entitled “Method and System for Image Analysis”, refers to a method and system for determining the expression level of one or more candidate objects of interest using an automated (computer-assisted) image analysis system. The method involves obtaining a digitized image of the biological sample and separating that image into two images: the First Image and the Second Image. The First Image contains information about the color and intensity of three color dots, while the Second Image contains information about the color and intensity of another color dot.

[0015] Document CN108805101, titled “A Recognition Method of Parasite Eggs Based on Deep Learning,” describes a method for identifying parasite eggs using deep learning techniques. The method involves several steps, including capturing and magnifying an image of a parasite egg to create a detailed microimage. This microimage is then subjected to a cleaning process. Subsequently, the cleaned image is automatically fed into an artificial intelligence deep learning model to extract key features. Summary of the Invention

[0016] The objectives of the present invention are as follows: to identify the presence of oocysts in a sample (image), to catalog an oocyst identified as sporulated or non-sporulated, and to catalog an oocyst identified as stained or not. stained, and identify different species of Eimeria. Brief description of the figures

[0017] Figure 1 shows the workflow for data science projects using the CRISP-DM methodology.

[0018] Figure 2 shows examples of the four possible scenarios, from left to right: sporulated and stained oocyst; sporulated and unstained oocyst; non-sporulated and stained oocyst; non-sporulated and unstained oocyst.

[0019] Figure 3 shows histograms of data distribution: oocysts (blue) vs. non-oocysts (orange); sporulated oocysts (blue) vs. non-sporulated oocysts (orange); unstained oocysts (blue) vs. stained oocysts (orange).

[0020] Figure 4 shows examples contained in the Coccidia-USP dataset: (a) Eimeria maxima', (b) Eimeria brunetti; (c) Eimeria tenella', (d) Eimeria necatrix', (e) Eimeria praecox', (f) Eimeria acervulina', (g) Eimeria mitis.

[0021] Figure 5 shows histograms of data distribution: oocysts (blue) vs. non-oocysts (orange); sporulated oocysts (blue) vs. non-sporulated oocysts (orange); unstained oocysts (blue) vs. stained oocysts (orange).

[0022] Figure 6 shows the automatic detection of the edges of the rectangle of interest for oocyst counting.

[0023] Figure 7 shows the initial interface of the application.

[0024] Figure 8 shows the image processing interface.

[0025] Figure 9 shows the interface for visual image processing results.

[0026] Figure 10 shows the order processing flow developed with computer vision models.

[0027] Figure 11 shows an example of the rectangular grids captured by the microscope with oocysts inside.

[0028] Figure 12 shows the F1 score results for different combinations of datasets during training when evaluated on Dataset E.

[0029] Figure 13 shows the F1 score results for different combinations of datasets during training when evaluated on Dataset I. Detailed description

[0030] The methodology to be adopted in the design of the computational solution for this problem will be entirely based on the CRISP-DS (Cross Industry Standard Process for Data Science) process, composed of six main steps, as shown in Figure 1.

[0031] This methodology is well-established for problems involving data science and is directly applicable to computer vision scenarios. The main idea is to advance to a later phase only when the current one is fully consolidated. In a future step, if problems occur or if it is found that some aspects need reformulation, it should return to the previous steps for corrections (see arrows in the execution flow). This approach allows for better use of computational resources and team development. Below, each step and its respective method of operation are detailed. Understanding the problem

[0032] This stage includes contextualizing the problem to be addressed, defining the project objectives and client needs, and conducting a literature review. In this initial stage, several technical meetings were held with Vaxxinova specialists to fully understand the scenario to be investigated. With the initial information, it was possible to define the scope of the work regarding the computational solution and the objectives to be achieved. Subsequently, a literature review was conducted to study possible similar solutions and identify the techniques currently in use, highlighting their advantages and disadvantages. This study allows us to eliminate potential lines of research that do not produce promising results and to leverage methodologies that have already been investigated, as well as the disparities that remain unresolved. Understanding the data

[0033] This second stage involves defining the data collection protocol, labeling, storage structure, and versioning. As discussed in meetings and technical visits, the collection protocol was defined as follows: Vaxxinova will provide cataloged slides describing the objects contained in oocysts and non-oocysts, including sporulated and non-sporulated, stained and unstained. This information is made available in an online repository through image files (raw data collected through photographs of the slides under a microscope) and PowerPoint files containing the images and the polygons that indicate the respective labels. These images are then analyzed by Venturus for proper structuring and storage, for later use in data preparation, transformation, and modeling of the proposed solution.

[0034] A reduced sample of the public dataset was chosen for annotation. Using these annotations, a detection model was trained, specifically the Faster RCNN Inception model, to subsequently automate the detection of oocysts in the remaining images of the dataset. This model was designed exclusively to facilitate the annotation process of the other images.

[0035] Next, it was necessary to curate the predictions to verify and correct possible errors, as well as identify oocysts that were not detected. Data preparation

[0036] After understanding the data, the third step of the adopted methodology involves analyzing its distribution, verifying the imbalance of classes in the cataloged examples and potentially merging them with other datasets. Available data that can provide relevant information for modeling the solution. Analysis of the distribution and imbalance of the data provides insights into potential problems that may arise during the computational model's learning process and suggests different strategies for addressing these factors. Furthermore, this analysis contributes to understanding the expected results during the solution evaluation. In addition to the data provided by Vaxxinova, mentioned in the "Understanding the Data" step, other datasets may be incorporated into the main dataset to increase the representativeness and quality of the learning incorporated into the computational model.

[0037] Venturus has identified the Coccidia-USP dataset, which is being studied and adapted for use in the proposed solution, with labeling validated by Vaxxinova experts. In this way, the final dataset will consist of more examples, providing greater representativeness. Solution modeling

[0038] With the data prepared, the modeling can begin. Based on the state of the art for computer vision problems, it is evident that the solutions are based on machine learning methods, mainly deep networks.

[0039] Deep neural networks are architectures that require a large amount of data, and during their tuning (training), the parameters of their mathematical formulation are established based on the provided data. Thus, the solution will consist of one or more neural models that identify and classify the objects contained in the images. Initially, the ideal approach is to create a base model without optimizations to establish a "baseline" for the data. Based on this initial solution, new configurations can be studied and the solution can be refined, always comparing it with the previous solution and adjusting hyperparameters and training strategies. During this stage, the need to acquire more images was also evaluated (in case the model cannot learn the concepts contained in the data), and the direction of the investigation was determined (how and which techniques are used). most promising to incorporate). Solution evaluation

[0040] Each generated model is evaluated according to metrics specific to its respective tasks. During object identification, measures can be used to assess the percentage of correctly identified structures in relation to the total labeled. For classification, the main metrics are precision and collection, which evaluate the quality of the distribution of classes in the predictions. Whenever a proposed model improves the performance of the previous solution, it becomes the new "baseline"; otherwise, if the new technique does not produce improvements, the reasons are analyzed and a new strategy is established.

[0041] An initial study was conducted focusing on improving oocyst detection, aiming to maximize the average accuracy metric in the test sample. This study reviewed recent models from the literature and performed tests with a new detection model known as Faster RCNN Inception ResNet Atrous, with several hyperparameter variations: • Detection of two classes: oocysts and non-oocysts; • Artificial data augmentation: horizontal and / or vertical rotation; • Neural network learning rate; • Model input resolution; • Transferring learning from a previously trained model to a public dataset; • Through this study, we were able to improve the average baseline accuracy from 61.82% to 98.64% with the final model, considering all the data provided by Vaxxinova.

[0042] A second study was conducted, inspecting more recent models from the literature. Additionally, a classification model known as ConvNext was evaluated. For this problem, we needed to create a classification workflow: • Before model processing, the images go through a pre-processing stage, which includes a filter to determine if the detection is in fact an oocyst (i.e., a false-negative filter); • Then, a second filter confirms whether the oocyst is suitable for classification, as there may be cases of partially visible objects that hinder the analysis of the oocyst. Database preparation

[0043] Each image obtained from a microscope slide may contain several structures (examples in Figure 2) that can be identified as oocysts or non-oocysts. Once identified as an oocyst, the structure can be categorized into one of four distinct scenarios: - Sporulated and colored; - Sporulated and colorless; - Non-sporulated and non-colored; Non-sporulated and colorless.

[0044] To provide the necessary training for the computer vision model, we have two distinct datasets: Vaxxinova and Coccidia-USP. The Vaxxinova dataset will be divided into two parts: one entirely dedicated to training the model (the training set) and the other for evaluating the model's performance (the test set). Following the most widely adopted heuristic in training and testing processes, the partitioning will be 80% for training and 20% for testing. This partitioning will be done by slides, with each slide fully included in one of these sets to avoid possible influences on the model's inference. All images from Coccidia-USP will be added to the training set to increase learning variability and improve model generalization (since we do not intend to validate the model on this data distribution, we do not need to sample it for testing). Vaxxinova dataset

[0045] The images are collected according to an established protocol and labeled by experts, representing the actual distribution of the data for model inference. A total of 16 slides were provided, with the distribution shown in Figure 3.

[0046] As mentioned, the collected dataset will be partitioned into training and test sets. Therefore, the proportionality for these sets will be as follows: Table 1: Partitioning of the Vaxxinova database in training and testing. Source: Venturus. Coccidia-USP Database:

[0047] This is a supplementary image database intended to increase the quantity and representativeness of the main image database. For proper use, this database requires validation by Vaxxinova experts to avoid categorization errors that could hinder model learning. As will be shown in Table 2, this database lacks labels to identify the classes of interest for the problem (sporulated and non-sporulated, stained and unstained). However, it provides 4,243 oocyst images from seven different species, covering various lighting conditions and slide preparation. Table 2: Distribution of data from the Coccidia oocyst dataset. USP. Source: He et al., 2023.

[0048] It can be observed from some examples in this database (Figure 4) that the Coccidia-USP images were pre-processed to remove artifacts that could impair performance, such as dirt and slide markings. Furthermore, this database does not contain images with overlaps and partial structures, which differs from the distribution of the data of interest.

[0049] Considering both databases, we currently have the following data distribution for the training phase:

[0050] As shown in the histograms presented in Figure 5, the image database for the model training phase is highly unbalanced. Therefore, balancing techniques will be studied to address this issue during the modeling phase. If these techniques prove insufficient, a review of the data acquisition phase may be necessary. Experiments: Detection of oocysts

[0051] Following the CRISP methodology, during the modeling and evaluation stages, we created an initial model (first row of Table 3) as a baseline for the gradual evolution of experimentation in oocyst detection. In our experiments, we are using deep learning models capable of detecting and classifying multiple objects in a single image. The Mean Average Precision (mAP) metric is used for evaluation. The main objective of this stage is to locate all possible oocysts in the image. The distinction between oocysts and non-oocysts will also be tested and confirmed in this phase using a classification model described in the next section. The Vaxxinova images used for training and evaluating the models were organized by slides, ensuring that images from the same slide are all in the training set or all in the test set. Table 3: Detection of oocysts and non-oocysts. The best model found is in bold.

[0052] Regarding oocyst detection, further tests will be conducted to improve performance in identifying these objects. For this purpose, data augmentation techniques (generating similar synthetic data through geometric and contrast transformations to increase the variability of the training set) and image preprocessing techniques can be applied. Classification of oocysts: stained and unstained.

[0053] Following the CRISP methodology, during the modeling and evaluation stages, we created an initial model (first row of each table in the sequence) as a basis for the gradual evolution of the experimentation. As each model is trained and evaluated, the settings are modified and the process is repeated. The modeling for classification includes different neural networks and training strategies. Tables 4 to 7 present the results for Oocyst Classification, Stained Classification, Sporulated Classification, and Status Classification, respectively. All experiments incorporate data augmentation to increase variability during training. Table 4: Oocyst vs. Non-Oocyst Classification. The best model found is in bold. Table 5: Classification of stained vs. non-stained skin. The best model found is in bold. Table 6: Sporulated vs. non-sporulated classification. The best model found is in bold. Table 7: Partial and complete classification of oocysts vs. non-oocysts. The best model found is in bold.

[0054] As complementary experiments, to validate the robustness of the development models, inference was performed using data partitioned by blades and, subsequently, considering all the labeled data from Vaxxinova. We observed that the performance of the final model remains above 96% for all metrics, even with changes in the test scenario (Tables 8 and 9). Consequently, this demonstrates the robustness of the model in different situations. Table 8: Best Xception model with Adam, reduced learning rate, class weighting, and image separation by slides. Table 9: Best Xception model with Adam, learning rate reduction, class weighting and image separation by slides and the entire Vaxxinova dataset. Experiments: Automatic detection of blade rectangles

[0055] To calculate the number of oocysts per mL of each slide, image processing techniques were used for automatic detection of the central rectangle of each image (Figure 6). Given that there is always a contrast between the white borders of the rectangle and the background of the image, the following techniques were used to find the contours of this region and define the final rectangle: - Binarization of images using the OTSU technique (which determines an automated threshold to classify image points as white or black). - Filtering of connected components by size from the previous step. - Edge detection using the Canny technique. - Obtaining the straight line segments that make up each side of the rectangle using the Hough transform. - Filtering straight segments to retain only vertical and horizontal segments. - Forming polygons from line segments, excluding those whose areas are below a pre-established limit. If more than one rectangle is found, combine them to obtain the final rectangle.

[0056] The combination of these sequential steps was effective for over 90% of the images tested. In these cases, the resulting rectangle aligns well with the white edges of the image, touching all of them. For cases where this alignment does not occur and the resulting rectangle is smaller or larger than desired, visual inspection and arithmetic calculations determined a fixed mask to be used, defined by the following steps: - Manually find the rectangle for some images and calculate the average area of ​​those rectangles. - For each image, automatically find the rectangle as described previously and extract the coordinates of its center. - Use the center coordinates to position the rectangle found manually in step 1.

[0057] Therefore, in cases where the automatically generated rectangle was smaller or larger than desired, this mask was applied to minimize persistent detection errors. Through visual analysis, the main remaining errors occur when the image contains many objects or dirt, as well as oocysts located on the white edges themselves. To resolve these potential problems in a more automated way, further investigation using deep learning techniques will be necessary. Final application

[0058] As a result of the investigation and development of computer vision models, an application was created with the minimum resources necessary to allow the Vaxxinova research team to easily use the trained models. This application includes a graphical interface (see Figures 7, 8 and 9), automatic segmentation of the area of ​​interest (quadrant represented by light beams), report generation (CSV and XLSX) and the ability to process multiple slides in a single request, among other functionalities.

[0059] The exported application package is also designed to organize images and predictions in a way that facilitates future training sessions to improve the algorithm's accuracy. The final product consists of an executable application on the Windows platform (preferably versions 10 or 11), along with the computer vision models, and is coded in Python.

[0060] Figure 10 presents a flowchart illustrating the application's mechanism for image processing. The flow begins with reading the images and then executing the structure detection model. Subsequently, post-processing is applied to validate detections with high probabilities and for crop regions containing structures of interest. These sub-regions are then passed on to the classification models. As output, the application provides the image with labeled structures and their respective classes. The final step includes marking the image quadrant and analyzing the intersections to generate the final report.

[0061] At the end of the process, each oocyst found will have an associated label of Sporulated / Non-Sporulated and Stained / Unstained. Thus, it is possible to apply counting and density metrics to each slide loaded into the software. Second phase

[0062] Phase 2 of the Vaxxinova-Venturus project involves the classification of protozoan oocysts of the genus Eimeria into species such as acervulina, brunetti, maxima, mitis, necatrix, praecox, or tenella. This classification is an integral part of the process of Quality control for vaccine production includes rigorous testing to ensure the vaccine meets all quality and safety standards. For this purpose, the oocyst ratios of each species must fall within a predefined confidence interval to guarantee the vaccine provides the necessary protection against these protozoa.

[0063] To classify oocysts, we used an artificial intelligence model based on Convolutional Neural Networks (CNNs), which are known for their excellent cost-benefit ratio in terms of execution time and performance metrics (Ding, 2021). CNNs offer significant advantages over traditional algorithms used for oocyst classification in the literature (Castaííón, 2007). Traditional methods rely on predetermined rules for feature extraction based exclusively on oocyst shapes and use simple Bayesian statistical algorithms for classification. These methods also require preprocessing steps, such as image binarization and edge segmentation, which complicates the generalization of the model to problems with varying background colors or images that deviate from a predetermined pattern.

[0064] CNNs convert the manual task of feature extraction into an optimization problem, generating filters that automatically extract the most significant physical and abstract features, minimizing a loss function (cost function). This automatic tuning improves metric performance compared to traditional techniques, particularly for object classification and detection tasks such as those used in this project. Furthermore, CNNs employ pooling layers to reduce dimensionality and retain the most relevant features, improving computational efficiency and reducing the risk of model overfitting.

[0065] The model selected for this task was EfficientNetV2, specifically the Large version (Tan, 2021). This architecture represents a notable advancement over its predecessors, such as EfficientNet, due to the use of innovations like the Swish activation function and the Mobile Inverted Bottleneck Convolution fused block. (MBConv). The Swish function enhances the model's learning capacity by providing smoother nonlinear activation for network units, while the merged MBConv block optimizes computational efficiency and feature representation through convolution merging.

[0066] For training, we used a pre-trained EfficientNetV2 model initially trained on the ImageNet21k dataset (Deng, 2009) and further tuned it on ImageNet1k (Deng, 2009). Leveraging pre-trained networks on large datasets like ImageNet allows the model to benefit from extensive prior knowledge of image diversity and characteristics. This approach improves the model's performance in specific classification tasks, such as oocyst classification, enhancing accuracy and robustness.

[0067] In addition to model selection, data augmentation played a crucial role in the process. Data augmentation techniques increase the diversity of the training dataset and improve the model's ability to generalize to real-world scenarios. Following the recommendations of the EfficientNetV2 paper, we applied RandAugment (Cubuk, 2020), which introduces random transformations such as rotations, color adjustments, and cropping. This approach increases data variability, helping the model to better generalize to new images. RandAugment also reduces the need for multiple hyperparameters, streamlining the data augmentation process and improving the efficiency and effectiveness of model training.

[0068] The combination of an advanced model with robust data augmentation techniques led to an effective solution for oocyst classification. The evaluation metrics used for this project were F1 score, precision, and collection. The main focus was on the F1 score, which represents the harmonic mean of precision and collection. Both the F1 score for each class and the macro-average F1 score for the tested datasets were reported. The macro-average F1 score is calculated as the average of the F1 scores across all classes, giving equal weight to each class, and is obtained by dividing the sum of the F1 scores for the seven classes by 7.

[0069] The data used in this phase of the project are similar to those collected in the previous phase. Slides containing oocysts were examined using an analog microscope and photographed with an attached camera. Vaxxinova conducted the data collection ensuring that each slide contained only one type of oocyst at a time. This approach allowed for automatic data labeling, eliminating the need for manual labeling. Classifying oocysts by the human eye is highly complex due to the similarity in characteristics such as size and roundness among different oocyst species. Therefore, this data collection method effectively reduces labeling errors in the training data.

[0070] The construction of the training dataset is crucial for the success of this phase of the project. Initial observations with the first batches of data revealed changes in the collection pattern and indicated that the model lacked sufficient data to distinguish between oocyst classes. This issue was particularly evident when comparing data collected up to December 2023 (Dataset A) with data collected up to April 2024 (Dataset B). Microscope parameters were manually set to ensure consistency in focus, illumination, and other acquisition characteristics. Although preliminary results showed clear distinctions between datasets A and B, these characteristics were not perceptible through human inspection when comparing samples from both datasets.

[0071] Subdividing dataset A suggested that variability in image characteristics frequently occurred with a longer time interval between oocyst sample collections. To address this issue, Vaxxinova performed weekly or biweekly data collections with at least six days between each collection. This approach resulted in eight additional datasets, along with datasets A and B, available for training. The characterization of these datasets is detailed in Table 10. Table 10: Data sets available for the training phase.

[0072] Vaxxinova also provided a final evaluation dataset containing mixed oocysts in proportions used in the vaccine, but without individual classification. This dataset adhered to the following proportions for the species: 20.2% acervulina, 10.1% brunetti, 10.1% maxima, 4.2% mitis, 20.9% necatrix, 4.2% praecox, and 30.3% tenella.

[0073] The experiments used datasets A, B, D, F, G, H, J, and K for training, dataset E for validation, and dataset I for testing. All stained / unstained and sporulated / non-sporulated images were used during the training phase. However, only non-sporulated and unstained images were used for validation and testing. Specifically, datasets E and I contained 22,147 and 24,555 non-sporulated and unstained images, respectively, representing 83.17% and 83.74% of the total oocysts collected from these datasets.

[0074] The training employed RandAugment with 2 simultaneous operations and a magnitude of 20. The process was executed for 100 epochs, with early stopping criteria defined after two epochs and a batch size of 60. The Adam optimizer was used with a learning rate of 0.0001.

[0075] In addition to filtering stained and sporulated images, a region of interest filter was applied. The images captured by the microscope included a rectangular grid (Figure 11), and experiments revealed that classifying oocysts outside this grid negatively impacted the algorithm's metrics. This is attributed to variations in contrast and background color at the grid edges. Therefore, oocysts outside the rectangular grid were excluded from the classification, focusing instead on determining the proportion of oocyst species in the sampled mixtures.

[0076] The training was performed on two RTX4090 GPUs with a server equipped with 64GB of RAM and an Intel i9-13900K CPU. Due to the high memory consumption of the large models, batch processing was used, allowing the GPU to handle more than 12 images at once. This technique involves storing gradient values ​​in buffers to achieve the desired batch size of 60.

[0077] The results presented in this section were evaluated for datasets E and I. Figure 12 illustrates that incorporating additional datasets increases the average macro F1 score from 81% (for "Training D") to 90.82% (for "Training A+B+D+F+G+H"), highlighting the improvement in the model's generalization ability with more data. Further optimizations, including hyperparameter tuning and the use of the EfficientNetv2 Large CNN, increased the score to 95.61%. The highest average macro F1 score achieved in dataset E was 96.75%.

[0078] These results are closely aligned with those of the test dataset (Dataset I), as shown in Figure 13, where the best model achieved a macro average F1 score of 96.69%. This consistency demonstrates the reliability of the model in analyzing datasets with isolated oocyst samples.

[0079] A statistical analysis of confidence intervals was performed to evaluate the error estimate for each class with varying sample sizes, as detailed in Table 10. Using the bootstrapping method with 1000 resamples and a 95% confidence interval, it was observed that with 500 samples, the F1 scores for MIT and PRA fell below 80%. However, the confidence interval improved with 3000 oocysts, without the F1 score results falling below 80%, which is desirable for the project. Table 10: Confidence intervals for oocyst classification results for different oocyst quantities in the samples, following the vaccine proportion.

[0080] Table 11 presents the errors for evaluating the final model in mixed samples. Notably, measurement errors are below 13% for the species *acervulina*, *brunetti*, *maxima*, *mitis*, and *praecox*. However, there is confusion in the classification of *necatrix* and *tenella*, with expected proportions of 20.9% and 30.3%, respectively. This suggests that some characteristics of these oocyst types change when analyzing mixed images versus single-species images. Since individual labeling is not feasible in mixed solutions, the next steps involve understanding the distinct patterns in *necatrix* and *tenella* images in both mixed and single contexts to replicate these variations during the training process. Table 11: Predicted results for each oocyst species.

[0081] For example, synthetic or augmented data simulating these variations could be generated, or greater emphasis could be placed on these variations during training if they are underrepresented in the training data. Implementing such strategies would allow the system to reduce errors in necatrix and tenella predictions, increasing the overall reliability of the system's predictions across all oocyst classes. Non-Patented Literature Castanón, CA, Fraga, JS, Fernandez, S., Gruber, A. and Costa, LDF, 2007. Biological shape characterization for automatic image recognition and diagnosis of protozoan parasites of the genus Eimeria. Pattern Recognition, 40(7), pp.1899-1910. Cubuk, E.D., Zoph, B., Shlens, J. and Le, Q.V., 2020. Randaugment: Practical automated data augmentation with a reduced search space. In Proceedings of the IEEE / CVF conference on computer vision and pattern recognition workshops (pp. 702- 703). Deng, J., Dong, W., Socher, R., Li, L.J., Li, K. and Fei-Fei, L, 2009, June. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition (pp. 248-255). leee. Ding, X., Zhang, X., Ma, N., Han, J., Ding, G. and Sun, J., 2021. Repvgg: Making vgg-style convnets great again. In Proceedings of the IEEE / CVF conference on computer vision and pattern recognition (pp. 13733-13742). He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 770-778), 2016. Kingma, D.P., 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv: 1412.6980. Szegedy, C.; Vanhoucke, V.; Ioffe, S.; Shlens, J.; Wojna, Z. (2016). Rethinking the inception architecture for computer vision. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 2818-2826), 2016. Tan, M. and Le, Q., 2021 , July. Efficientnetv2: Smaller models and faster training. In International conference on machine learning (pp. 10096-10106). PMLR. Yosinski, J.; Clune, J.; Bengio, Y.; Lipson, H. How transferable are features in deep neural networks?. Advances in neural information processing systems, 27, 2014.

Claims

CLAIMS 1. A method for classifying oocysts of protozoa of the genus Eimeria that cause avian coccidiosis, characterized by the fact that it comprises: (a) capturing images of oocysts from fecal samples using a microscope; (b) process the images with an artificial intelligence model based on Convolutional Neural Networks (CNNs); (c) classify the oocysts into sporulated and non-sporulated categories; (d) to further classify the oocysts into stained and unstained categories; (e) identify the Eimeria species among the following: Eimeria acervulina, Eimeria brunetti, Eimeria maxima, Eimeria mitis, Eimeria necatrix, Eimeria praecox and Eimeria tenella.

2. Method, according to claim 1, characterized in that the CNN model used is EfficientNetV2, specifically the Large version, pre-trained on the ImageNet21k dataset and fitted in ImageNet1k, incorporating RandAugment for data augmentation.

3. Method, according to claim 1, characterized in that it further comprises generating a report with classification results, including oocyst species, coloration status and sporulation status, for the quantitative analysis of samples.

4. Method, according to claim 1, characterized in that microscope images are processed by applying pre-trained deep learning models for feature extraction and classification, improving performance and reducing overfitting.

5. Method, according to claim 1, characterized in that data augmentation techniques, including random transformations, such as Rotations, color adjustments, and cropping are applied during model training to improve the accuracy and generalization of classification.

6. A method, according to any of the preceding claims, characterized by the fact that it allows the rapid detection and identification of Eimeria sp. oocysts in samples, without the need for expensive equipment.

7. Method, according to claim 1, characterized in that the classification process is for vaccine production, ensuring that the proportions of oocysts of each species meet the predefined confidence intervals that are necessary for the effectiveness of the vaccine.

8. Method, according to claim 7, characterized in that the classification process is an integral part of quality control, research and development (R&D) studies and / or the technical aspects of the field.