Resistance and / or resistance mechanism prediction

EP4771640A1Pending Publication Date: 2026-07-08GRADIENTECH

Patent Information

Authority / Receiving Office
EP · EP
Patent Type
Applications
Current Assignee / Owner
GRADIENTECH
Filing Date
2024-08-23
Publication Date
2026-07-08

AI Technical Summary

Technical Problem

Current methods for predicting antibacterial susceptibility and resistance mechanisms in bacteria are time-consuming, typically requiring 16-24 hours for results, which is inadequate for prompt treatment intervention, especially for clinically challenging drug resistances.

Method used

A computer-implemented method and system that processes images of a 3D culture matrix of bacteria exposed to a concentration gradient of antibacterial agents, using machine learning to predict resistance and resistance mechanisms within a significantly shorter time frame, potentially as early as 4 hours.

Benefits of technology

Enables early prediction of antibacterial resistance and resistance mechanisms, allowing for timely treatment decisions and infection control measures, thereby reducing the risk of antibiotic-resistant bacteria spread.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SE2024050748_06032025_PF_FP_ABST
    Figure SE2024050748_06032025_PF_FP_ABST
Patent Text Reader

Abstract

Resistance to antibacterial agents and / or specific resistance mechanism of bacteria is predicted by processing, for each antibacterial agent of multiple antibacterial agents, an image set (1) of a plurality of images (2) of a 3D culture matrix (30) comprising the bacteria and over which a concentration gradient of the antibacterial agent is established The processing comprises defining, for each image (2), a plurality of image regions (3) along the concentration gradient, determining, for each image region (3), a parameter (4) representing a quantity of bacteria present in a region of the 3D culture matrix (30) imaged in the image region (3), and generating a data set (5) comprising the parameters (4) determined for the plurality of image regions (3) in the plurality of images (2). Any resistance and / or resistance mechanism is predicated based on the data sets (5) for the multiple antibacterial agents and a resistance and / or resistance mechanism predicting model (125). An early indication of probable antimicrobial resistance and / or presence of specific resistance mechanisms is thereby obtained. (Fig. 7)
Need to check novelty before this filing date? Find Prior Art

Description

[0001] RESISTANCE AND / OR RESISTANCE MECHANISM PREDICTION

[0002] TECHNICAL FIELD

[0003] The present invention generally relates to prediction of resistance and / or resistance mechanism of bacteria, and in particular to a method and system for such resistance and / or resistance mechanism prediction.

[0004] BACKGROUND

[0005] Antibiotic-resistant bacteria represent a growing global problem, as these bacteria are harder to treat with antibiotics. The generation time of bacteria can in many cases be very fast (around 20 minutes), and due to the short generation time, relative genetic instability of bacteria and high genetic mobility of resistance conveying elements between bacterial species, the bacteria may quickly acquire resistance towards antibiotics. There is an increasing prevalence of antibiotic-resistant bacterial infections in the human population, and increasingly these bacteria have even become multi-resistant, sometimes meaning that there are no efficient antibiotics available for treatment. These multi-resistant bacteria are a serious public health problem as patients infected with such bacteria may die since their bacterial infections cannot be treated. Since multi-resistant bacteria and specific multi-resistance conveying mobile genetic elements can spread rapidly throughout the community and healthcare systems, detection and monitoring of the bacteria and the elements is of high importance.

[0006] The traditional approaches for the identification and study of bacteria and their resistance to antibiotics have mainly been limited to phenotypic, growth-based methods, such as broth microdilution (BMD) where varying concentrations of the antibiotics and the bacteria to be tested are added to different wells of a microtiter plate, and agar diffusion methods where bacteria are added to agar plates with varying concentrations of the antibiotics either on the plate or between plates. After the allotted time, typically about 16-24 hours of incubation, the wells or plates are checked for bacterial growth by measuring the optical turbidity in the different wells or measuring which plates or regions of plates are conducive to growth.

[0007] The Kirby-Bauer test, which is basically an agar diffusion method, is a common variation. Here wafers or discs that contain bactericidal or bacteriostatic antibiotics of defined concentrations are placed on agar plates where bacteria have been spread. The agar plates are left to incubate and if an antibiotic stops the bacteria from growing or kills the bacteria, a zone of inhibition will become visible after incubation. The inhibition zone size is dependent on the diffusion rate of the antibiotics and the susceptibility to the antibiotic of the measured bacteria. This inhibition zone size is measured, and specific breakpoint tables can then be applied to categorize the bacteria into resistant (R), intermediate / increased exposure (I) or susceptible (S), which corresponds to the probability of treatment success using standard therapy.

[0008] A shortcoming with the Kirby-Bauer test is that it merely provides information whether the tested bacteria is susceptible (S), intermediate / increased exposure (I) or resistant (R) against the tested bacteria. It is generally not possible to get minimum inhibitory concentration (MIC) values. In microbiology, the MIC is the lowest concentration of an antibiotic that prevents visible growth of bacteria in a controlled test setup. Such MIC values can be determined using well dilution, e.g., BMD, or a so-called gradient strip test. The gradient strip test uses a rectangular strip impregnated with different concentrations of a test agent to be evaluated for its killing or growth inhibiting effect. In a typical approach, bacteria are spread in a two- dimensional (2D) culture on an agar plate, whereafter the gradient strip is placed on top of the agar plate. The gradient strip releases the test agent by diffusion and the growth inhibitory effects of the released test agent are typically inspected after 16-24 hours of incubation. The MIC value can then be read from the gradient strip to correspond to the point where the elliptical or drop-shaped inhibition zone intersects the scaling of the gradient strip.

[0009] There is sometimes a need to determine the specific type of resistance mechanism of the bacteria in order to correctly categorize the susceptibility and guide treatment, but also for infection control and public health purposes. The European Committee on Antimicrobial Susceptibility Testing (EUCAST) provides one example of guidelines for detection of resistance mechanisms in “EUCAST guidelines for detection of resistance mechanisms and specific resistances of clinical and / or epidemiological importance, Version 2.01 , July 2017”. Similar guidelines exist in the U.S., for example in “M100 Performance Standards for Antimicrobial Susceptibility Testing”, 33rdEdition, March 2023, published by the Clinical Laboratory Standards Institute (CLSI). The guidelines define which antibiotics to be tested, patterns of S / l / R category and the threshold MIC values or, in some cases inhibition zone size thresholds, to be used to screen for various resistance mechanisms that may be important for these purposes.

[0010] However, the gradient strip test, BMD test or Kirby-Bauer test generally requires at least about 16-24 hours of incubation before the MIC values or the inhibition zone sizes can be determined, which are needed in order to determine any resistance mechanism in accordance with the EUCAST guidelines. Especially in the case of clinically challenging drug resistances, such as carbapenemase-producing Enterobacteriaceae, extended-spectrum p-lactamase (ESBL)-producing Enterobacteriaceae, and methicillin-resistant Staphylococcus aureus (MRSA), prompt treatment intervention or infection control intervention is very important to protect both the patient, the hospital population and the society.

[0011] U.S. patent nos. 10,487,349 and 11 ,427,851 disclose a fluidic device having a culture chamber configured to house a 3D culture matrix comprising a culture of microorganisms. A concentration gradient of a test substance is established over the 3D culture matrix by providing respective fluid flows at different end portions of the culture chamber and comprising different concentrations of the test substance. The response of the microorganisms to the test substance is determined based on the position of a border zone in the 3D culture matrix.

[0012] U.S. patent application no. 2022 / 0169966 discloses a cassette assembly comprising a cover, two cassette halves and a slider comprising multiple test chambers. The cassette halves comprise waste tanks in fluid connection with reservoirs, prefilled in one of the cassette halves with test agents. The particular design of the cassette halves enable forming predefined volumes of liquid to achieve predefined concentrations of the test agents in the reservoirs in one of the cassette halves and liquid in the reservoirs in the other of the cassette halves. Gradients of the test agents can then be established over the multiple test chambers.

[0013] There is still a need for predicting antibacterial susceptibility / resistance and any resistance mechanisms of bacteria in a short period of time to enable an early selection of suitable antibiotic(s) to combat an infection caused by the bacteria, but also for infection control and / or public health purposes.

[0014] SUMMARY

[0015] It is a general objective to provide an early prediction of whether bacteria shows any resistance and / or is predicted to harbor a specific resistance mechanism against antibacterial agents.

[0016] This and other objectives are met by embodiments disclosed herein.

[0017] The present invention is defined in the independent claims. Further embodiments of the invention are defined in the dependent claims.

[0018] An aspect of the invention relates to a computer-implemented method for resistance and / or resistance mechanism prediction. The method comprising the steps of processing, for each antibacterial agent of multiple antibacterial agents, an image set of a plurality of images of a 3D culture matrix comprising bacteria of a sample and over which a concentration gradient of the antibacterial agent is established. The plurality of images are taken at different points in time. The processing step comprises defining, for each image of the plurality of images, a plurality of image regions along the concentration gradient. The processing step also comprises determining, for each image region of the plurality of image regions, a parameter representing a quantity of bacteria present in a region of the 3D culture matrix imaged in the image region. The processing further comprises generating a data set comprising the parameters determined for the plurality of image regions in the plurality of images. The method also comprises predicting any resistance to an antibacterial agent of the multiple antibacterial agents for the bacteria of the sample and / or any resistance mechanism harbored by the bacteria of the sample based on the data sets and a resistance and / or resistance mechanism predicting model trained for predicting resistance and / or resistance mechanism of bacteria based on input data sets.

[0019] Another aspect of the invention relates to a computer-implemented method for training a resistance and / or resistance mechanism predicting model. The method comprising the steps of, for each training image set of a plurality of training image sets processing, for each antibacterial agent of multiple antibacterial agents, the training image set of a plurality of training images of a 3D culture matrix comprising bacteria of a sample and over which a concentration gradient of the antibacterial agent is established. The plurality of training images are taken at different points in time. The processing step comprises defining, for each training image of the plurality of training images, a plurality of image regions along the concentration gradient. The processing step also comprises determining, for each image region of the plurality of image regions, a parameter representing a quantity of bacteria present in a region of the 3D culture matrix imaged in the image region and generating a data set comprising the parameters determined for the plurality of image regions in the plurality of training images. The method also comprises training the resistance and / or resistance mechanism predicting model based on the data set and information representative of any resistances to the multiple antibacterial agents for the bacteria of the sample and / or information representative of any resistance mechanism harbored by bacteria of the sample.

[0020] A further aspect of the invention relates to a system for resistance and / or resistance mechanism prediction. The system comprises a processing circuitry comprising at least one processor and a memory system comprising at least one memory comprising a resistance and / or resistance mechanism predicting model trained for predicting resistance and / or resistance mechanism of bacteria based on input data sets, and instructions executable by the at least one processor to cause the at least one processor to process, for each antibacterial agent of multiple antibacterial agents, an image set of a plurality of images of a 3D culture matrix comprising bacteria of a sample and over which a concentration gradient of the antibacterial agent is established. The plurality of images are taken at different points in time. The at least one processor is caused to process the image set by defining, for each image of the plurality of images, a plurality of image regions along the concentration gradient. The at least one processor is also caused to determine, for each image region of the plurality of image regions, a parameter representing a quantity of bacteria present in a region of the 3D culture matrix imaged in the image region. The at least one processor is further caused to generate a data set comprising the parameters determined for the plurality of image regions in the plurality of images. The at least one processor is additionally caused to predict any resistance to an antibacterial agent of the multiple antibacterial agents for the bacteria of the sample and / or any resistance mechanism harbored by the bacteria of the sample based on the data sets and the resistance and / or resistance mechanism predicting model.

[0021] Yet another aspect of the invention relates to a computer program comprising instructions, which when executed by at least one processor, cause the at least one processor to process, for each antibacterial agent of multiple antibacterial agents, an image set of a plurality of images of a 3D culture matrix comprising bacteria of a sample and over which a concentration gradient of the antibacterial agent is established. The plurality of images are taken at different points in time. The at least one processor is caused to process the image set by defining, for each image of the plurality of images, a plurality of image regions along the concentration gradient. The at least one processor is also caused to determine, for each image region of the plurality of image regions, a parameter representing a quantity of bacteria present in a region of the 3D culture matrix imaged in the image region. The at least one processor is further caused to generate a data set comprising the parameters determined for the plurality of image regions in the plurality of images. The at least one processor is additionally caused to predict any resistance to an antibacterial agent of the multiple antibacterial agents for the bacteria of the sample and / or any resistance mechanism harbored by the bacteria of the sample based on the data sets and a resistance and / or resistance mechanism predicting model trained for predicting resistance and / or resistance mechanism of bacteria based on input data sets.

