 Medical images analysis has to scale, so let's automate it. Hi, my name is Guillaume Moutier. I am a technical evangelist at Red Hat in the storage business unit. So what are we trying to achieve? What is our problem? Let's say we are at an hospital and we have X-ray images to review. Well, of course, an AIML model can definitely help. But how can we efficiently analyze the images as they come in? For a continuous flow of thousands of images? How can we continuously retrend a model and redeploy it seamlessly? And at various locations simultaneously? Well, my answer to that is to use cloud-native architecture and patterns. In this demo, we will use bucket notifications with Red Hat self-storage, Kafka topics with the MQ streams, KDTive eventing and KDTive serving with OpenShift serverless, and finally Tecton CD with OpenShift pipelines. So here is the workflow of the demo. Imagine we are at an hospital, that's a rage location. We will send a flow of X-ray images inside a self-object storage bucket. This will automatically trigger a notification and this message will be sent to a Kafka topic. Using KDTive eventing with a subscriber to this topic, KDTive serving will launch one or many parts depending on the load. Those parts will run an inference model to assess the risk of pneumonia. The result will be written on the image and a notification will be sent to a doctor. But if the model is not really sure of its assessment, let's say under 80% of certainty, a copy of the image will also be anonymized, removing the personal information that are printed on it and sent to a central data science lab. Here the image can be reviewed and classified by specialists and the model can be retrained using the same automated pattern. Once the new model has been generated, it is pushed to a Git repo, which will trigger a rebuild of the risk assessment container image that will automatically be deployed seamlessly. Of course, this risk assessment pipeline can be reproduced at many other locations at the edge, each one benefiting from this shared model training. Let's go see its running. First, let's take a look at my OpenShift environment. In my project, I have an image generator, which will generate this flow of images that are sent to our SAV bucket. I have a Kafka topic subscriber that's part of KDTive eventing, and I have my KDTive serving risk assessment service. For this demo, I've merged the two functions of the risk assessment of the anonymization of the image. That's for the sake of this demo. I have also in my project a deployment of Grafana, where I will have this dashboard where we will be able to monitor this flow. We'll see it in a moment. I have also some helpers, a database where I will record all the events happening, so all the images coming in, processed and anonymized. I have a small helper here in the image server that will allow us to see those live images coming into Grafana. Here is our Grafana dashboard. Let me launch the model. I will just patch the image generator to tell him to send a new image into the bucket every second. Now that the process has started, let me give you a quick tour of this dashboard. Here, of course, you can see the pipeline live with the number of images that are uploaded. The number of images that are processed and eventually the number of images that are anonymized. That's when the model again is unsure of its certainty. We have here a panel with the CPU and RAM usage. A panel with the number of containers that the risk assessment pods are running and the number of deployments it uses. You see it has some slight delay in displaying the result, but we can see here that we have one replica of the risk assessment pod, which contains two containers. We have also here a panel that gives the risk distribution for the model with the normal pneumonia or unsure assessment and the number of images that are processed by model version. Here it's pretty much straightforward with the list of the last 10 uploaded images, the last 10 processed images, and the last 10 anonymized images. Of course, you can see that there are less anonymized images than the total of uploaded or processed. This is also what we can see here on the risk distribution because the model that we are using here is relatively good with an 85% of certainty. It works well. Finally, we have here on this panel a display of the last uploaded, the last processed, and the last anonymized image. As it's quite difficult to see here what's happening, I have another panel where we can see those images at a greater scale. It's not so easy to see. Let's wait for images that are better. Let's do this with this one. Here you have the kind of images that are uploaded. A pure X-ray image with some personal information here at the bottom left that gives the name and date of birth and other information. Here that's how we process the image. What we do, we make a risk assessment here and we print it on top of the image. That's what it's printed here, unsure with a risk of 72%. We are unsure because it's less than 80% of certainty. But we still have this personal information written here in the bottom. What we do in the process is that we anonymized the images by blurring here this part where the personal information are. If we go back to our main panel, we will see also that we change the name of the images themselves. We remove the names that are here and the date of birth that is here. We generate some UID that can be linked to the patient file at the hospital. You see our process is going well, but I will try to put some more pressure on it by sending 10 images per second and we'll see how it scales. What I will do at the same time is also change the version of the model we use. Let's say we have received those images at our data science lab and we have trained a new model. This model now will be pushed to a repo which will trigger a change of model that is used here in our pipeline. Let's do this. We can see now that as we have increased the rate of images that are produced, the risk distribution, we can see that the number of images that are processed is growing up much faster. To face this new workload, we have now two deployments of our risk assessment pod to be able to handle this load. At the same time, we can see that we have switched models. Now we are using the version 2 model to process our images. We could also increase this rate many more times or we could put it down to zero and those pods will just go down to zero and our resources consumption would go to zero. That's how Knetif serving works. You can see that so far we have processed hundreds of images. This could be thousands. The whole pipeline we scale accordingly. We have also made a change in the model that we are using and we can see that there was no involvement of any team to be able to redo this pipeline. Everything has been fully automated. That's exactly how you can scale your data pipelines for data science, for example. I hope you have liked this demo. If you want to try it or learn how it's done, head out to my GitHub repo where you will find detailed walkthrough, detailed instructions on how to set up the different elements to be able to reproduce this demo yourself. Of course, you will find all the code that I'm using to make this. Thank you for your attention and have a great summit with Red Hat. Take care.