Inpainting and Outpainting with Stable Diffusion

Inpainting and outpainting have long been popular and well-studied image processing domains. Traditional approaches to these problems often relied on complex algorithms and deep learning techniques yet still gave inconsistent outputs. However, recent advancements in the form of Stable diffusion have reshaped these domains. Stable diffusion now offers enhanced efficacy in inpainting and outpainting while maintaining a remarkably lightweight nature. In this post, you will explore the concepts of inpainting and outpainting and see how you can do these with […]

Read more

4 Ways to Crop Image in Python using NumPy, Pillow and OpenCV

Introduction In image processing & computer vision, cropping of images is a common task where we keep a specific region of interest from an image and discard the rest. In this article, we will see various ways you can crop an image in Python by using libraries like OpenCV, Pillow, and NumPy. Input Image In this tutorial, we will use the below image in all the examples of cropping image with Python.   Visualizing the Cropping Area on Image Before […]

Read more

Fine-tune Llama 3 with ORPO

ORPO is a new exciting fine-tuning technique that combines the traditional supervised fine-tuning and preference alignment stages into a single process. This reduces the computational resources and time required for training. Moreover, empirical results demonstrate that ORPO outperforms other alignment methods on various model sizes and benchmarks. In this article, we will fine-tune the new Llama 3 8B model using ORPO with the TRL library. The code is available on Google Colab and in the LLM Course on GitHub. ⚖️ […]

Read more

Ideas: Exploring AI frontiers with Rafah Hosn

[MUSIC FADES]  My guest today is Rafah Hosn. She’s a partner, group product manager for AI Frontiers at Microsoft Research. I’d call Rafah a sort of organizational conductor, working both with leaders to drive clarity around the mission as well as program managers to make sure they have solid operational strategies to execute on it. Rafah has mad skills in bringing research ideas from lab to life, and I’m thrilled to talk to her today. Rafah Hosn, welcome to Ideas!  RAFAH HOSN: […]

Read more

What’s Lazy Evaluation in Python?

Interactive Quiz ⋅ 7 QuestionsBy Bartosz Zaczyński Lazy evaluation is a programming concept where the evaluation of an expression is deferred until its value is actually needed. This can lead to performance enhancements by avoiding unnecessary calculations, and it can also allow for the creation of potentially infinite data structures. As you embark on this quiz, you’ll test your knowledge of lazy evaluation in Python and learn how to apply this concept to write cleaner and more efficient code. The […]

Read more

Python Sequences: A Comprehensive Guide

Interactive Quiz ⋅ 12 QuestionsBy Martin Breuss In this quiz, you’ll test your understanding of Python sequences. By working through this quiz, you’ll revisit the basic characteristics of a sequence, operations common to most sequences, special methods associated with sequences, and how to create user-defined mutable and immutable sequences. The quiz contains 12 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The […]

Read more

Python Basics Exercises: Scopes

On your Python journey, you’ve worked with functions and loops. To fully understand functions and loops in Python, you need to be familiar with the issue of scope. In this Python Basics Exercises video course, you’ll practice: Identifying the scope of objects Working with the global keyword Exploring the LEGB rule for scope resolution Using the return statement in a function Scope can be one of the more difficult programming concepts to understand, so in this video course, you’ll get […]

Read more

Write Unit Tests for Your Python Code With ChatGPT

Having a good battery of tests for your code may be a requirement for many Python projects. In practice, writing unit tests is hard and can take a lot of time and effort. Therefore, some developers don’t like to write them. However, with large language models (LLMs) and tools like ChatGPT, you can quickly create robust and complete sets of tests for your Python code. In Python, you can use multiple different tools for writing tests. The most commonly used […]

Read more

Using LoRA in Stable Diffusion

The deep learning model of Stable Diffusion is huge. The weight file is multiple GB large. Retraining the model means to update a lot of weights and that is a lot of work. Sometimes we must modify the Stable Diffusion model, for example, to define a new interpretation of prompts or make the model to generate a different style of painting by default. Indeed there are ways to make such an extension to existing model without modifying the existing model […]

Read more

Generate Realistic Faces in Stable Diffusion

Stable Diffusion’s latest models are very good at generating hyper-realistic images, but they can struggle with accurately generating human faces. We can experiment with prompts, but to get seamless, photorealistic results for faces, we may need to try new methodologies and models.In this post, we will explore various techniques and models for generating highly realistic human faces with Stable Diffusion. Specifically, we will learn how to: Generate realistic images using WebUI and advanced settings. Use Stable Diffusion XL for photorealistic […]

Read more
1 47 48 49 50 51 907