[0022] A further aspect of the invention relates to a the computer program comprises instructions, which when executed by the at least one processor, cause the at least one processor to, for each training image set of a plurality of training image sets, process, for each antibacterial agent or multiple antibacterial agents, the training image set of a plurality of training images of a 3D culture matrix comprising bacteria of a sample and over which a concentration gradient of the antibacterial agent is established. The plurality of training images are taken at different points in time. The at least one processor is also caused to process the training image set by defining, for each training image of the plurality of training images, a plurality of image regions along the concentration gradient. The at least one processor is caused to determine, for each image region of the plurality of image regions, a parameter representing a quantity of bacteria present in a region of the 3D culture matrix imaged in the image region. The at least one processor is further caused to generate a data set comprising the parameters determined for the plurality of image regions in the plurality of images. The at least one processor is additionally caused to train the resistance and / or resistance mechanism predicting model based on the data set and information representative of any resistances to the multiple antibacterial agents for the bacteria of the sample and / or information representative of any resistance mechanism harbored by bacteria of the sample.

[0023] A related aspect of the invention defines a computer-readable storage medium comprising a computer program according to above.

[0024] The present invention enables a very early prediction or indication of any antibacterial resistance and / or specific resistance mechanism(s) of bacteria in a sample. The resistance and / or resistance mechanism prediction obtained according to the invention can thereby constitute an early warning that the bacteria have acquired a resistance mechanism making the bacteria resistant against one or more antibacterial agents. Such an early indication means that combative actions can be taken to treat a subject infected by the bacteria, but also restrict spread of the resistant bacteria throughout the population.

[0025] BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The embodiments, together with further objects and advantages thereof, may best be understood by making reference to the following description taken together with the accompanying drawings, in which:

[0027] Fig. 1 is a flow chart illustrating a computer-implemented method for resistance and / or resistance mechanism prediction according to an embodiment.

[0028] Fig. 2 is a flow chart illustrating the processing step in Fig. 1 according to an embodiment.

[0029] Fig. 3 is a flow chart illustrating the determining step in Fig. 2 according to an embodiment.

[0030] Fig. 4 is a schematic illustration of a system for resistance mechanism prediction according to an embodiment. Fig. 5 is schematic illustration of a cassette that can be used in the system according to an embodiment.

[0031] Fig. 6 is a schematic illustration of a test chamber comprising a 3D culture matrix according to an embodiment.

[0032] Fig. 7 is a schematic overview of the processing and predicting operations according to an embodiment.

[0033] Fig. 8 is a schematic illustration of a portion of the system for resistance mechanism prediction according to an embodiment.

[0034] Fig. 9 is a schematic illustration of a computer program implementation of the invention.

[0035] Fig. 10 schematically illustrates the image data used in the resistance and resistance mechanism predicting model, here for two antibiotics (CEP) and (CTA), with cell growth represented by whiteness, time on the vertical axis and antibiotic concentration on the horizontal axis. Each row is captured 10 minutes after the previous row. This figure also indicates that multiple antibiotics can be joined into one input image, in this case CEP and CTA, which would be used for the ESBL carrier prediction model based on EUCAST criteria.

[0036] Fig. 11 schematically illustrates the resistance and resistance mechanism predicting model, where the classification ability of the model to correctly predict susceptibility and resistance to either CEP or CTA over time is shown. The accuracy indicates fraction of correctly predicted S / l or R bacterial strains in a large collection of tested clinical isolates. Each cycle is 10 minutes.

[0037] Fig. 12 schematically illustrates the probability rating of the resistance and resistance mechanism predicting model for predicting either R for CEP or CTA (left side) or S / l (right side) for each individual tested bacterial strain. White circles indicate falsely predicted S or R bacteria, and black indicate correctly predicted, using a threshold of 0.5. Each cycle is 10 minutes.

[0038] Fig. 13 schematically illustrates the resistance and resistance mechanism predicting model, where the classification ability of the model to correctly predict resistance for each antibiotic on a panel of 12 antibiotics (AMI, CEP, CIP, COL, CTA, CTV, CTZ, MER, GEN, PIT, TIG, TOB). The model performance varies over the type of antibiotic. Each cycle is 10 minutes. Fig. 14A schematically illustrates the resistance and resistance mechanism predicting model, where the classification ability of the model to correctly predict ESBL resistance by the EUCAST criteria (R to either CTA or CTZ), and Fig. 14B illustrates the probability rating of the model for predicting either ESBL for each individual tested bacterial strain. White circles indicate falsely predicted ESBL bacteria, and black indicate correctly predicted, using a threshold of 0.5. Each cycle is 10 minutes.

[0039] Fig. 15 illustrates the results of validating the resistance and resistance mechanism predicting model on a dataset of 175 bacterial isolates, 18 different bacterial species, indicating time until threshold accuracy (85 or 90%) for individual prediction of resistance to CTA, CTZ or overall for 12 antibiotics (left); and accuracy and time until threshold accuracy specifically for detection of probable ESBL carriage (right).

[0040] Fig. 16 illustrates the results of validating the resistance and resistance mechanism predicting model on a dataset of 175 bacterial isolates, 18 different bacterial species, indicating the mean prediction accuracy over a panel of 12 antibiotics (AMI, CEP, CIP, COL, CTA, CTV, CTZ, MER, GEN, PIT, TIG, TOB).

[0041] Fig. 17 illustrates the difference in accuracy by varying the CNN model used for resistance classification, in this case the difference between the pre-trained open-source model MobileNetV2 (left) and a custom CNN model (right).

[0042] Fig. 18 is a schematic overview of Convolutional Neural Net (CNN) model structure that can be used for the resistance and / or resistance mechanism predicting model.

[0043] Fig. 19 is a flow chart illustrating a computer-implemented method for training a resistance and / or resistance mechanism predicting model according to an embodiment.

[0044] DETAILED DESCRIPTION

[0045] Throughout the drawings, the same reference numbers are used for similar or corresponding elements.

[0046] The present invention generally relates to prediction of resistance and / or resistance mechanism of bacteria, and in particular to a method and system for such resistance and / or resistance mechanism prediction.

[0047] The increasing prevalence of antibiotic-resistant bacteria, and in particular multi-resistant bacteria that may cause infections in humans and / or animals, such as livestock or pets, is a major health issue throughout the world. The introduction of resistance mechanisms against antibiotics in bacteria means that there will be few or even no efficient antibiotics available for treatment if the bacteria cause infections in humans and / or animals. This may have severe consequences not only for the particular subject infected by the antibiotic-resistant bacteria but also for general infection control and public health if the antibiotic-resistance-bacteria are allowed to spread throughout the population.

[0048] There is, accordingly, an urgent need to as quickly as possible get an indication of whether bacteria causing an infection in a subject is resistant to or has acquired any specific resistance mechanism against antibiotics. Such an early indication is not only beneficial for the actual subject in terms of as effectively as possible combat the infection caused by the bacteria but also for infection control and / or public health purposes. In particular, if the bacteria are predicted to be resistant against one or more antibiotics, or harbor a specific resistance mechanism, then it may be important to isolate the subject or at least take restrictive measures to prevent, or at least reduce the risk of, spread of the antibiotic-resistance bacteria or resistance mechanisms to other subjects potentially causing public health issues.

[0049] The currently recommended methods for detecting resistance mechanisms in bacteria, such as presented by EUCAST, require determination of MIC values for various antibiotics and / or inhibition zone sizes when using disk diffusion methods, such as the Kirby-Bauer test. However, the commonly used methods for determining MIC values or inhibition zone sizes at the clinics and test laboratories require at least 16-24 hours of culturing. Such a long incubation time may have severe consequences not only for the actual subject infected by the bacteria but also for infection control since the subject might spread the infection until any resistance mechanisms in the bacteria are confirmed.

[0050] The present invention provides an early indication or prediction of any resistance to an antibacterial agent and / or any resistance mechanism harbored by the bacteria in a significantly shorter period of time than 16-24 hours. In fact, the present invention may provide an early warning of a predicted resistance and / or resistance mechanism within about 4 hours, or even shorter as shown in the Example section herein. An early prediction of resistance and / or resistance mechanism means that actions can be taken at an earlier stage to try to treat the infection, but also restrict spread of the infection throughout the population.

[0051] The invention is based on the combination of machine learning (ML) and image processing to predict resistances and / or resistance mechanisms in bacteria of a sample based on image data of bacteria cultured in a three-dimensional (3D) culture matrix and exposed to a concentration gradient of antibacterial agents. Processing such images to generate a data set that is input into a resistance and / or resistance mechanism predicting model enables an early warning of any resistance and / or any resistance mechanism prediction at a point in time before MIC values can be determined.

[0052] “Antibacterial agent” as used herein relates to any molecule, compound, composition or other agent that kills bacterial cells (bactericide) or stops, or at least reduces, growth of bacterial cells (bacteriostat). Typical, but non-limiting, examples of such antibacterial agents include drugs or medicaments, including prodrugs, such as antibiotics or other antibacterials. Illustrative, but non-limiting, examples of such antibacterial agents include penicillin, cephalosporins, polymyxins, rifamycins, lipiarmycins, sulfonamides, lincosamides, 0-lactams, macrolides, quinolones, tetracyclines and aminoglycosides.

[0053] An aspect of the invention, thus, relates to a computer-implemented method for resistance and / or resistance mechanism prediction, see Figs. 1 and 7. The method starts in step S1. This step S1 is performed for each antibacterial agent of multiple, i.e., at least two, antibacterial agents, which is schematically indicated by the loop L1 in Fig. 1. Step S1 comprises processing an image set 1 of a plurality of images 2 of a 3D culture matrix 30, see Fig. 6, comprising bacteria of a sample and over which a concentration gradient of the antimicrobial agent is established. The plurality of images 2 are taken at different points in time as schematically indicated by the arrow in Fig. 7. The processing in step S1 is preferably performed as shown in Fig. 2. Step S2 in Fig. 2 comprises defining a plurality of image regions 3 along the concentration gradient. This step S2 is performed for each image 2 of the plurality of images 2, which is schematically represented by the loop L2 in Fig. 2. A next step S3 comprises determining a parameter 4 representing a quantity of bacteria present in a region of the 3D culture matrix 30 imaged in an image region 3. This step S3 is then performed for each image region 3 of the plurality of image regions 3 defined in step S2, which is schematically illustrated by the loop L3 in Fig. 2. A following step S4 comprises generating a data set 5 comprising the parameters 4 determined for the plurality of image regions 3 in the plurality of images 2. The method then continues to step S5 in Fig. 1 , which comprises predicting any resistance to an antibacterial agent of the multiple antibacterial agents for the bacteria of the sample and / or any resistance mechanism harbored by the bacteria of the sample based on the data sets 5 and a resistance and / or resistance predicting model trained for predicting resistance and / or resistance mechanism of bacteria based on input data sets.

[0054] The computer-implemented method thereby starts with multiple image sets 1 that are processed in step S1 , and in particular as shown in Fig. 2, to generate data sets 5 that are input into the resistance and / or resistance predicting model in step S5 to predict any resistance and / or any resistance mechanism of the bacteria. The resistance and / or resistance predicting model thereby outputs a prediction or indication of whether the bacteria shows resistance to any of the tested antibacterial agents and / or has acquired a specific resistance mechanism, as defined by being resistant against one or more specific antibacterial agents. The prediction output by the resistance and / or resistance prediction model can thereby be used as an early warning that it is likely that the bacteria comprise or harbor a specific resistance mechanism, such as ESBL, which might warrant therapy intervention or public health interventions.

[0055] The method as shown in Fig. 1 and the resistance and / or resistance mechanism predicting model used therein could be employed for predicting resistance to any of the tested antibacterial agents for the bacteria, predicting any resistance mechanism harbored by the bacteria or predicting both any antibacterial resistance and resistance mechanism.

[0056] Hence, in an embodiment, the method as shown in Fig. 1 is a computer-implemented method for resistance prediction. In such an embodiment, step S5 comprises predicting any resistance to an antibacterial agent of the multiple antibacterial agents for the bacteria of the sample based on the data sets 5 and a resistance predicting model trained for predicting resistance of bacteria based on input data sets.

