SI-Edit: Toward Sketch-Instruction Guided Local Image Editing with Pixel-Level Precision
To overcome the lack of high-quality benchmarks for pixel-level sketch-based image editing, this paper introduces the SI-Data dataset and the SI-Edit framework, which leverage multimodal large language models to synthesize instruction-guided quadruplets and achieve precise, semantically aligned local deformations through a collaborative spatial-semantic learning approach.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to give a very specific, tiny instruction to a magical artist who can paint anything you want. You might say, "Make that flower stem bend into a smooth S-shape." But here's the problem: the artist is a bit of a daydreamer. They hear "S-shape" and might bend the stem in the wrong spot, or they might turn the whole plant into a snake instead of just curving the stem. This is the challenge of image editing using artificial intelligence. Scientists have built powerful "generative models"—think of them as digital artists trained on millions of pictures—that can change images based on text. But when you ask for a tiny, precise change, like bending a single leaf or stretching a flame, these digital artists often get confused. They might change the wrong part of the picture, or they might misunderstand exactly how you want it to change.
To fix this, researchers have tried two main tricks. One is to give the artist a sketch, like drawing a line on the screen to show exactly where to bend. The other is to give text instructions, like writing "bend it here." But each trick has a flaw. If you only give a sketch, the artist doesn't know what to do (do you want to copy the leaf, move it, or just bend it?). If you only give text, the artist doesn't know where to do it. This paper, SI-Edit, tries to solve this by teaching the artist to listen to both the sketch and the text at the same time, acting like a super-precise digital sculptor who can reshape an image down to the very last pixel.
The Problem: The "Lost in Translation" Artist
Imagine you are playing a game where you have to describe a drawing to a friend who can only draw what you say. If you say, "Make the tree branch curve," your friend might curve the wrong branch, or they might draw a whole new tree. This is what happens with current AI tools that only listen to text instructions. They are great at big changes, like "turn the sky blue," but terrible at tiny, precise ones. They lack a "spatial anchor"—a way to know exactly which pixel to move.
On the other hand, if you only give a sketch (a line drawn on the screen), the AI knows where to draw but not what to do. Is that line meant to move a leaf? Copy it? Or just bend it? Without a clear instruction, the AI might guess wrong, leading to weird results like a leaf that suddenly turns into a copy of itself, or a stem that vanishes.
The authors of this paper realized that to get perfect, pixel-level control, you need both: a map (the sketch) and a destination (the text). But there was a big hurdle: no one had ever built a training manual for an AI that combined these two things perfectly.
The Solution: A New Training Manual and a New Artist
To fix this, the team first had to build a massive, high-quality training dataset called SI-Data. Think of this as a giant cookbook for the AI. Instead of just showing the AI "before" and "after" pictures with a text description, they created quadruplets—sets of four things that go together:
- The original image (the starting point).
- The target image (what it should look like after the edit).
- A sketch (a simple line showing the exact shape change).
- An instruction (the text telling the AI what to do).
They didn't draw these by hand; that would take forever. Instead, they used a clever automated pipeline. They took beautiful photos, asked a smart AI (Qwen3-VL) to invent a specific editing instruction (like "stretch the tent"), and then used another AI (Nano Banana Pro) to actually make the change. Then, they used a mathematical trick called optical flow to automatically draw the "sketch" by seeing how the pixels moved from the original to the new image. This gave them 6,500 perfect examples of how to combine a sketch and a text instruction to make a precise edit.
How SI-Edit Works: The "Same Position" Trick
With this new dataset, they built a new editing tool called SI-Edit. This tool is designed to be a "collaborative" artist. It doesn't just look at the text or the sketch; it looks at them together.
The paper introduces two main tricks to make this work:
- The "Task-Trigger" Token: They added a special secret code word, written as
<sk>, to the beginning of every instruction. Think of this like a bell that rings before the artist starts painting. When the AI hears "bell" (<sk>), it knows, "Oh, I need to pay extra attention to the sketch lines I'm about to see." This helps the AI understand that the sketch isn't just a decoration; it's a strict rule. - Same Position Encoding (SPE): This is the most important part. Imagine you are tracing a picture on a piece of glass. You have the original picture underneath and your sketch on top. If you don't line them up perfectly, your drawing will be off. The AI usually treats the sketch and the original image as two separate things, which causes them to get "drifted" apart. SI-Edit forces the AI to treat the sketch and the original image as if they are in the exact same spot in its brain. It overlays the sketch on the image and tells the AI, "These two things are at the same coordinates." This stops the AI from getting confused about where the bend should happen.
What They Found: Precision at the Pixel Level
The team tested SI-Edit against other popular tools like SketchEdit, MagicQuill, and FramePainter. The results were clear: SI-Edit was much better at following the rules.
- Geometric Precision: When measuring how closely the AI followed the sketch lines, SI-Edit had a score of 4.292 (lower is better), while the next best tool, MagicQuill, scored 7.434. This means SI-Edit's bends and curves were much closer to what the user actually drew.
- Semantic Understanding: When checking if the AI actually did what the text said (like "stretch" vs. "copy"), SI-Edit scored 0.0174 on a metric called CS, beating all other methods.
- User Preference: When real people looked at the results, they preferred SI-Edit over the others 81.3% to 94.8% of the time, depending on what they were looking for (visual consistency, accuracy, or image quality).
The paper also showed that this tool could do more than just bend things; it could even change a person's pose, like making a martial artist shift their stance, while keeping their face and clothes looking exactly the same.
The Bottom Line
The authors suggest that by combining a clear map (the sketch) with a clear destination (the text), and by teaching the AI to treat them as one unified guide, we can finally get image editing tools that are precise enough to handle tiny, complex changes without messing up the rest of the picture. They didn't just build a better tool; they built the first public dataset that teaches AI how to do this, opening the door for future researchers to create even smarter digital artists. The paper concludes that while the problem of "spatial ambiguity" (not knowing where to edit) and "semantic blindness" (not knowing what to edit) was a major roadblock, this collaborative approach successfully clears the path for pixel-perfect editing.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.