🤖 ML Model to Control Another ML model!


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

👉 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

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 ↓ AI Scribes: Transforming Medical Documentation Web Application for Medical Note Generation AI-powered medical scribes are revolutionizing clinical workflows by automating...

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 ↓ DeepSeek: A New Player in AI for Healthcare The new open-source LLM, DeepSeek, is creating buzz for its potential to transform AI in medicine and healthcare. Designed for...

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 ↓ Now You Can Use Large Language Models that are HIPAA Compliant People are finding ways to use large language models in all fields. MedTech is no exception. The amount of work...