[0057] In another embodiment, the method as shown in Fig. 1 is a computer-implemented method for resistance mechanism prediction. In such an embodiment, step S5 comprises predicting any resistance mechanism harbored by the bacteria of the sample based on the data sets 5 and a resistance mechanism predicting model trained for predicting resistance mechanism of bacteria based on input data sets.

[0058] In a further embodiment, the method as shown in Fig. 1 is a computer-implemented method for resistance and resistance mechanism prediction. In such an embodiment, step S5 comprises predicting any resistance to an antibacterial agent of the multiple antibacterial agents for the bacteria of the sample and any resistance mechanism harbored by the bacteria of the sample based on the data sets 5 and a resistance and resistance predicting model trained for predicting resistance and resistance mechanism of bacteria based on input data sets.

[0059] Resistance mechanism of bacteria as used herein means that the bacteria are resistant against one or more antibacterial agents, including resistant against one or more groups of antibacterial agents. Such a resistance mechanism typically involves that the bacteria comprises genetic material, such as in its genome and / or extragenomic material, e.g., one or more plasmids, comprising gene(s) encoding for one or more enzymes capable of hydrolyzing or otherwise metabolizing and thereby neutralizing one or more antibacterial agents. Alternatively, or in addition, the bacteria may encode and express modified forms of so-called penicillin-binding proteins (PBPs), for which the antibacterial agent or agents has or have lower affinity as compared to the wild-type versions of the PBPs. A multitude of other potential genes exist that convey resistance to specific antibiotics.

[0060] Hence, the bacteria are thereby capable of expressing one or more such enzymes or modified proteins that can protect the bacteria against one or more antibacterial agents and / or lower effectiveness of the one or more antibacterial agents.

[0061] In an embodiment, predicting any resistance mechanism harbored by the bacteria of the sample comprises predicting presence of any gene encoding an enzyme capable of hydrolyzing or metabolizing at least one antibacterial agent of the multiple antibacterial agents and / or any gene encoding a modified penicillin-binding protein, for which at least one antibacterial agent of the multiple antibacterial agents has lower affinity as compared to a wild-type version of the penicillin-binding protein.

