Turn portrait photos into crosshatch drawings using automatic segmentation and hatch pattern blending.
Crosshatching is a drawing technique where layers of parallel lines are overlaid at different angles to create tonal effects. Artists use denser, overlapping hatches for dark areas and sparse hatches for light areas. This project automates that process: segment the subject, analyze its tonal range, and map hatch textures onto different brightness zones.
- Segment the subject from the background using rembg
- Resize the image to match the hatch texture dimensions
- Layer the subject onto a white background
- Analyze the tonal range via histogram and compute threshold boundaries
- Apply a different hatch pattern to each tonal region
- Blend the hatch layers into the final crosshatch drawing
- Go to joeljose.github.io/Crosshatch
- Drop a portrait photo or click to browse
- Choose a hatch style and click Process
- Download the result as JPG or PNG
Everything runs in your browser — no images are uploaded to any server.
- Click the "Open in Colab" badge above
- Run all cells
- Upload your portrait to the Crosshatch folder via the sidebar
- Download the result
| Style | Description |
|---|---|
| Horizontal | Classic parallel lines — clean, traditional look |
| Vortex | Circular swirl pattern — more artistic and dynamic |

