This commit is contained in:
2026-03-09 20:43:30 -07:00
parent 44926b751d
commit 1b13072412
14 changed files with 23 additions and 5 deletions

View File

@@ -11,18 +11,25 @@ This skill creates alpha masks from images based on user requests. Use this when
### 0. Extract layer (conditional)
If the user provided a layer name from an ora file, you should use the ora-editing skill to extract a png of that layer. First use the inspect to list the layers, then use the extract.
### 1. Draw Polygon Outline
Use the `polygon-drawer` skill to draw a polygon outline around the identified object. Save the output to `./tmp/` with a sensible filename:
### 1. Draw Polygon Outline (optional, default)
Use the `polygon-drawer` skill to draw a polygon outline around the identified object. If the user asks to bypass the polygon, do so. Save the output to `./tmp/` with a sensible filename:
- Format: `<original_name>.<object>.png`
- Example: If the user wants a door mask from `room_010.png`, name it `room_010.door.png`
### 2. Extract Mask
Run the `extract_mask` script to generate the alpha mask:
Run the `extract_mask` script to generate the alpha mask. If a polygon was added, make sure to include "with the <color> outline", or "outlined in <color>". You can also explicitly omit things:
```bash
source ./tools/venv/bin/activate
python tools/extract_mask.py "the door with the red outline" ./tmp/<original_name>.<object>.png ./tmp/<original_name>.<object>.mask.png
```
Examples:
- The boulder outlined in red
- The door with the blue polygon around it
- The fence, excluding the bushes behind it
- The house, including the windows and chimney, outlined in blue
- The mailbox, including the flag, omitting the house behind it
### 3. Quality Check
Examine the generated mask using the `image-expert` agent:
- Check if the mask is precise and accurate