[0062] Illustrative, but non-limiting, examples of such resistance mechanisms include carbapenemases, extended-spectrum p-lactamase (ESBL), Ambler class C (AmpC) p-lactamases, and modified penicillin- binding proteins. Carbapenemases are p-lactamases that hydrolyze penicillins, in most cases cephalosporins, and to various degrees carbapenems and monobactams. As an example, carbapenemase-producing Enterobacteriaceae (CPE) usually have decreased susceptibility to carbapenems, and in most cases are resistant to extended-spectrum (oxyimino) cephalosporins, i.e., cefotaxime, ceftriaxone, ceftazidime and / or cefepime. ESBLs are enzymes that hydrolyze most penicillins and cephalosporins, including oxyimino-p-lactam compounds, such as cefuroxime, third- and fourthgeneration cephalosporins and aztreonam, but neither cephamycins nor carbapenems. Most ESBLs belong to the Ambler class A of p-lactamases. AmpC-type cephalosporinases hydrolyze penicillins, cephalosporins, including the third-generation but generally not the fourth-generation compounds, and monobactams. Methicillin resistant Staphylococcus aureus (MRSA) are bacteria with an auxiliary PBP (PBP2a / PBP2c encoded by mecA or mecC genes) for which p-lactam agents have low affinity. Vancomycin-resistant S. aureus, Enterococcus faecium and E. faecalis show resistance to vancomycin, whereas penicillin non-susceptible (non-wild type) Streptococcus pneumoniae are isolates with reduced susceptibility to penicillin due to the presence of modified PBPs with lower affinity for [3-lactams.

[0063] Hence, depending on the particular of antibacterial agents the bacteria are exposed to, the resistance and / or resistance predicting model used in step S5 in Fig. 1 could thereby predict the bacteria to be, for instance, carbapenemase-producing bacteria, ESBL-producing bacteria, AmpC p-lactamase-producing bacteria, methicillin-resistant bacteria, vancomycin-resistant bacteria, or penicillin non-susceptible bacteria, depending on the specific pattern of resistances that are detected in the sample.

[0064] Predicting resistance as used herein of an antibacterial agent for the bacteria of the sample could involve predicting the bacteria to be resistant (R) against the particular antibacterial agent, i.e., cannot be treated with the antibacterial agent, susceptible (S) to the particular antibacterial agent, i.e., can be treated with the antibacterial agent, or intermediate (I), i.e., may be treatable with the antibacterial agent but may require adjusted dosage. Alternatively, predicting resistance could involve predicting the bacteria to be resistant (R) against the particular antibacterial agent or be susceptible / intermediate (S / l).

[0065] The processing step S1 in Fig. 1 comprises multiple image sets 1 , in particular one such image set 1 per antimicrobial agent as schematically shown in Fig. 7. Each image set 1 comprises a plurality of images 2 taken of a 3D culture matrix 30 comprising bacteria of a sample to be tested.

[0066] The sample could be any sample comprising bacteria or suspected to comprise bacteria. The sample is preferably a fluid or liquid sample, and in particular a body fluid sample, such as a body fluid sample taken from a subject. The body fluid sample could then be used directly as taken from the subject but may alternatively be a so-called processed body fluid sample taken from a subject. Various types of processing can be applied to the body fluid samples including, but not limited to, incubation, centrifugation, concentration, filtration, dilution, etc. Non-limiting, but illustrative, examples of such body fluid samples include urine, blood, plasma, serum, amniotic fluid, cerebrospinal fluid, lymph, saliva and synovial fluid. Alternatively, the sample could be a solid body sample, such as a biopsy, in which bacterial cells of the solid body sample have been suspended or dispersed in a liquid, such as a culture medium.

[0067] The sample can be added to 3D culture matrices 30 or to one or more gel suspensions that is or are allowed to polymerize into the 3D culture matrices 30. Such 3D culture matrices 30 constitute an efficient tool to quickly determine the response of any bacteria in the sample to the antimicrobial agents. Firstly, a steady-state concentration gradient of the relevant antibacterial agent can quickly and accurately be established over at least a portion of the 3D culture matrix 30. This means that a continuous range of antibacterial agent concentrations is established from a high concentration at one of the matrix sides 32 of the 3D culture matrix 30 down to a low or zero concentration at another matrix side 33 of the 3D culture matrix 30. Hence, bacteria in the 3D culture matrix are exposed to a continuous range of concentrations of the antibacterial agent. Secondly, the bacteria are cultured in a 3D culture matrix 30. Accordingly, the bacteria are allowed to grow in three dimensions. This in turn provides a significant difference between areas of the 3D culture matrix 30 where viable and growing bacteria are present and areas with cell death or low growth. Accordingly, an enhanced signal-to-noise ratio can be achieved when taking images 2 of the 3D culture matrix 30. Hence, it is much easier to differentiate between different areas, regions or zones in the 3D culture matrix 30 as compared to growing bacteria as a biofilm on a 2D surface where fewer bacteria can be grown and, thus, lower detection signals are generated. A concentration gradient of the antibacterial agent can quickly be established over at least a portion of the 3D culture matrix 30. This together with the possibility of bacteria growth in three dimensions enables monitoring the response of the bacteria to the antimicrobial agent in a very short time, generally within one or at most a few hours.

[0068] Accordingly, a plurality of images 2 are taken of the multiple 3D culture matrices 30 at different points in time while the bacteria are exposed to the concentration gradients of the antibacterial agents. The images 2 could be taken shortly following adding the antibacterial agents to the 3D culture matrices, i.e., before the concentration gradients have been fully established, and then at different points in time during the establishment or creation of the concentration gradients in addition to when the concentration gradients have been established over the 3D culture matrices 30. Alternatively, the images of the 3D culture matrices 30 are taken first when concentration gradients have been successfully established over the 3D culture matrices 30.

[0069] In an embodiment, the plurality of images 2 in each image set 1 have been taken at predefined time points, such as from the start point of adding the antibacterial agents to the 3D culture matrices 30 or some other defined start point. These predefined time points could, for instance, be in the form of time cycles of predefined durations, such as taking images 2 every Nthminute for some predefined value of N, such as every minute, every second minute, every fifth minute, every tenth minute, every 15thminute, etc. Alternatively, the predefined time points do not necessarily have to be regular time points but could be some other time points from the starting point, such as at 1 minute, 5 minutes, 10 minutes, 15 minutes, 30 minutes, 45 minutes, 60 minutes, 90 minutes, 120 minutes, etc. from the starting point.

[0070] Each image set 1 comprises a plurality of images 2 taken at different points in time as the bacteria are exposed to the concentration gradient of the antibacterial agent and optionally also during establishment of the concentration gradient. Generally, each image set 1 comprises at least three images 2, preferably at least four images 2, more preferably at least five images 2, or even more. Images 2 are preferably taken of the multiple 3D culture matrices 30 at the same time intervals or predefined time points. It is, though, possible to use different time points for taking images 2 of 3D culture matrices 30 having concentration gradients of different antibacterial agents. A reason for such an approach could be that different antibacterial agents diffuse through the 3D culture matrix 30 at different rates so that establishment of the concentration gradients over the 3D culture matrices 30 take longer or shorter time for different antibacterial agents. In such a case, the time points for taking the images 2 are preferably selected based on the particular antibacterial agent and its diffusion rate through the 3D culture matrix 30.

[0071] In a particular embodiment, the plurality of images 2 of the image set 1 are taken of the 3D culture matrix 30 at different points in time from start of establishing the concentration gradient of the antibacterial agent up to 4 hours from start of establishing the concentration gradient of the antibacterial agent. Preferably, the images 2 are taken from start of establishing the concentration gradient of the antibacterial agent up to 3.5 hours from start of establishing the concentration gradient of the antibacterial agent, such as from start of establishing the concentration gradient of the antibacterial agent up to 3 hours from start of establishing the concentration gradient of the antibacterial agent. As an example, the images 2 may be taken from start of establishing the concentration gradient of the antibacterial agent up to 2.5 hours from start of establishing the concentration gradient of the antibacterial agent or even during a shorter period of time. Hence, the prediction of any existence resistance mechanism of the bacteria can be available within 4 hours, preferably within 3.5 hours, such as within 3 hours, or within 2.5 hours from the start of establishing the concentration gradients of the multiple antibacterial agents.

[0072] Hence, the resistance prediction and / or resistance mechanism prediction of the invention provides a very early indication or warning of any resistance and / or any resistance mechanism in the tested bacteria, and at a much earlier point in time as compared to the prior art techniques requiring determination of MIC values or inhibition zone sizes before assessing any such resistance mechanism.

[0073] Therefore, in an embodiment, step S5 in Fig. 1 comprises predicting any resistance and / or any resistance mechanism of the bacteria of the sample based on the data sets 5 and the resistance and / or resistance mechanism predicting model but without knowledge of any MICs of the bacteria with regard to the multiple antibacterial agents and without determining any MICs of the bacteria with regard to the multiple antibacterial agents. As is more clearly shown in Fig. 6, each 3D culture matrix 30 has a first matrix side 32 in fluid connection with a first fluid channel 26 comprising a first fluid, such as liquid, with the antibacterial agent at a first concentration and a second matrix side 33 opposite to the first matrix side 32. This second matrix side 33 is in fluid connection with a second fluid channel 27 comprising a second fluid, such as liquid, lacking the antibacterial agent or with the antibacterial agent a second concentration that is lower than the first antibacterial agent.

[0074] Hence, in a preferred embodiment, opposite matrix sides 32, 33 of each 3D culture matrix 30 are in fluid connection with a respective fluid channel 26, 27 comprising a respective fluid, such as liquid. The fluids are preferably a culture medium that supports growth of the bacteria in the sample. In such a case, the first fluid channel 26 functions as a source channel, whereas the second fluid channel 27 is a so-called sink channel. Correspondingly, the first matrix side 32 in fluid connection with the first fluid channel 26 will act as a source side, which has higher concentration of the antimicrobial agent relative to the second matrix side 33, acting as a sink side. The antibacterial agent will thereby diffuse from the first fluid in the first fluid channel 26 into the 3D culture matrix 30 through the first matrix side 32 and through the 3D culture matrix 30 and out from the second matrix side 33 and into the second fluid in the second fluid channel 27. In a preferred embodiment, the flow rates of the fluids in the fluid channels 26, 27 on either side 32, 33 of the 3D culture matrix 30 are preferably kept substantially similar since then no flow of the fluid is present through the 3D culture matrix 30. Substantially similar indicates that the two flow rates are preferably identical but can differ slightly due to inherent variations in the flow rate of any pumping systems. Thus, the difference in flow rate is preferably less than 10 %, more preferably less than 5 %, such as less than 2.5 % and most preferably less than 1 %. As a consequence, the concentration gradient of the antibacterial agent will be established over the 3D culture matrix 30 from the first or source matrix side 32 towards the second or sink matrix side 33.

[0075] The upper images 2 in Fig. 7 schematically illustrate the consequences of the concentration gradient to the bacteria in the 3D culture matrix 30. Bacteria colonies are visible as white dots in the images 2. As can be seen in these images 2, the number of the bacterial colonies is higher and sizes of the bacterial colonies are larger on the sink side (to the left of the images 2), whereas no bacterial colonies are visible on the source side (to the right of the images 2).

[0076] The plurality of images 2 are then processed as shown in step S2 in Fig. 2 by defining a plurality of image regions 3 along the concentration gradient. These image regions 3 are therefore defined along a direction of the concentration gradient, i.e., from high concentration towards low concentration, or vice versa. With reference to Fig. 6, these image regions 3 are, thus, defined along a direction between the first matrix side 32 and the second matrix side 33.

[0077] The figure on the top to the right in Fig. 7 schematically illustrates the segmentation of an image 2 into a plurality of image regions 3 along the direction of the concentration gradient. The different image regions 3 defined in step S3 preferably have substantially an equal size, i.e., captures substantially equally sized portions of the 3D culture matrix 30. For instance, the image 2 of the 3D culture matrix 30 could be divided or segmented into a predefined number of, preferably equally sized, image regions 3.

[0078] A respective parameter or parameter value 4 is then determined for each such defined image region 3 of an image 2 in step S3 of Fig. 2. The parameter or parameter value 4 then represents a quantity of bacteria present in a region of the 3D culture matrix 30 imaged in the particular image region 3. Hence, the parameter 4 will, for susceptible bacteria, generally have a higher value for the image region 3 closest to the second or sink matrix side 33 of the 3D culture matrix 30 as compared to the image region 3 closest to the first or source matrix side 32 of the 3D culture matrix 30.

[0079] The parameter 4 is preferably proportional to the quantity of bacteria or to the biomass of the bacteria present in a region of the 3D culture matrix 30 imaged in the image region 3.

[0080] The parameters 4 could be determined in various ways. For instance, a light detector, such as a camera or a combination of a microscope and camera, may be used to take images 2 of the 3D culture matrices 30. An optional, but preferred, light source may then be used to illuminate the 3D culture matrices 30 as the light detector takes the images 2. In such a case, bacterial cultures in the 3D culture matrices 30 scatter the light, which appears as white dots in the images 2. In such a case, the image sensor of the light detector, such as in the form of complementary metal-oxide semiconductor (CMOS) chip or a charged coupled device (CCD) chip, could detect these scattered photons from the bacterial colonies in the 3D culture matrices 30. The parameter 4 could then be determined based on the scattered photons detected by the image sensor within an image region 3, such as based on counting the scattered photons within the image region 3. Hence, in an embodiment, the parameter 4 could be determined based on scattered light or scattered photons.

[0081] The parameter 4 will thereby represent the quantity of bacteria, such as in terms of biomass of the bacteria, in a region of the 3D culture matrix 30 imaged in the image region 3. In an embodiment, step S3 in Fig. 2 comprises determining the parameter 4 representing a normalized quantity of bacteria, such a normalized biomass of bacteria, present in the region of the 3D culture matrix 30 imaged in the image region 3.

[0082] Fig. 3 is a flow chart illustrating an embodiment of step S3 in Fig. 2. The method continues from step S2 in Fig. 2. A next step S10 comprises detecting bacterial biomass present in the region of the 3D culture matrix imaged in the image region 3. A next step S11 comprises normalizing the detected bacterial biomass.

[0083] The normalization in step S11 can be performed according to various embodiments.

[0084] In a first embodiment, the detected bacterial biomass, such as represented by the counted scattered photons within the image region 3, is normalized by the total bacterial biomass detected within the image 2, i.e. , for all of the plurality of image regions 3 defined for the image 2 in step S2 in Fig. 2, such as represented by the sum of the scattered photons counted for the plurality of the image regions 3.

[0085] In a second embodiment, the detected bacterial biomass, such as represented by the counted scattered photons within the image region 3, is normalized by an average or median bacterial biomass detected within the image 2, such as represented by the average or median of scattered photons counted for the different image regions 3 in the image 2.

[0086] In these two embodiments, the same normalization value is used for all image regions 3 within an image 2 but different normalization values may be used for different images 2 in the image set 1.

[0087] In a third embodiment, the detected bacterial biomass, such as represented by the counted scattered photons within the image region 3, is normalized by an average or median of the total bacterial biomass detected within each image 2 of the image set 1 . Hence, in this embodiment, the respective total bacterial biomasses detected within each image 2 of the image set 1 are determined and then the average or the median thereof is determined and used to normalize the detected bacterial biomass in step S11 .

[0088] In a fourth embodiment, the detected bacterial biomass, such as represented by the counted scattered photons within the image region 3, is normalized by an average or median of the bacterial biomass detected within the images 2 of the image set 1. In this embodiment, the average or median bacterial biomass is determined for all images 2 within the image set 1 and used to normalize the detected bacterial biomass in step S11.

[0089] In a fifth embodiment, the detected bacterial biomass, such as represented by the counted scattered photons within the image region 3, is normalized by the averages or medians of the bacterial biomass detected within the images 2 of the image set 1. In this embodiment, the average or median bacterial biomass is determined for each images 2 within the image set 1 and the average or median of these average or median bacterial biomasses is used to normalize the detected bacterial biomass in step S11 .

[0090] In these three embodiments, the same normalization value is used for all image regions 3 within all images 2 of the image set 1 .

[0091] Alternatives to the third to fifth embodiments could be to calculate the average or median of the total bacterial biomass or the average or median of the bacterial biomass in some other collection of images of 3D culture matrices. For instance, a training set of images of such 3D culture matrices is typically used to train the resistance and / or resistance mechanism predicting model, which is further described herein. In such a case, the normalization value used in step S11 to normalize the detected bacterial biomass could be calculated or otherwise obtained from the images in the training set.

[0092] The normalization value used to normalize the detected bacterial biomass could be an agent-specific normalization value. In such a case, the agent-specific normalization value is determined, such as in accordance with any of the above-described embodiments, based on one or more images 2 of one or more 3D culture matrices 30 over which concentration gradients of the same antibacterial agent are established.

[0093] In another embodiment, the normalization value is not agent-specific but rather a general or common normalization value. Such a general or common normalization is then determined, such as in accordance with any of the above-described embodiments, based on images 2 of 3D culture matrices 30 over which concentration gradients of different antibacterial agents are established.

[0094] In either case, the method then preferably continues to step S12, which comprises converting the normalized detected bacterial biomass into a grayscale value. The method then continues to step S4 in Fig. 2. A grayscale value is a value ranging from a minimum value, typically zero, representing black up to a maximum value, typically 2n-1 , representing white. The maximum value is 255 in the case of n=8, i.e., using 8 bits for representing the grayscale value and thereby the parameter 4 per image region 3. Other maximum values are possible for other values of n.

[0095] In this embodiment, step S4 of Fig. 5 comprises generating a two-dimensional (2D) data set 5 comprising the parameters 4 with the plurality of image regions 3 in one dimension and time in the other dimension. This 2D data set 5 could thereby be regarded as a grayscale image as schematically shown in the lower right part of Fig. 7. The grayscale image 5 then comprises a plurality of image elements or pixels each having a respective grayscale value as determined in step S12 in Fig. 3. One of the dimensions in the grayscale image 5 is then time whereas the other is the particular position of an image region 3 in an image 2. For instance, time could be along the y-axis as shown in Fig. 7, i.e., along the columns. In such a case, each row in the grayscale image comprises grayscale values 4 determined for the image regions

[0096] 3 in a given image 2. Correspondingly, each column in the grayscale image comprises grayscale values

[0097] 4 determined for a given image region 3 but in different images 2. Hence, pixel (a, b) comprises the grayscale value determined for image number a among the plurality of images 2 in the image set 1 and image region number b in that image 2. It is also possible to switch the dimensions for time, i.e., image number in the image set 1 , and image region 3, i.e., image region number within the images 2, so that time is along the rows rather than along the columns.

[0098] In this embodiment, the processing of the image sets 1 has transformed each image set 1 of a plurality of images 2 of the 3D culture matrix 30 comprising bacteria of the sample and over which a concentration gradient of an antibacterial agent is established into a grayscale image 5 with grayscale values 4 representing normalized quantity of bacteria, in particular normalized bacterial biomass, in different image regions 3 of the images 2.

[0099] Each image set 1 generates such a grayscale image 5 and, hence, a respective grayscale image 5 is generated for each antibacterial agent of the multiple antibacterial agents. The different grayscale images

[0100] 5 for the different image sets 1 and therefore for the different antibacterial agents may, alternatively, be combined into a combined grayscale image by arranging the different grayscale images next to each other or one above the other as schematically shown in Fig. 10.

[0101] In an embodiment, the grayscale images 5 are optionally scaled or rescaled to a target size in terms of the number of pixels, e.g., PxQ pixels for some predefined positive values P, Q. The separate grayscale images 5 or the combined grayscale image are or is then input to the resistance and / or resistance mechanism predicting model in step S5 to predict any resistance and / or resistance mechanism of the bacteria in the sample.

[0102] The resistance and / or resistance mechanism predicting model is preferably a computer-implemented, and more preferably, a ML-implemented, resistance and / or resistance mechanism predicting model for predicting resistance and / or resistance mechanisms of bacteria based on input data sets, such as input grayscale images 5.

[0103] The resistance and / or resistance mechanism predicting model used in step S5 can be implemented according to various embodiments. For instance, the resistance and / or resistance mechanism predicting model could be in the form of a ML model. Generally, ML algorithms build a mathematical model based on training data, i.e., input data sets, such as grayscale images 5, in order to make predictions or decisions without being explicitly programmed to do so. There are various types of ML algorithms that differ in their approach, the type of data they input and output, and the type of task or problem that they are intended to solve. Illustrative, but non-limiting, examples of such ML algorithms include supervised learning algorithms, unsupervised learning algorithms, semi-supervised learning algorithms, reinforcement learning algorithms, self-learning algorithms, feature learning algorithms, sparse dictionary learning algorithms, anomaly detection algorithms, and association rule learning algorithms.

[0104] Performing machine learning involves creating a model, which is trained on training data and can then process additional data to make predictions or decisions. Various types of ML models could be used according to the embodiments, including, but not limited to artificial neural networks, decision trees, support vector machines, regression analysis, Bayesian networks and Genetic algorithms.

[0105] Furthermore, deep learning, also known as deep structured learning, is a ML method based on artificial neural networks with representation learning. Learning can be supervised, semi-supervised or unsupervised. Deep learning architectures, such as deep neural networks, deep belief networks, recurrent neural networks and convolutional neural networks, could be used to train and implement the volume predicting model. "Deep" in deep learning comes from the use of multiple layers in the network. Deep learning is concerned with an unbounded number of layers of bounded size, which permits practical application and optimized implementation, while retaining theoretical universality under mild conditions. In deep learning the layers are also permitted to be heterogeneous and to deviate widely from biologically informed connectionist models, for the sake of efficiency, trainability and understandability.

[0106] The resistance and / or resistance mechanism predicting model is trained to predict resistance and / or resistance mechanism of bacteria based on training data sets from training image sets of training images taken on 3D culture matrices comprising bacteria for which any resistance and / or any resistance mechanism is known or determined, such using prior art methods, for instance phenotypic as recommended by EUCAST or other organizations, or molecular / genetic typing. The resistance and / or resistance predicting model is thereby trained by a plurality of training image sets for different antibacterial agents and for different bacterial strains. In more detail, a respective training image set is obtained for a respective combination of a bacterial strain and an antibacterial agent. In such a case, the different training image sets each comprises a plurality of training images of a 3D culture matrix comprising bacteria of the bacterial strain and over which a concentration gradient of the antibacterial agent is established. The plurality of training images in a training image set are taken at different points in time. Each training image set is then processed as described herein in connection with Figs. 1 to 3 to generate a respective training data set, such as in the form of a training grayscale image. In addition, information of any resistance and / or any resistance mechanism for bacterial strains tested in the training image sets is available, for instance as recommended by EUCAST.

[0107] The resistance and / or resistance mechanism predicting model is then trained on the training data sets, such as training grayscale images, together with the determined information of any resistance and / or resistance mechanism for the bacterial strains. This means that the resistance and / or resistance predicting model is trained to predict any resistance and / or resistance mechanism of bacteria based on input data sets, such as one or more grayscale images.

[0108] In a particular embodiment, the resistance and / or resistance predicting model is a computer-implemented artificial neural network (NN) resistance and / or resistance predicting model, and preferably a computer- implemented convolutional neural network (CNN) resistance and / or resistance mechanism predicting model.

[0109] A CNN is a class of ANN that is well suited to analyze visual imagery. CNNs are regularized versions of multilayer perceptrons. Multilayer perceptrons usually mean fully connected networks, that is, each neuron in one layer is connected to all neurons in the next layer. The "full connectivity" of these networks make them prone to overfitting data. CNNs take advantage of the hierarchical pattern in data and assemble patterns of increasing complexity using smaller and simpler patterns embossed in their filters in order to prevent overfitting. The CNN network learns to optimize the filters (or kernels) through automated learning, whereas in traditional algorithms these filters are hand-engineered. This independence from prior knowledge and human intervention in feature extraction is a major advantage.

[0110] An example of a CNN model that could be used according to the embodiments is MobileNetV2 (https: / / arxiv.org / abs / 1801.04381), which is an open-source CNN optimized for platforms with limited computing power, such as mobile phones. It can optionally be pre-trained on general image characteristics, so that less training data is needed to obtain classification accuracy for the desired image types.

[0111] Another example of a CNN model that can be used according to the embodiments is based on the following model structure:

[0112] # Convolutional layers model. add(Conv2D(32, (3, 3), activation='relu', input_shape=(224, 224, 3))) model. add(MaxPooling2D((2, 2))) model. add(Conv2D(64, (3, 3), activation='relu')) model. add(MaxPooling2D((2, 2))) model. add(Conv2D(128, (3, 3), activation='relu')) model. add(MaxPooling2D((2, 2)))

[0113] # Fully connected layers model. add(Flatten()) model. add(Dense(128, acti vation='rel u')) model. add(Dropout(0.5)) model. add(Dense(64, activation='relu')) model. add(Dropout(0.5)) model. add(Dense(1 , acti vation='sigmoid'))

[0114] The differences in model accuracy between the above-exemplified mode and the CNN model based on MobileNetV2 are illustrated in Fig. 17. In a particular embodiment, the resistance and / or resistance mechanism predicting model is a computer- implemented, optionally pre-trained, image classification CNN resistance and / or resistance mechanism predicting model.

[0115] Fig. 18 is a schematic overview of CNN model structure that can be used to implement the resistance and / or resistance mechanism predicting model. The CNN model encompasses an input layer accepting time / anti biotic gradient greyscale-encoded representation of bacterial growth in the culture or test chamber as a 224x224x3 image. The figure also shows the convolution layer with the cuboids representing blocks in an example model, where the blocks consist of point or depth-wise convolutions, batch normalizations and / or inverted residuals with linear bottlenecks (ReLU). This layer may represent the pre-trained part of the MobileNetV2 model, or the convolution part of a custom CNN model. The fully- connected (dense) layer represents a neural net serving to interpret the feature maps generated by the convolution layer, generating a classification probability between 0-1. This is followed by a binary classifier layer using a cutoff of the estimated probability, where the cutoff may be for example 0.5.

[0116] Fig. 5 illustrates a cassette 20 that could be used to provide multiple 3D culture matrixes 30 to expose bacteria of a sample to concentration gradients of multiple antibacterial agents in parallel. Such a cassette 20 is described in U.S. patent application 2022 / 0169966. The cassette 20 comprises multiple test chambers 21 , also referred to as culturing chambers, each of which is configured to comprise a 3D culture matrix 30 comprising bacteria of the sample. The cassette 20 further comprises a fluid system 25 comprising, for each test chamber 21 of the multiple test chambers 21 , a respective first fluid channel 26 in fluid connection with a first side 22 of the test chamber 21 and configured to comprise a first fluid, e.g., liquid, comprising an antibacterial agent at a first concentration and a respective second fluid channel 27 in fluid connection with a second side 23, opposite to the first side 22, of the test chamber 21 . This second fluid channel 27 is configured to comprise a second fluid, e.g., liquid, lacking the antibacterial agent or comprising the antibacterial agent at a second concentration that is lower than the first concentration.

[0117] In operation, a sample is injected into the cassette 20 through a sample inlet port. The sample is preferably a sample comprising bacteria, such as a body fluid sample, and additionally comprising a gel suspension that can be polymerized into a 3D culture matrix in the respective test chambers 21. The sample may optionally also comprise a culture medium allowing growth of any bacteria in the resulting 3D culture matrix. The present invention can be used in connection with any type of culture matrix material known in the art and that can be injected into cassette 20 and polymerized to form a solid 3D culture matrix 30. Additionally, the culture matrix once formed should preferably be transparent to allow visual inspection and visual access to the sample included therein.

[0118] Examples of suitable matrix material include agarose materials. An illustrative example of such an agarose material is ultra-low-gelling-temperature (ULGT) agarose. Other suitable materials include collagen materials, such as collagen I. Collagen I is well documented to support 3D cultures. Other gels that can be used include Engelbreth-Holm-Swarm (ECM) gels, such as Matrigel (BD Bioscience, Bedford, MA, USA) or hydrogels, including a mixture of phenylalanine (Phe) dipeptide formed by solid-phase synthesis with a fluorenylmethoxycarbonyl (Fmoc) protector group on the N-terminus, and Fmoc- protected lysine (Lys) or solely phenylalanine. However, any type of biocompatible matrix could be used as long as the matrix can be applied in soluble form and castor polymerized to form a solid culture matrix.

[0119] The sample flows from the sample inlet port through a channel system in the cassette 20 and the test chambers 21 in a meander pattern to fill respective test chamber 21 with the sample. The cassette 20 is then preferably placed inside a refrigerator to initiate and finish the gel reaction of the sample and thereby formation of the solid 3D culture matrices 30 in the test chambers 21. The cassette 20 is then brought out from the refrigerator and is now ready for running an analysis of the response of bacteria present in the sample to antibacterial agents preloaded in reservoirs in the cassette 20. At this point, the cassette 20 can therefore be inserted into an analysis instrument 40 as shown in Fig. 4.

[0120] Flows of the fluids are then started in the respective fluid channels 26, 27 of the fluid system 25, preferably in the form of a substantially constant flow, such as about 0.5-1.5 pl / minute. As a consequence, one matrix side 32 of the 3D culture matrix 30 in a test chamber 21 is exposed to the first fluid comprising an antibacterial agent, whereas the other matrix side 33 of the 3D culture matrix 30 is exposed to the second fluid lacking the antibacterial agent, or comprising a lower concentration of the antibacterial agent. Hence, there is a constant concentration of the antibacterial agent in the first fluid flowing past one matrix side 32 of the 3D culture matrix 30 and preferably a zero concentration of the antibacterial agent in the second fluid flowing past the opposite matrix side 33 of the 3D culture matrix 30. As a consequence, a linear concentration gradient of the antibacterial agent will be established and maintained over the 3D culture matrix 30.

[0121] The linear concentration gradient of the antibacterial agent is preferably formed due to diffusion of the antibacterial agent through the 3D culture matrix 30. In a preferred embodiment, the flow rates of the fluids on either matrix side 32, 33 of the 3D culture matrix 30 are preferably kept substantially similar since then no flow of the fluid is present through the 3D culture matrix 30 in the test chamber 21 .

[0122] As is shown in Fig. 5, the cassette 20 preferably comprises multiple test chambers 21 . This means that different antibacterial agents can be provided in the different reservoirs in the cassette 20 to thereby, in a single run of the cassette 20, monitor and analyze the responses of bacteria in the sample to the different antibacterial agents. As an example, the cassette 20 as shown in Fig. 5 comprises 12 test chambers 21 , in which 12 3D culture matrices 30 can be provided to thereby, in parallel, establish concentration gradients of up to 12 different antibacterial agents.

[0123] In an embodiment, multiple different resistance mechanism predicting models are available and can be used to predict different resistance mechanisms of bacteria. For instance, a first resistance mechanism predicting model could be used to predict whether bacteria of a sample are likely to be carbapenemase- producing bacteria, such as carbapenemase-producing Enterobacteriaceae (CPE), whereas a second resistance mechanism predicting model could be used to predict whether the bacteria of the sample are likely to be ESBL-producing bacteria, such as ESBL-producing Enterobacteriaceae. In another embodiment, a single resistance mechanism predicting model or a single resistance and resistance mechanism predicting model could be used to predict different resistance mechanisms. Correspondingly, a single resistance predicting model or multiple resistance predicting models (or combined resistance and resistance mechanism predicting model(s)) could be used.

[0124] As an example, a resistance mechanism predicting model capable of predicting carbapenemase resistance mechanism, i.e., carbapenemase-producing bacteria, could be used together with the antibacterial agents cefepime (CEP) and meropenem (MER), whereas a resistance mechanism predicting model capable of predicting ESBL resistance mechanism, i.e., ESBL-producing bacteria, could be used together with the antibacterial agents CTA and ceftazidime (CFZ).

[0125] An aspect of the invention also relates to a computer-implemented method for generating or training a resistance and / or resistance mechanism predicting model 125, see Fig. 19. The method comprises steps S20 and S21 as shown in Fig. 19. These steps S20 and S21 are performed for each training image set 1 of a plurality of training image sets 1 , which is schematically illustrated by the loop L4 in Fig. 19. Step S20 comprises processing, for each antibacterial agent of multiple antibacterial agents, the training image set 1 of a plurality of training images 2 of a 3D culture matrix 30 comprising bacteria of a sample and over which a concentration gradient of the antibacterial agent is established. The plurality of training images 2 are taken at different points in time. This step S20 basically corresponds to step S1 in Fig. 1 but with the difference that any antibacterial agent resistance and / or resistance mechanism of the bacteria comprised in the 3D culture matrix 30 in step S20 is known, whereas step S1 is performed in order to determine any such antibacterial agent resistance and / or resistance mechanism of the bacteria. In an embodiment, the processing step S20 in Fig. 19 is performed as previously described herein and shown in Fig. 2. Thus, in such an embodiment, the processing step S20 comprises defining, in step S2 and for each training image 2 of the plurality of training images 2, a plurality of image regions 3 along the concentration gradient. The processing step S20 also comprises determining, in step S3 and for each image region 3 of the plurality of image regions 3, a parameter 4 representing a quantity of bacteria present in a region of the 3D culture matrix 30 imaged in the image region 3. The processing step S20 further comprises generating, in step S4, a data set 5 comprising the parameters 4 determined for the plurality of image regions 3 in the plurality of training images 2. The method as shown in Fig. 19 also comprises step S21, which comprises training the resistance and / or resistance mechanism predicting model 125 based on the data set 5 and information representative of any resistances to the multiple antibacterial agents for the bacteria of the sample and / or information representative of any resistance mechanism harbored by bacteria of the sample.

[0126] The training of the resistance and / or resistance mechanism predicting model 125 is thereby performed by generating training image sets 1 and data sets 5 for a plurality of samples of different bacteria for which any resistance to the multiple antibacterial agents and / or any resistance mechanism harbored by the bacteria is already known. For instance, any of the prior art methods or techniques described in the background section could be used to obtain information of any such resistance (R, I or S, or R or l / S) for the multiple antibacterial agents. Any resistance mechanisms harbored by the bacteria could also be determined accordance with, for instance, EUCAST guidelines and / or by genotyping the bacteria to detect the presence of any genetic material encoding for enzyme(s) metabolizing antibacterial agent(s) or modified PBPs. This information obtained or determined for bacteria of a given sample is then input together with the data set 5 generated for the sample in step S20 into the resistance and / or resistance mechanism predicting model 125 and thereby used to train the resistance and / or resistance mechanism predicting model 125. The training in step S21 thereby learns the resistance and / or resistance mechanism predicting model 125 to correlate the data set 5 with parameters 4 with any resistance to the multiple antibacterial agents and / or any resistance mechanism.

[0127] The resistance and / or resistance mechanism predicting model 125 can be trained in Fig. 19 to accurately estimate or predict any resistance to an antibacterial agent and / or any resistance mechanism based on an input data set 5 as generated in step S4 based on an image set 1 of a plurality of images 2. Thus, by providing a plurality of such data sets 5 from different bacterial samples with different known resistances to antibacterial agents and / or different known resistance mechanisms, the resistance and / or resistance mechanism predicting model 125 will learn how changes in bacterial growth in the 3D culture matrix 30 over time, as represented by the data set 5, reflect such a resistance and / or resistance mechanism.

[0128] The resistance and / or resistance mechanism predicting model 125 as trained in Fig. 19 can then be used in the method shown in Fig. 1.

[0129] The various embodiments described in the foregoing, for instance in connection with Figs. 1 -7, also apply mutatis mutandis to the method shown in Fig. 19.

[0130] The methods, steps, functions, procedures, modules and / or blocks described herein may be implemented in software, such as a computer program, for execution by suitable processing circuitry, such as one or more processors. Examples of processing circuitry includes, but is not limited to, one or more microprocessors, one or more Digital Signal Processors (DSPs), one or more Central Processing Units (CPUs), video acceleration hardware, and / or any suitable programmable logic circuitry such as one or more Field Programmable Gate Arrays (FPGAs), or one or more Programmable Logic Controllers (PLCs). It should also be understood that it may be possible to re-use the general processing capabilities of any conventional device or unit in which the proposed technology is implemented. It may also be possible to re-use existing software, e.g., by reprogramming the existing software or by adding new software components.

[0131] The term ‘processor’ should be interpreted in a general sense as any circuitry, system or device capable of executing program code or computer program instructions to perform a particular processing, determining or computing task.

[0132] The present invention also relates to a system 10 for resistance and / or resistance mechanism prediction, see Figs. 4 and 8. The system 10 comprises a processing circuitry 110 comprising at least one processor 111 and a memory system 120 comprising at least one memory 121. The at least one memory 121 comprises a resistance and / or resistance mechanism predicting model 125 trained for predicting resistance and / or resistance mechanism of bacteria based on input data sets. The at least one memory 121 also comprises instructions executable by the at least one processor 111 to cause the at least one processor 111 to process, for each antibacterial agent of multiple antibacterial agents, an image set 1 of a plurality of images 2 of a 3D culture matrix 30 comprising bacteria of a sample and over which a concentration gradient of the antibacterial agent is established. The plurality of images 2 are taken at different points in time. The at least one processor 111 is caused to process the image set 1 by defining, for each image 2 of the plurality of images 2, a plurality of image regions 3 along the concentration gradient. The at least one processor 111 is also caused to determine, for each image region 3 of the plurality of image regions 3, a parameter 4 representing a quantity of bacteria present in a region of the 3D culture matrix 30 imaged in the image region 3. The at least one processor 111 is further caused to generate a data set 5 comprising the parameters 4 determined for the plurality of image regions 3 in the plurality of images 2. The at least one processor 111 is additionally caused to predict any resistance to an antibacterial agent of the multiple antibacterial agents for the bacteria of the sample and / or any resistance mechanism harbored by the bacteria of the sample based on the data sets 5 and the resistance and / or resistance mechanism predicting model 125.

[0133] The memory system 120 may comprise a single resistance and / or resistance mechanism predicting model 125 or multiple different resistance and / or resistance mechanism predicting models 125.

[0134] In an embodiment, the system 10 comprises an analysis instrument 40 and a data processing device 100 connected to the analysis instrument 40, such with a wire or wirelessly connected to the analysis instrument 40. In such an embodiment, the at least one processor 111 of the processing circuitry 110 could be present in the data processing device 100 or the processing circuitry 110 could be a distributed processing circuitry 110 with at least one processor 111 present in the data processing device 100 and at least one processor 111 present in the analysis instrument 40. Correspondingly, the at least one memory 121 of the memory system 120 could be present in the data processing device 100 or the memory system 120 could be a distributed memory system 120 with at least one memory 121 present in the data processing device 100 and at least one memory 121 present in the analysis instrument 40.

[0135] In another embodiment, the data processing device 100 is comprised in the analysis instrument 40. In such an embodiment, the analysis instrument comprises the processing circuitry 110 and the memory system 120.

[0136] The analysis instrument 40 preferably comprise the previously mentioned light detector, such as in the form of a camera 45, configured to take images 2 of the multiple 3D culture matrices 30, such as present in different test chambers 21 of a cassette 20 inserted into the analysis instrument 40 as shown in Fig. 4. In an embodiment, the analysis instrument 40 generates the image sets 1 of the plurality of images 2 and outputs them to the data processing device 100, at which the processing of the image sets 1 is conducted. In another embodiment, at least a portion of the processing of the image sets 1 is performed by the analysis instrument 40. For instance, at least one processor 111 of the analysis instrument 40 is caused, when executing instructions stored in at least one memory 121 of the analysis instrument 40, to define the plurality of image regions 3 and determine the parameters 4. In such an embodiment, the analysis instrument 40 outputs the determined parameters 4 to the data processing device 100. At least one processor 111 of the data processing device 100 then generates, when executing instructions stored in at least one memory 121 of the data processing device 100, the multiple data sets 5 and predicts any resistance and / or resistance mechanism of the bacteria based on the data sets 5 and the resistance and / or resistance mechanism predicant model 125.

[0137] In a further embodiment, at least one processor 111 of the analysis instrument 40 is caused, when executing instructions stored in at least one memory 121 of the analysis instrument 40, to define the plurality of image regions 3, determine the parameters 4 and generate the data sets 5. In such an embodiment, the analysis instruments 40 outputs the generated data sets 5 to the data processing device 100. At least one processor 111 of the data processing device 100 then predicts, when executing instructions stored in at least one memory 121 of the data processing device 100, any resistance and / or resistance mechanism of the bacteria based on the data sets 5 and the resistance and / or resistance mechanism predicant model 125.

[0138] In an embodiment, the system 10 comprises the above-mentioned cassette 20 comprising multiple test chambers 21 , wherein each test chamber 21 is configured to comprise a 3D culture matrix 30 comprising bacteria of the sample. The cassette 20 also comprises a fluid system 25 comprising, for each test chamber 21 of the multiple test chambers 21, a respective first fluid channel 26 in fluid connection with a first side 22 of the test chamber 21 and configured to comprise a first fluid comprising an antibacterial agent at a first concentration and a respective second fluid channel 27 in fluid connection with a second side 23, opposite to the first side 22, of the test chamber 21 and configured to comprise a second fluid lacking the antibacterial agent or comprising the antibacterial agent at a second concentration that is lower than the first concentration. In such an embodiment, system 10 also comprises at least one camera 45, or other type of light detector, configured to take images 2 of the multiple test chambers 21 at the different points in time and generate the plurality of images 2. The camera 45 is preferably arranged in an analysis instrument 40 configured to receive the cassette 2. In an embodiment, the memory system 120 comprises instructions executable by the at least one processor 111 to cause the at least one processor 111 to define, for each image 2 of the plurality of images 2, the plurality of image regions 3 along a direction between the first matrix side 32 and the second matrix side 33.

[0139] In an embodiment, the memory system 120 comprises instructions executable by the at least one processor 111 to cause the at least one processor 111 to determine, for each image region 3 of the plurality of image regions 3, the parameter 4 representing a normalized quantity of bacteria present in the region of the 3D culture matrix 30 imaged in the image region 3.

[0140] In an embodiment, the memory system 120 comprises instructions executable by the at least one processor 111 to cause the at least one processor 111 to, for each image region 3 of the plurality of image regions 3 detect bacterial biomass present in the region of the 3D culture matrix 30 imaged in the image region 3, normalize the detected bacterial biomass, and convert the normalized detected bacterial biomass into a grayscale value.

[0141] In an embodiment, the memory system 120 comprises instructions executable by the at least one processor 111 to cause the at least one processor 111 to generate a 2D data set 5 comprising the parameters with the plurality of image regions 3 in one dimension and time in the other dimension.

[0142] In an embodiment, the memory system 120 comprises instructions executable by the at least one processor 111 to cause the at least one processor 111 to generate a grayscale image 5 comprising the parameters as image elements of the grayscale image 5.

[0143] In an embodiment, the memory system 120 comprises instructions executable by the at least one processor 111 to cause the at least one processor 111 to predict any resistance to the antibacterial agent for the bacteria of the sample and / or any resistance mechanism harbored by the bacteria of the sample based on the data sets 5 for the multiple antibacterial agents and the resistance and / or resistance mechanism predicting model 125 but without knowledge of any minimum inhibitory concentrations of the bacteria with regard to the multiple antibacterial agents and without determining any minimum inhibitory concentrations of the bacteria with regard to the multiple antibacterial agents.

[0144] In an embodiment, the memory system 120 comprises instructions executable by the at least one processor 111 to cause the at least one processor 111 to process, for each antibacterial agent of the multiple antibacterial agents, the image set 1 of the plurality of images 2 taken of the 3D culture matrix 30 comprising bacteria of the sample at different points in time from start of establishing the concentration gradient of the antibacterial agent up to 4 hours from start of establishing the concentration gradient of the antibacterial agent, preferably from start of establishing the concentration gradient of the antibacterial agent up to 3 hours from start of establishing the concentration gradient of the antibacterial agent, and more preferably from start of establishing the concentration gradient of the antibacterial agent up to 2.5 hours from start of establishing the concentration gradient of the antibacterial agent.

[0145] Fig. 9 is a computer-program-based implementation according to an embodiment. In this particular example, at least some of the steps, functions, procedures, modules and / or blocks described herein are implemented in a computer program 240, which is loaded into at least one memory 221 for execution by at least one processor 211. The at least one processor 211 and the at least one memory 221 are interconnected to each other to enable normal software execution. An optional input and output (I / O) unit 230 may also be interconnected to the at least one processor 211 and / or the at least one memory 221 to enable input and / or output of relevant data, such as image sets 2, parameters 4 or data sets 5.

[0146] The at least one processor 211 is, thus, configured to perform, when executing the computer program 240, well-defined processing tasks as described herein. The at least one processor 211 does not have to be dedicated to only execute the above-described steps, functions, procedure and / or blocks, but may also execute other tasks.

[0147] In an embodiment, the computer program 240 comprises instructions, which when executed by the at least one processor 211 , cause the at least one processor 211 to process, for each antibacterial agent or multiple antibacterial agents, an image set 1 of a plurality of images 2 of a 3D culture matrix 30 comprising bacteria of a sample and over which a concentration gradient of the antibacterial agent is established. The plurality of images 2 are taken at different points in time. The at least one processor 211 is also caused to process the image set 1 by defining, for each image 2 of the plurality of images 2, a plurality of image regions 3 along the concentration gradient. The at least one processor 211 is caused to determine, for each image region 3 of the plurality of image regions 3, a parameter 4 representing a quantity of bacteria present in a region of the 3D culture matrix 30 imaged in the image region 3. The at least one processor 211 is further caused to generate a data set 5 comprising the parameters 4 determined for the plurality of image regions 3 in the plurality of images 2. The at least one processor 211 is additionally caused to predict any resistance to an antibacterial agent of the multiple antibacterial agents for the bacteria of the sample and / or any resistance mechanism harbored by the bacteria of the sample based on the data sets 5 and a resistance and / or resistance mechanism predicting model 225 trained for predicting resistance and / or resistance mechanism of bacteria based on input data sets.

[0148] In another embodiment, the computer program 240 comprises instructions, which when executed by the at least one processor 211 , cause the at least one processor 211 to, for each training image set 1 of a plurality of training image sets 1 , process, for each antibacterial agent or multiple antibacterial agents, the training image set 1 of a plurality of training images 2 of a 3D culture matrix 30 comprising bacteria of a sample and over which a concentration gradient of the antibacterial agent is established. The plurality of training images 2 are taken at different points in time. The at least one processor 211 is also caused to process the training image set 1 by defining, for each training image 2 of the plurality of training images 2, a plurality of image regions 3 along the concentration gradient. The at least one processor 211 is caused to determine, for each image region 3 of the plurality of image regions 3, a parameter 4 representing a quantity of bacteria present in a region of the 3D culture matrix 30 imaged in the image region 3. The at least one processor 211 is further caused to generate a data set 5 comprising the parameters 4 determined for the plurality of image regions 3 in the plurality of images 2. The at least one processor 211 is additionally caused to train the resistance and / or resistance mechanism predicting model 125 based on the data set 5 and information representative of any resistances to the multiple antibacterial agents for the bacteria of the sample and / or information representative of any resistance mechanism harbored by bacteria of the sample.

[0149] The proposed technology also provides a computer-readable storage medium 250 comprising the computer program 240.

[0150] By way of example, the software or computer program 240 may be realized as a computer program product, which is normally carried or stored on a computer-readable medium 250, in particular a nonvolatile computer-readable medium. The computer-readable medium 250 may include one or more removable or non-removable memory devices including, but not limited to a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc (CD), a Digital Versatile Disc (DVD), a Blu-ray disc, a Universal Serial Bus (USB) memory, a Solid-State Drive (SSD) storage device, a Solid-State Hybrid Drive (SSHD) storage device, a Hard Disk Drive (HDD) storage device, a flash memory, a magnetic tape, or any other conventional memory device. The computer program 240 may, thus, be loaded into the at least one memory 220 for execution by the at least one processor 210. The various embodiments of the invention discussed in the foregoing in connection with the methods and system of the invention also apply to the computer program 240 and computer program product 250.

[0151] It will be appreciated that the methods, method steps, functional modules, devices, system components described herein can be implemented, combined and re-arranged in a variety of ways.

[0152] EXAMPLES

[0153] Material and Methods

[0154] Handling of bacterial isolates

[0155] A test dataset of a total of 564 bacterial strains from 16 clinically relevant species (Acinetobacter baumannii, Citrobacter spp. (C. koseri and C. freundii as well as non-typed strains), Klebsiella variicola, Pseudomonas aeruginosa, Pantoea calida, Proteus mirabilis, Proteus vulgaris, Serratia marcescens, Enterobacter cloacae, Escherichia coll, Klebsiella aerogenes, Klebsiella oxytoca, Klebsiella ozaenae, Klebsiella pneumoniae), and a validation dataset of a total of 175 additional strains, were acquired from several sources, representing common non-fastidious Gram-negative bacteria involved in bloodstream infection of humans. The isolates were selected to cover distinct antibiotic susceptibility phenotypes, with the aim to include every susceptible / intermediate / resistant (S / l / R) category for each tested antibiotic and species. On the day of arrival, the bacterial strains were streaked on agar plates, grown overnight, and harvested into a freezing buffer on the next day. The strains were thereafter kept frozen in -70°C. All strains were cultivated using Muller-Hinton (MH-II, BBL, Becton Dickinson) agar or cation-adjusted MH-II broth. When preparing spiked cultures for QuickMIC® and broth microdilution (BMD) testing, suspensions of bacteria were achieved by streaking frozen stock on plates and subsequently cultured overnight. The next morning two to four colonies were dissolved in MH-II, after which the suspension was adjusted to 0.5 McFarland. This suspension was either used directly for BMD or diluted and inoculated into blood culture bottles together with 10 mL blood. The spiked blood culture bottles were then incubated in a blood culture system until a positive signal was received, after which the bottle was removed for QuickMIC® testing.

[0156] Table 1 - Antibiotic concentrations used in QuickMIC® and reference broth microdilution

[0157] Concentration range mg / L Concentration range mg / L

[0158] Antibiotic (#) (QuickMIC®) (BMD)

[0159] Amikacin (AMI) 1 - 20 0.5-32

[0160] Cefepime (CEP) 0.5-10 0.25-16 Ciprofloxacin (CIP) 0.125-2.5 0.125-4

[0161] Colistin (COL) 0.25-5 0.125-8

[0162] Cefotaxime (CT A) 0.25-5 0.0156-8

[0163] Ceftazidime / 0.5-10 0.25-16

[0164] Avibactam (CTV) 4* 4*

[0165] Gentamicin sulfate (GEN) 0.5-10 0.25-16

[0166] Meropenem (MER) 0.5-10 0.25-16

[0167] Piperacillin / 2-40 0.5-64

[0168] Tazobactam (PIT) 4* 4*

[0169] Tigecycline (TIG) 0.06-1.25 0.0156-2

[0170] Tobramycin (TOB) 0.5-10 0.125-16

[0171] # Antibiotic abbreviations according to the EUCAST system for antimicrobial abbreviation available at

[0172] * For CTV (Ceftazidime / Avibactam) and PIT (Piperacillin / Tazobactam) combinations, the inhibitor was kept at a fixed concentration of 4 mg / L as per EUCAST guidelines.

[0173] Reference testing by broth microdilution

[0174] Broth microdilution was performed according to ISO 20776-1 :2019 Susceptibility testing of infectious agents and evaluation of performance of antimicrobial susceptibility test devices — Part 1 : Broth microdilution reference method for testing the in vitro activity of antimicrobial agents against rapidly growing aerobic bacteria involved in infectious diseases. The used antibiotics and concentrations are described in Table 1. Briefly, the microplates were loaded with antibiotics and inoculated with a bacterial suspension at 0.5 McFarland, yielding a final concentration of ~5*105CFU / mL, after which the plates were incubated overnight at 37°C. The minimum inhibitory concentration (MIC) was read after 16 h as the lowest drug concentration, at which no turbidity could be detected visually. All strains were tested at least twice on separate days, in case of a differing result the strain was retested a third time and the MIC registered as the mode of the three read-outs.

[0175] QuickMIC® data generation

[0176] For QuickMIC® testing, samples from positive blood culture bottles were prepared according to the instructions for use available from the manufacturer (Gradientech AB, Uppsala, Sweden). In short, 2-4 mL of blood culture was aspirated using an S-Monovette safety needle (Sarstedt, Numbrecht, Germany), after which a 10 pL sample loop was used to transfer material to the QuickMIC® preparation kit (Art. No.: 46-001-10, Gradientech AB, Uppsala, Sweden). The preparation kit performed a fixed 1 :200 dilution in agarose, followed by a filtering step to remove blood cells using a syringe filter. An aliquot of prepared sample was kept for inoculate control by plating. The sample was then loaded in the sample port of the QuickMIC® test cassette (GN panel, Art. No.: 43-001-10, Gradientech AB, Uppsala, Sweden), after which 20 mL of MH-II was injected in the media port of the QuickMIC® test cassette. The QuickMIC® test cassette was inserted into the QuickMIC® instrument (Gradientech AB, Uppsala, Sweden) and the test was started through the control software (QM Analyst).

[0177] Data processing and resistance prediction

[0178] The raw growth rate of each detected growth region from the QuickMIC® instrument was collected before downstream MIC calculation in QM Analyst and saved into .csv format, representing the growth rate of each growing region in the test chamber. The continuous concentration gradient in the test chamber was then discretized by averaging the growth in each of 35 vertical cells or regions dispersed evenly throughout the test chamber, at each timepoint. The growth rates were then normalized by recoding the average growth rate in each cell or region and timestep as an integer between 0 and 255, in essence producing a grey-scale image representation of the bacterial growth over time where each pixel represents the average growth rate at a specific antibiotic concentration, and each horizontal line of pixels represents the entire growth profile in the test chamber at one time point, at steps of 10 minutes. The images were then individually rescaled to a final size of 224x224 pixels. The rescaled images were used as input for a CNN resistance prediction model, a pre-trained CNN model based on the MobileNetV2- platform, as well as a custom-made CNN model, using the test dataset. The reference categories for each strain and antibiotic from broth microdilution were further categorized into S / l / R categories by applying EUCAST clinical breakpoints (version 10.0, 2020, available . For each tested strain and antibiotic, a likely category was predicted in the testing dataset and compared with the ones generated from reference testing. The probability rating of the model for predicting either R or S / l correctly was then calculated when using a probability cutoff threshold of 0.5. The two CNN models were validated on the validation dataset of 175 strains.

[0179] Results

[0180] Fig. 10 schematically illustrates the image data used in the resistance and resistance mechanism predicting CNN model, here for two antibiotics CEP and CTA, with cell growth represented by whiteness, time on the vertical axis and antibiotic concentration on the horizontal axis. Each row is captured 10 minutes after the previous row. This figure also indicates that multiple antibiotics can be joined into one input image, in this case CEP and CTA, which would be used for the ESBL carrier prediction model based on EUCAST criteria. Fig. 11 schematically illustrates the resistance and resistance predicting model, where the classification ability of the CNN model to correctly predict susceptibility and resistance to either CEP or CTA over time is shown. The accuracy indicates fraction of correctly predicted S / l or R bacterial strains in a large collection of tested clinical isolates. Each cycle is 10 minutes.

[0181] Fig. 12 schematically illustrates the probability rating of the CNN model for predicting either R for CEP or CTA (left side) or S / l (right side) for each individual tested bacterial strain. White circles indicate falsely predicted S or R bacteria, and black indicate correctly predicted, using a threshold of 0.5. Each cycle is 10 minutes.

[0182] Fig. 13 schematically illustrates the resistance and resistance predicting model, where the classification ability of the CNN model to correctly predict resistance for each antibiotic on a panel of 12 antibiotics (AMI, CEP, CIP, COL, CTA, CTV, CTZ, MER, GEN, PIT, TIG, TOB). The model performance varies over the type of antibiotic. Each cycle is 10 minutes.

[0183] Fig. 14A schematically illustrates the resistance and resistance mechanism predicting model, where the classification ability of the CNN model to correctly predict ESBL resistance by the EUCAST criteria (R to either CTA or CTZ). Fig. 14B illustrates the probability rating of the model for predicting ESBL for each individual tested bacterial strain. White circles indicate falsely predicted ESBL bacteria, and black indicate correctly predicted, using a threshold of 0.5. Each cycle is 10 minutes.

[0184] Fig. 15 illustrates the results of validating the resistance and resistance mechanism predicting model described above on a dataset of 175 bacterial isolates, 18 different bacterial species, indicating time until threshold accuracy (85 or 90%) for individual prediction of resistance to CTA, CTZ or overall for 12 antibiotics (left); and accuracy and time until threshold accuracy specifically for detection of probable ESBL carriage (right).

[0185] Fig. 16 illustrates the results of validating the resistance and resistance mechanism predicting model described above on a dataset of 175 bacterial isolates, 18 different bacterial species, indicating the mean prediction accuracy over a panel of 12 antibiotics (AMI, CEP, CIP, COL, CTA, CTV, CTZ, MER, GEN, PIT, TIG, TOB). Fig. 17 illustrates the difference in accuracy by varying the CNN model used for resistance classification, in this case the difference between the pre-trained open-source model MobileNetV2 (left) and a custom CNN model (right). The embodiments described above are to be understood as a few illustrative examples of the present invention. It will be understood by those skilled in the art that various modifications, combinations and changes may be made to the embodiments without departing from the scope of the present invention. In particular different part solutions in the different embodiments can be combined in other configurations, where technically possible. The scope of the present invention is, however, defined by the appended claims.

Claims

CLAIMS1. A computer-implemented method for resistance and / or resistance mechanism prediction, the method comprising the steps of: processing (S1), for each antibacterial agent of multiple antibacterial agents, an image set (1) of a plurality of images (2) of a three-dimensional (3D) culture matrix (30) comprising bacteria of a sample and over which a concentration gradient of the antibacterial agent is established, wherein the plurality of images (2) are taken at different points in time, wherein the processing step (S1) comprises: defining (S2), for each image (2) of the plurality of images (2), a plurality of image regions(3) along the concentration gradient; determining (S3), for each image region (3) of the plurality of image regions (3), a parameter(4) representing a quantity of bacteria present in a region of the 3D culture matrix (30) imaged in the image region (3); and generating (S4) a data set (5) comprising the parameters (4) determined for the plurality of image regions (3) in the plurality of images (2); and predicting (S5) any resistance to an antibacterial agent of the multiple antibacterial agents for the bacteria of the sample and / or any resistance mechanism harbored by the bacteria of the sample based on the data sets (5) and a resistance and / or resistance mechanism predicting model (125) trained for predicting resistance and / or resistance mechanism of bacteria based on input data sets.

2. The computer-implemented method according to claim 1 , wherein the processing step (S1 , S20) comprises processing (S1), for each antibacterial agent of the multiple antibacterial agents, the image set (1) of the plurality of images (2) of the 3D culture matrix (30) comprising the bacteria of the sample and having a first matrix side (32) in fluid connection with a first fluid channel (26) comprising a first fluid with the antibacterial agent at a first concentration and a second matrix side (33), opposite to the first matrix side (32), in fluid connection with a second fluid channel (27) comprising a second fluid lacking the antibacterial agent or with the antibacterial agent at a second concentration that is lower than the first concentration.

3. The computer-implemented method according to claim 2, wherein the defining step (S2) comprises defining (S2), for each image (2) of the plurality of images (2), the plurality of image regions (3) along a direction between the first matrix side (32) and the second matrix side (33).

4. The computer-implemented method according to any one of claims 1 to 3, wherein the determining step (S3) comprises determining (S3), for each image region (3) of the plurality of image regions (3), theparameter (4) representing a normalized quantity of bacteria present in the region of the 3D culture matrix (30) imaged in the image region (3).

5. The computer-implemented method according to claim 4, wherein the determining step (S3) comprises, for each image region (3) of the plurality of image regions (3): detecting (S10) bacterial biomass present in the region of the 3D culture matrix (30) imaged in the image region (3); normalizing (S11) the detected bacterial biomass; and converting (S12) the normalized detected bacterial biomass into a grayscale value.

6. The computer-implemented method according to any one of claims 1 to 5, wherein the generating step (S4) comprises generating (S4) a two-dimensional (2D) data set (5) comprising the parameters (4) with the plurality of image regions (3) in one dimension and time in the other dimension.

7. The computer-implemented method according to claim 5 and 6, wherein the generating step (S4) comprises generating (S4) a grayscale image (5) comprising the parameters (4) as image elements of the grayscale image (5).

8. The computer-implemented method according to any one of claims 1 to 7, wherein the predicting step (S5) comprises predicting (S5) any resistance to the antibacterial agent for the bacteria of the sample and / or any resistance mechanism harbored by the bacteria of the sample based on the data sets (5) for the multiple antibacterial agents and the resistance and / or resistance mechanism predicting model (125) but without knowledge of any minimum inhibitory concentrations of the bacteria with regard to the multiple antibacterial agents and without determining any minimum inhibitory concentrations of the bacteria with regard to the multiple antibacterial agents.

9. The computer-implemented method according to any one of claims 1 to 8, wherein the processing step (S1) comprises processing (S1), for each antibacterial agent of the multiple antibacterial agents, the image set (1) of the plurality of images (2) taken of the 3D culture matrix (30) comprising bacteria of the sample at different points in time from start of establishing the concentration gradient of the antibacterial agent up to 4 hours from start of establishing the concentration gradient of the antibacterial agent, preferably from start of establishing the concentration gradient of the antibacterial agent up to 3 hours from start of establishing the concentration gradient of the antibacterial agent, and more preferably fromstart of establishing the concentration gradient of the antibacterial agent up to 2.5 hours from start of establishing the concentration gradient of the antibacterial agent.

10. The computer-implemented method according to any one of claims 1 to 9, wherein the resistance and / or resistance mechanism predicting model (125) is a computer-implemented machine learning (ML) resistance and / or resistance mechanism predicting model, preferably a computer-implemented artificial neural network (ANN) resistance and / or resistance mechanism predicting model, and more preferably a computer-implemented convolutional neural network (CNN) resistance and / or resistance mechanism predicting model, and in particular a computer-implemented image classification CNN resistance and / or resistance mechanism predicting model.

11. A computer-implemented method for training a resistance and / or resistance mechanism predicting model (125), the method comprising the steps of: for each training image set (1) of a plurality of training image sets (1): processing (S20), for each antibacterial agent of multiple antibacterial agents, the training image set (1) of a plurality of training images (2) of a three-dimensional (3D) culture matrix (30) comprising bacteria of a sample and over which a concentration gradient of the antibacterial agent is established, wherein the plurality of training images (2) are taken at different points in time, wherein the processing step (S20) comprises: defining (S2), for each training image (2) of the plurality of training images (2), a plurality of image regions (3) along the concentration gradient; determining (S3), for each image region (3) of the plurality of image regions (3), a parameter (4) representing a quantity of bacteria present in a region of the 3D culture matrix (30) imaged in the image region (3); and generating (S4) a data set (5) comprising the parameters (4) determined for the plurality of image regions (3) in the plurality of training images (2); and training (S21) the resistance and / or resistance mechanism predicting model (125) based on the data set (5) and information representative of any resistances to the multiple antibacterial agents for the bacteria of the sample and / or information representative of any resistance mechanism harbored by bacteria of the sample.

12. A system (10) for resistance and / or resistance mechanism prediction, the system (10) comprises: a processing circuitry (110) comprising at least one processor (111); anda memory system (120) comprising at least one memory (121) comprising a resistance and / or resistance mechanism predicting model (125) trained for predicting resistance and / or resistance mechanism of bacteria based on input data sets, and instructions executable by the at least one processor (111 ) to cause the at least one processor (111) to: process, for each antibacterial agent of multiple antibacterial agents, an image set (1) of a plurality of images (2) of a three-dimensional (3D) culture matrix (3) comprising bacteria of a sample and over which a concentration gradient of the antibacterial agent is established, wherein the plurality of images (2) are taken at different points in time, wherein the at least one processor (111) is caused to process the image set (1) by: defining, for each image (2) of the plurality of images (2), a plurality of image regions (3) along the concentration gradient; determining, for each image region (3) of the plurality of image regions (3), a parameter representing a quantity of bacteria present in a region of the 3D culture matrix (30) imaged in the image region (3); and generating a data set (5) comprising the parameters (4) determined for the plurality of image regions (3) in the plurality of images (2); and predict any resistance to an antibacterial agent of the multiple antibacterial agents for the bacteria of the sample and / or any resistance mechanism harbored by the bacteria of the sample based on the data sets (5) and the resistance and / or resistance mechanism predicting model (125).

13. The system according to claim 12, further comprising: a culturing cassette (20) comprising: multiple test chambers (21), wherein each test chamber (21) is configured to comprise a 3D culture matrix (30) comprising bacteria of the sample; and a fluid system (25) comprising, for each test chamber (21) of the multiple test chambers(21), a respective first fluid channel (26) in fluid connection with a first side (22) of the test chamber (21) and configured to comprise a first fluid comprising an antibacterial agent at a first concentration and a respective second fluid channel (27) in fluid connection with a second side (23), opposite to the first side(22), of the test chamber (21) and configured to comprise a second fluid lacking the antibacterial agent or comprising the antibacterial agent at a second concentration that is lower than the first concentration; and at least one camera (45) configured to take images (2) of the multiple test chambers (21) at the different points in time and generate the plurality of images (2).

14. The system according to claim 13, wherein the memory system (120) comprises instructions executable by the at least one processor (111 ) to cause the at least one processor (111 ) to define, for each image (2) of the plurality of images (2), the plurality of image regions (3) along a direction between the first matrix side (32) and the second matrix side (33).

15. The system according to any one of claims 12 to 14, wherein the memory system (120) comprises instructions executable by the at least one processor (111) to cause the at least one processor (111) to determine, for each image region (3) of the plurality of image regions (3), the parameter (4) representing a normalized quantity of bacteria present in the region of the 3D culture matrix (30) imaged in the image region (3).

16. The system according to claim 15, wherein the memory system (120) comprises instructions executable by the at least one processor (111) to cause the at least one processor (111) to, for each image region (3) of the plurality of image regions (3): detect bacterial biomass present in the region of the 3D culture matrix (30) imaged in the image region (3); normalize the detected bacterial biomass; and convert the normalized detected bacterial biomass into a grayscale value.

17. The system according to any one of claims 12 to 16, wherein the memory system (120) comprises instructions executable by the at least one processor (111) to cause the at least one processor (111) to generate a two-dimensional (2D) data set (5) comprising the parameters (4) with the plurality of image regions (3) in one dimension and time in the other dimension.

18. The system according to claim 16 and 17, wherein the memory system (120) comprises instructions executable by the at least one processor (111) to cause the at least one processor (111) to generate a grayscale image (5) comprising the parameters (4) as image elements of the grayscale image (5).

19. The system according to any one of claims 12 to 18, wherein the memory system (120) comprises instructions executable by the at least one processor (111) to cause the at least one processor (111) to predict any resistance to the antibacterial agent for the bacteria of the sample and / or any resistance mechanism harbored by the bacteria of the sample based on the data sets (5) for the multiple antibacterial agents and the resistance and / or resistance mechanism predicting model (125) but without knowledgeof any minimum inhibitory concentrations of the bacteria with regard to the multiple antibacterial agents and without determining any minimum inhibitory concentrations of the bacteria with regard to the multiple antibacterial agents.

20. The system according to any one of claims 12 to 19, wherein the memory system (120) comprises instructions executable by the at least one processor (111) to cause the at least one processor (111) to process, for each antibacterial agent of the multiple antibacterial agents, the image set (1) of the plurality of images (2) taken of the 3D culture matrix (30) comprising bacteria of the sample at different points in time from start of establishing the concentration gradient of the antibacterial agent up to 4 hours from start of establishing the concentration gradient of the antibacterial agent, preferably from start of establishing the concentration gradient of the antibacterial agent up to 3 hours from start of establishing the concentration gradient of the antibacterial agent, and more preferably from start of establishing the concentration gradient of the antibacterial agent up to 2.5 hours from start of establishing the concentration gradient of the antibacterial agent.

21. The system according to any one of claims 12 to 20, wherein the resistance and / or resistance mechanism predicting model (125) is a computer-implemented machine learning (ML) resistance and / or resistance mechanism predicting model, preferably a computer-implemented artificial neural network (ANN) resistance and / or resistance mechanism predicting model, and more preferably a computer- implemented convolutional neural network (CNN) resistance and / or resistance mechanism predicting model, and in particular a computer-implemented image classification CNN resistance and / or resistance mechanism predicting model.

22. A computer program (240) comprising instructions, which when executed by at least one processor (211), cause the at least one processor (211) to: process, for each antibacterial agent of multiple antibacterial agents, an image set (1) of a plurality of images (2) of a three-dimensional (3D) culture matrix (30) comprising bacteria of a sample and over which a concentration gradient of the antibacterial agent is established, wherein the plurality of images (2) are taken at different points in time, wherein the at least one processor (211) is caused to process the image set (1) by: defining, for each image (2) of the plurality of images (2), a plurality of image regions (3) along the concentration gradient;determining, for each image region (3) of the plurality of image regions (3), a parameter (4) representing a quantity of bacteria present in a region of the 3D culture matrix (30) imaged in the image region (3); and generating a data set (5) comprising the parameters (4) determined for the plurality of image regions (3) in the plurality of images (2); and predict any resistance to an antibacterial agent of the multiple antibacterial agents for the bacteria of the sample and / or any resistance mechanism harbored by the bacteria of the sample based on the data sets (5) and a resistance and / or resistance mechanism predicting model (225) trained for predicting resistance and / or resistance mechanism of bacteria based on input data sets.

23. A computer program (240) comprising instructions, which when executed by at least one processor (211), cause the at least one processor (211) to, for each training image set (1) of a plurality of training image sets (1): process, for each antibacterial agent of multiple antibacterial agents, the training image set (1) of a plurality of training images (2) of a three-dimensional (3D) culture matrix (30) comprising bacteria of a sample and over which a concentration gradient of the antibacterial agent is established, wherein the plurality of training images (2) are taken at different points in time, wherein the at least one processor (211) is caused to process the training image set (1) by: defining, for each training image (2) of the plurality of training images (2), a plurality of image regions (3) along the concentration gradient; determining, for each image region (3) of the plurality of image regions (3), a parameter (4) representing a quantity of bacteria present in a region of the 3D culture matrix (30) imaged in the image region (3); and generating a data set (5) comprising the parameters (4) determined for the plurality of image regions (3) in the plurality of training images (2); and train the resistance and / or resistance mechanism predicting model (125) based on the data set (5) and information representative of any resistances to the multiple antibacterial agents for the bacteria of the sample and / or information representative of any resistance mechanism harbored by bacteria of the sample.

24. A computer-readable storage medium (250) comprising a computer program (240) according to claim 22 or 23.