profile

Machine Learning for Medical Imaging

🤖 ML Model to Control Another ML model!

Published about 1 year ago • 1 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 to have more control over text-to-image diffusion models

In text-to-image generation models, you can specify many attributes to customize your generated image.

You can for example specify the color of the hair of a person, or if an animal is large or small.

But what if you want to push the level of control even further?

For example, imagine adding as input to your diffusion model, an image of edges which could be used to highlight more details of the generated object.

Now, such a solution exists! It’s a neural network that’s used as a control mechanism for diffusion models.

The network is called ControlNet.

The figure below illustrates an example of how you can control details by sending as input:

  • The prompt: “a high-quality, detailed, and professional image”.
  • An image of Canny edges that was extracted from another image.

Important things to understand:

1 - We don’t use the original image of the deer as an input. We just extract edges from it, and then use the image of the edges as extra input.

2 - We don’t mention anything about the object at hand (in this case the deer).

​

​

How do you go from training locally to training on the cloud as quickly as possible?

Imagine this scenario.

You are training a deep learning model locally.

After some time, you realize that you don't have enough resources locally and that your training will take a long time.

You decide to switch to training on the cloud.

What you would usually need to do is to rent an instance on a cloud provider and then setup everything on that instance, just like you have on your local machine.

Another approach would be to dockerize your code and then push your docker image to a container registry on one of the cloud providers.

Both of these approaches can be tedious.

Here's another solution that you may not know about.

If you're training a tensorflow model, you can use a tool called Tensorflow Cloud.

With a few lines of code, you can go from training locally to training on google cloud.

The code snippet below illustrates this. And a full colab notebook example can be found here.

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