profile

Machine Learning for Medical Imaging

RunPod is Awesome for ML, Here's Why

Published 7 months agoΒ β€’Β 3 min read

Hello Reader,

Welcome to another edition of PYCAD newsletter where we cover interesting topics in Machine Learning and Computer Vision applied to Medical Imaging. The goal of this newsletter is to help you stay up-to-date and learn important concepts in this amazing field! I've got some cool insights for you below ↓

​

ML Deep Dive: Small Modifications, Big Improvements

I've used lots of deep learning models for image segmentation in my career. Here's one issue that we constantly faced when using them through an API.
​
Image segmentation models such as YOLOv8 or Mask RCNN are very useful in a variety of computer vision applications.
​
If you're building a cloud based image segmentation solution, you most likely will need to deploy your model through an API.
​
This means that your model will live in a separate entity like a docker container.
​
In most scenarios you'll have a REST API that controls how your backend or frontend interacts with the model.
​
These models produce masks as the main output.
​
These masks are basically binary images that have the same size as your input images.
​
If you return these masks from your REST API as they are, it will require a lot of time to transmit that information from your API to your backend or frontend server.
​
This will quickly become a bottleneck for your application performance.
​
Solution?
​
Don't return full masks. Return polygons instead.
​
Polygons represent the border of the masked regions.
​
This means that they require a lot less time to transfer.
​
Big win for performance!
​
But you need masks in the backend and frontend and not polygons right?
​
Well, just reconstruct the masks from the polygons.
​
You can use a function like cv2.fillpoly to achieve this.
​
Sometimes small modifications can lead to great improvements in terms of performance.

RunPod is Awesome!

I continue to test functionalities from RunPod and so far I’m really loving it!

Last week I created an inference endpoint that serves a deep learning model with a per-use cost model. So I only pay when an actual inference happens.

This week I tested their VM instances.

It is extremely simple to create one.

You have several options, you can clearly see the pricing, and it’s as easy as a click of a button to deploy the VM.

It’s also simple to connect to the VM through VS Code.

I am currently renting a machine that’s costing me around $0.5/hour.

But this machine has:

  • RTX A5000 with 25GB of GPU memory.
  • 9 vCPU with 50GB of RAM
  • 600 GB Pod Volume.

What am I doing with it? Testing nnUNetv2 for medical imaging segmentation!

​

Tweet of the Day


A Word About the Ongoing Conflict in Palestine

My friends, as you probably know, there is a war going on in Palestine right now. It hits close to home because I consider Palestinians as my own. We speak the same language and we follow the same values and traditions.

There has been an extreme case of misinformation going on. Even AI, which is a technology that we all admire has been used to amplify that misinformation. I have never seen this level of propaganda in my life.

Hence, my message to you my dear subscriber is to not just consume news as they are. Try to be critical when you read news about this ongoing conflict.

We often speak about bias and its effects on AI applications. We are now witnessing, in real time, a media bias that is almost completely one sided. This has caused more and more deaths, atrocities and even genocide to the people of Gaza.

To help you understand better the Palestinian side, which is the less powerful side in the information war, I want to share with you this, this and this video.

Stay blessed and stay informed.


That's it for this week's edition, I hope you enjoyed it!

​

Machine Learning for Medical Imaging

by Nour Islam Mokhtari from pycad.co

πŸ‘‰ Learn how to build AI systems for medical imaging domain by leveraging tools and techniques that I share with you! | πŸ’‘ The newsletter is read by people from: Nvidia, Baker Hughes, Harvard, NYU, Columbia University, University of Toronto and more!

Read more from Machine Learning for Medical Imaging

Hi Reader,, Welcome to the PYCAD newsletter, where every week you receive doses of machine learning and computer vision techniques and tools to help you learn how to build AI solutions to empower the most vulnerable members of our society, patients. TotalSegmentator : Whole Body Segmentation at your Fingertips This free tool available online can do full body segmentation, it's called TotalSegmentator. I have already mentioned this tool in a previous edition of the newsletter, but in this...

9 days agoΒ β€’Β 3 min read

Hello Reader, Welcome to another edition of PYCAD newsletter where we cover interesting topics in Machine Learning and Computer Vision applied to Medical Imaging. The goal of this newsletter is to help you stay up-to-date and learn important concepts in this amazing field! I've got some cool insights for you below ↓ A Medical Imaging Expert Told Me This Recently I saw a post on LinkedIn where a medical imaging expert showcased his work of segmenting the lungs and its bronchial trees. You can...

16 days agoΒ β€’Β 2 min read

Hello Reader, Welcome to another edition of PYCAD newsletter where we cover interesting topics in Machine Learning and Computer Vision applied to Medical Imaging. The goal of this newsletter is to help you stay up-to-date and learn important concepts in this amazing field! I've got some cool insights for you below ↓ How we helped accelerate inference time for a client's AI product Below is a screenshot of a benchmark we did for a client of ours. The goal was to accelerate inference time. This...

22 days agoΒ β€’Β 3 min read
Share this post