Frame, refine, and export consistent portraits. All on your device.
Releases · Quickstart · Build instructions · Report a bug / Request a feature
The desktop app, terminal command, and packages use the HeadshotFlow name. Existing preferences, saved sessions, recovery workspaces, and model downloads are available after upgrading.
HeadshotFlow is an offline desktop editor and command-line tool for preparing profile pictures. Import portraits, adjust framing and brightness, optionally remove the background, and export a single photo or a batch without overwriting originals. The default output is up to 768 × 1024 pixels, portrait 3:4, with 70% crop zoom, 8% headroom, Fast background removal, white JPEG backdrop, JPEG quality 80, and Standard screen sharpening.
Native Linux screenshot showing the three built-in sample portraits with Fast background removal.
Table of contents
- Side-by-side editing: source framing in Preview / Crop and the decoded current-photo export preview in Result, with a draggable divider and collapsible queue and Frame / Refine inspector.
- Portrait framing: face-aware automatic crops, adjustable headroom, 40–100% crop zoom, dragging, arrow keys, rotation, and per-photo review gates.
- A built-in sample batch: try framing and background removal on three generated portraits. Loading it again returns to the first sample without duplicating the batch.
- Refinement: perceptual brightness and reference-portrait brightness matching.
- Local background removal: Fast or optional High Quality, Keep/Remove brushes, feathering, and transparency.
- Screen sharpening: enabled by default at Standard; choose Low / Standard / High or turn it off.
- Flexible output: JPEG or PNG, default size cap, source-sized or custom 3:4 output without automatic upscaling, prefixes, and collision-safe filenames.
- Input formats: JPEG, PNG, WebP, TIFF, HEIC, and camera RAW, with RAW white-balance presets, temperature/tint, and highlight recovery.
- Batch work: folder import, preparation and export for checked photos, whole-queue ZIP, per-photo approvals, reusable presets, sessions, undo, and reset.
- Appearance: light/dark themes, 80–150% UI scaling, Graphite/Blue accents, and embedded fonts throughout Qt controls and dropdowns.
C++20 · Qt 6 Quick/QML · OpenCV · ONNX Runtime · LibRaw · libheif/libde265 ·
libarchive · libtiff · libwebp · CMake/Ninja. GUI and CLI share the same headshotflow_core engine.
Check Releases for published packages. If a package is unavailable for your system, build from source below. Release targets are Windows 11 x64, Ubuntu 24.04+ x64, and macOS 14+ on Apple Silicon. Portable packages are configured to include runtime dependencies, face detection, and the Fast model. High Quality is a separate download.
These are packaging targets, not a claim that every revision has been validated on every platform. See build results and distribution notes for the actual build and signing status.
Install Qt 6.8+, a C++20 compiler, CMake, Ninja, Python 3.10+, and the native libraries listed in Building and distribution. Then:
git clone https://github.com/wispdevon/HeadshotFlow.git
cd HeadshotFlow
python3 scripts/fetch_assets.py
cmake --preset dev
cmake --build --preset dev
ctest --preset dev
./build/headshotflowOn Windows, run build/headshotflow.exe. On macOS, run
build/headshotflow.app/Contents/MacOS/headshotflow. The installed app does not need a
Python interpreter; Python is used by development scripts.
# Build, test, and install the current workspace for your user; no sudo.
scripts/install-local.sh
# Alternatively, build a pacman package including local source edits.
scripts/package-arch-local.shThe user install lives under ~/.local and includes a desktop launcher. Reopen
HeadshotFlow after an update; ~/.local/bin/headshotflow --version reports its build ID.
The Arch package uses system libraries and requires administrator authentication
to install. An AUR-ready headshotflow-git recipe is in packaging/aur;
adding it to this repository does not automatically publish it to AUR.
See Arch packaging.
The slim toolbar provides Add photos…, Add folder…, and Load sample. The queue and inspector buttons show or hide those panels. Workspace actions contains Open session…, Save session…, Load preset…, Save preset…, Appearance…, and Models…. Photo actions contains Apply to all…, Fully automatic batch, Undo, Reset photo, and Refresh preview. Queue actions contains Prepare selected and Remove selected.
Load sample adds a built-in batch of three generated portraits. On a fresh workspace, all three are checked. Loading the sample again returns to its first photo, adds any missing sample entries, and leaves existing sample settings and checked states in place. Folder import with Add folder… includes subfolders. See the desktop quickstart for a guided batch export.
The editor has Frame and Refine tabs. Preview / Crop shows the full oriented source with a crop outline. Drag the outline or use the arrow keys. Result shows the decoded output for the current photo using its current settings. It does not change to reflect output size or style edits made in Export as…. Those choices customize the export without changing the photo’s editor settings. In a batch, Result is the current photo’s preview, not a preview of every queued photo.
In Refine, choose Keep brush or Remove brush and paint directly on Result to correct the automatic background mask. Clear strokes removes the current photo’s corrections. A framing edit clears those strokes. Undo and presets are also scoped to the open photo unless you confirm Apply to all…. Applying to all copies the open photo’s controls to every queued photo and future imports, recalculates crops, clears manual framing and brush strokes, and invalidates approvals.
The queue shows the checked count and how many checked photos a filter hides. Previous and Next move through the active filter. Next review finds another photo needing review anywhere in the queue and keeps the filter. Prepare, export, and remove actions include checked photos hidden by the filter.
In Export as…, choose one of three scopes. Current photo exports the open photo regardless of its checkbox. Checked photos includes checked photos, including those hidden by the filter. Whole queue ZIP includes every queued photo. The dialog sets output size, format, filename prefix, JPEG quality and backdrop, and screen sharpening when you choose a shared style. Use each photo’s output settings applies each photo’s assigned format, size, prefix, and related settings. Turn it off to edit a shared style. With three sample photos checked and no prior successful export, the first export defaults to Checked photos (3) with Use each photo’s output settings enabled.
If there is no remembered successful destination, the first click on Quick Export
opens Export as…. After a successful export, Quick Export repeats its scope,
settings, and destination. A newly loaded preset for the current photo takes
precedence over a remembered shared output style on the next Quick Export.
Checked-photo export with per-photo settings continues to use each photo’s
assigned settings. A missing or unwritable destination opens Export as… so
you can choose another. If the
remembered ZIP already exists, Quick Export opens the dialog and asks before
replacing it. Folder exports save successful photos and write a JSON report. A
hold, failure, or cancellation can leave a partial folder export. A ZIP is
published only after every photo passes processing and review, and a failure or
cancellation leaves the existing destination intact. A successful ZIP contains
export-report.json. Duplicate output names receive numeric suffixes.
- 100% uses the automatic frame; 40% shows a wider frame.
- Headroom is the requested fraction between the top of the crop and the estimated top of the head. Its default is 8%, adjustable from 0–25%.
- Zoom accounts for headroom. Changing headroom recalculates the frame without resetting your chosen zoom percentage.
- Source boundaries can limit widening or headroom; the app reports the limitation.
- Drag the left crop, or focus it and use arrow keys. Moving the frame, undo, and sessions preserve the selected zoom. Older sessions with a manual crop use that saved frame as their 100% baseline.
Result shows Updating… while processing. Mouse-driven sliders and crop dragging process on release. Refresh preview recomputes the current settings.
The three embedded sample portraits use the same local face detection and background removal as imported photos. They are copied to the app cache. Repeated Load sample clicks return to the first existing sample and do not duplicate the batch.
Both removal modes see 10 percentage points of wider crop context: a 65% export crop uses a 55% removal frame, and 40% uses a removal-only 30% frame. The extra frame follows the current crop position and headroom anchor, limited by source boundaries. The predicted mask is mapped back onto your selected crop; export framing, dimensions, and brush coordinates stay unchanged. This puts model boundary imperfections farther outside the finished crop where space permits. In Refine, paint Keep brush and Remove brush strokes directly on Result to correct the mask on the open photo. Clear strokes removes them. Framing changes clear strokes. The brush coordinates follow the visible output. Edge feather shows its value in output pixels (0–10 px, in 0.5 px steps). New photo settings default to 0.0 px, so Fast has no added feather blur. Fast uses MODNet portrait matting at 512 × 512, then refines its prediction against the source crop at up to 1200 × 1600 pixels (1.92 MP), before resizing the mask for export. Image-guided refinement aligns the boundary with visible luminance edges. Confident background (≤10%) becomes transparent and confident foreground (≥90%) becomes opaque; image borders replicate neighboring pixels so refinement adds no transparent border. This is higher-resolution reconstruction, not a higher-resolution neural model, and cannot recover every missed hair or separate similar-colored regions. Uncertain boundary probabilities and mask resizing can still produce partially transparent pixels at zero. Feathering affects the automatic mask; manual Keep/Remove strokes are applied afterward with firm edges. Increase feathering to add blur to the automatic mask explicitly. Saved presets and sessions retain their chosen value. Transparent pixels appear against a checkerboard. Export PNG to retain transparency or JPEG to composite onto the selected backdrop.
Sharpen for screen is checked by default at Standard in Export. Low and High decrease or increase its strength. It runs after resizing and brightness, before background composition and encoding, so both previews and exports include it. These are HeadshotFlow's own presets using Lightroom-style level names, not an exact reproduction of Lightroom or Capture One's proprietary processing.
Appearance offers Light/Dark theme, UI scales of 80%, 90%, 100%, 110%, 125%, and 150%, and Graphite / Blue button accents. Defaults are 100% and Graphite; theme initially follows the OS. Preferences apply immediately and persist locally.
Inter Medium is used for work text and Qt dropdown entries, DemiBold for actions,
Space Grotesk Bold for headings, and Geist Mono for dimensions and zoom readouts.
Fonts are embedded and checked at startup. UI scaling includes controls, spacing,
panels, and app popups, on top of Qt display scaling. File dialogs use their own
typography and scaling. On Linux, HeadshotFlow defaults to Qt's built-in dialogs.
On systems with a working portal theme, launch headshotflow -platformtheme xdgdesktopportal
to use the system's configured file chooser. Export dimensions do not change.
The queue and inspector buttons toggle sidebars. Narrow workspaces show one at a time. Inspector tabs scroll independently. Workspace actions contains session, preset, appearance, and model commands.
| Mode | What it loads | Model file size | Inference input | Intended use |
|---|---|---|---|---|
| Off | No background-removal inference | — | — | Preserve the existing background |
| Fast | MODNet photographic portrait ONNX model, bundled | 25.89 MB | 512 × 512 | Portrait matting with a smaller model than High Quality |
| High Quality | Optional BiRefNet portrait ONNX model | 972.67 MB (about 928 MiB) | 1024 × 1024 | Portrait-focused masking when Fast is insufficient |
Automatic framing can still use the bundled YuNet face detector (0.23 MB) and Fast model to estimate head position, even when background removal is Off. Model identities, exact download URLs, and SHA-256 hashes are pinned in the manifest; inference is implemented in models.cpp.
High Quality uses BiRefNet's human-portrait model to estimate which pixels
belong to the subject. It produces a soft foreground mask, which HeadshotFlow uses
for PNG transparency or JPEG background composition. It does not generate a new
person, replace facial features, or recover missing image detail. The upstream
model is identified as birefnet-portrait in rembg's model list.
The downloaded file is BiRefNet-portrait-epoch_150.onnx, exactly
972,666,916 bytes, hosted in the pinned rembg release. HeadshotFlow loads that
model through ONNX Runtime; it does not install Python, PyTorch, or the rembg
application. Downloading stores the file on disk. The inference session is created
when an image first needs High Quality and then cached for reuse. The desktop
asks Load High Quality? before that first load, with the RAM estimate and
cache lifetime. This covers previews, batches, exports, presets, and restored
sessions. Cancel stops the pending operation without loading the model or
changing the existing preview; choose Fast or Off to continue without High Quality.
A failed load asks again on retry. After a successful load, later uses do not
prompt or reload the model while the app remains open. Confirmation is not saved
across app restarts. The CLI remains non-interactive.
For High Quality, the pipeline extracts the wider removal frame from the source and bounds its long edge to 1024 pixels, then resamples it to the model's fixed 1024 × 1024 input. The predicted mask is mapped back to the selected export crop. Fast uses the same surrounding context with refinement bounded to a 1600-pixel long edge. Neither mode enlarges the export. Feathering and manual strokes apply after mapping, with feathering before strokes. See engine.cpp.
Portrait-focused inference may improve a difficult mask, but High Quality is not a guarantee of better results on every photo. Check hair, glasses, clothing, semi-transparent edges, and similar-colored backgrounds. The app uses the ONNX mask plus its own strokes/feathering; additional rembg matting or color-cleanup options are not implicitly included.
| Resource | What to expect for High Quality |
|---|---|
| System RAM | Plan for roughly 8–10 GB available to the app; 16 GB total is a practical starting point, with 32 GB more comfortable for large RAW files and multitasking. |
| Dedicated VRAM | Optional for CPU mode. CUDA uses GPU memory for weights, intermediate tensors, and workspace; High Quality can exceed available VRAM. No universal VRAM minimum has been measured. |
| GPU acceleration | Automatic NVIDIA CUDA selection with a compatible CUDA-enabled ONNX Runtime, CUDA, and cuDNN. CPU fallback on initialization or execution failure. DirectML and Core ML are not implemented. |
| Disk | About 973 MB for the optional model, plus room for the application, photos, and exports. |
| Latency | Allow for slow initial loading and potentially tens of seconds per image on CPU. Actual time depends on hardware, memory pressure, and runtime version. |
These RAM and latency figures are planning estimates, not measured minimums or cross-platform benchmarks. Model weights are only part of the memory footprint: intermediate tensors, runtime allocations, decoded photos, and previews also use RAM. A 973 MB file does not imply a 973 MB working set.
The shared desktop/CLI engine automatically tries NVIDIA CUDA when the linked ONNX Runtime exposes that provider. Unsupported operations can still use CPU. Session initialization or GPU execution failures retry on CPU, which remains selected for that model until sessions are released. Models displays the selected device for each loaded model. Image decoding, cropping, mask refinement, and export encoding still run on CPU. Sessions remain cached on their selected device.
On Arch, use onnxruntime-cuda with compatible CUDA/cuDNN packages. Standard
bundled release runtimes are CPU-only; Windows CUDA requires a compatible runtime
build and libraries too. AMD/Intel GPU and Apple acceleration are not implemented.
See ONNX Runtime CUDA requirements.
To force CPU use for troubleshooting or to reserve VRAM, launch:
HEADSHOTFLOW_INFERENCE_DEVICE=cpu headshotflowFast now uses MODNet, a portrait-matting network,
with a pinned Xenova ONNX conversion.
It is larger than the old 6.16 MB PPHumanSeg model but far smaller than High Quality.
A local synthetic 512 × 512 CPU inference test took roughly 0.2 seconds per run;
on this RTX 3060 Ti machine, a warmed CUDA inference took approximately 19–20 ms
(first inference about 608 ms). ONNX profiling confirmed CUDA execution. These
figures exclude decoding/refinement/export and are not cross-platform benchmarks.
The higher resolution and portrait-matting objective target finer subject edges;
quality still depends on the photo. Existing background: fast settings use the
new model without changing saved crop or brush coordinates.
Would downscaling a 16–24 MP original to 2 MP speed up High Quality? It can reduce source decoding and resizing costs, but it does not reduce the fixed 1024 × 1024 model computation. Segmentation receives a surrounding source crop already bounded to a 1024-pixel long edge before its model-specific resize. The original is released before background inference. Keeping the model loaded saves startup costs. A shared 128 MiB in-memory LRU cache reuses face detections and automatic masks for compatible edits, including feather, brushes, brightness, sharpening, backdrop, and encoding changes. Keys include processing pixels, dimensions, model checksum, preprocessing version, purpose (head or export), and execution device. Changed source pixels or removal context trigger new inference; entries are owned copies before feathering and strokes. Failed or cancelled processing clears the cache. Decoding and export still run on each preview. Use Fast for more responsive adjustments, then High Quality for the final mask. There is no measured High Quality speedup from a 2 MP input cap in this app.
Models → Processing device offers Automatic (default) and CPU. This local
preference persists separately from photo settings, presets, and sessions. The
HEADSHOTFLOW_INFERENCE_DEVICE=cpu launch override takes priority and is shown in Models.
Automatic tries NVIDIA CUDA only when the installed runtime exposes its provider.
Published packages bundle CPU-only inference; this engine does not enable AMD/Intel
GPU providers or Apple GPU acceleration. CUDA initialization or inference can fail
because of incompatible drivers/libraries, missing CUDA/cuDNN components, or insufficient
GPU memory. These are possible causes, not a diagnosis. CPU fallback keeps processing
available; inspect the actual error under Technical details and release models to retry.
Models shows each session’s selected device, readable CPU fallback reasons, and expandable technical errors. Release loaded models frees sessions and the processing cache while retaining photos, edits, and the completed preview. Device changes do the same. Both controls are disabled during processing. Releasing High Quality resets its load confirmation; its next use asks again.
Loaded model sessions stay cached until released, the app closes, or the CLI exits. Switching back to Fast or Off does not unload an already loaded High Quality session. Use Release loaded models if you need to release that memory. Batch work processes photos sequentially; larger sources and uncapped outputs can still increase peak RAM. Use Fast when memory or responsiveness matters most.
In the desktop app, open Workspace → Models → Download High Quality. After the download completes, select High Quality · portrait under Background removal. Or use the CLI:
headshotflow models list
headshotflow models install quality
headshotflow process portrait.jpg --output profiles/ --background quality --format pngInstallation downloads over HTTPS and verifies the pinned SHA-256 before accepting
the file. Subsequent inference is offline. Missing or corrupted weights produce
a repair instruction. Models are stored in Qt's application-local data directory
under models/; HEADSHOTFLOW_MODEL_DIR adds a model lookup directory. The CLI installation
command prints the installed path. High Quality is excluded from default packages.
# Prepare a batch; uncertain photos are held and recorded in the report.
headshotflow process photos/ --output profiles/ --report report.json
# Explicit automatic policy: largest face, or a center crop when no face is found.
headshotflow process photos/ --output profiles/ --fully-automatic --recursive
# Fast removal and transparent PNG output.
headshotflow process portrait.jpg --output profiles/ --background fast --format png
# Source crop resolution or custom 3:4 output; never automatically upscaled.
headshotflow process portrait.jpg --output profiles/ --uncapped
headshotflow process portrait.jpg --output profiles/ --uncapped --size 720x960
# Brightness, reference matching, and screen sharpening.
headshotflow process photos/ --output profiles/ --brightness 0.3
headshotflow process photos/ --output profiles/ --reference reference.jpg
headshotflow process portrait.jpg --output profiles/ --screen-sharpening low
headshotflow process portrait.jpg --output profiles/ --screen-sharpening off
# RAW development followed by the same portrait pipeline.
headshotflow process portrait.NEF --output profiles/ --white-balance custom \
--temperature 5500 --tint 1.05 --highlight 3
# Desktop presets also work with the CLI; reports support JSON and CSV.
headshotflow process photos/ --output profiles/ --preset preset.json --report report.csv
headshotflow --helpExit codes: 0 success; 2 held photos or per-file failures; 1 invalid
options or a fatal error; 130 interrupted processing. Each processed input
produces a JSON result line on stdout. Reports contain source/output paths,
status, and warnings/errors. JSON results also include diagnostics: total wall
time in milliseconds, ordered exclusive stage timings, selected model devices,
and cache hits/misses. Warm cache reuse has its own stage instead of inference.
Filename collisions receive numeric suffixes.
Use a separate path for --report. A report cannot replace an input or
reference photo, the active preset, or a photo exported by the same run. If
the conflict is with a newly exported photo, the photo remains on disk.
Desktop processing shows the current stage and operation elapsed time; batches include the current photo number. Cancellation stays pending until an active native decoder/inference call returns. Worker progress is marshalled onto the UI thread and outdated operation updates are discarded. No estimated percentages are shown.
Presets are versioned JSON shared by GUI and CLI. Save one from the desktop for
the complete settings shape. cropZoom is available in settings/presets; it is
not a separate CLI flag.
| Setting | Default | Behavior |
|---|---|---|
autoCrop |
true |
Estimate a head-and-shoulders frame |
cropZoom |
70 |
40–100%; lower values widen automatic framing |
headroom |
0.08 |
Requested fraction above the estimated head; 0–0.25 |
capped |
true |
Maximum 768 × 1024 pixels |
width, height |
768, 1024 |
Exact 3:4; both 0 for source-sized uncapped output |
brightness |
0 |
Gentle lightness shift, −1 to 1 |
background |
fast |
off, fast, or quality |
feather |
0 |
Additional mask blur, 0–10 output pixels in the desktop |
sharpenScreen |
true |
Apply sharpening at final output size |
sharpening |
standard |
low, standard, or high |
format, quality |
jpeg, 80 |
JPEG/PNG format and JPEG quality |
automatic |
false |
Allow uncertain crop fallbacks to export |
Sessions store source paths, per-photo settings, crop baselines and zoom, selection, approvals, and strokes; they do not embed photos. Preserve the original files. Presets omit photo-specific crop geometry, strokes, approvals, and reference paths. Settings changes invalidate approval for the affected image. Saving a session, preset, or ZIP cannot replace a queued source or reference photo. Opening a malformed session leaves the current workspace intact.
The desktop atomically autosaves queue order, paths, per-photo settings, strokes,
selection and active photo one second after changes, and on clean exit. Recovery
lives in the app-local data directory under recovery/, separately from manual
sessions, with current.json and one previous valid snapshot. It contains local
photo paths, so treat it as private workspace metadata. Photos are never embedded.
Every startup with recovery data offers Restore / Start fresh, including after normal exits. Restore loads metadata first; choose Refresh to process a preview. Missing photos stay listed with errors. SHA-256 source fingerprints invalidate approvals when original bytes change. High Quality consent, model sessions, processing caches and device preferences are not recovered. High Quality still asks before its next load.
A process lock prevents another instance from writing the same recovery files. That instance can read recovery but displays that autosave is unavailable. A corrupt latest snapshot falls back to the previous valid one; if neither is valid, the dialog explains the failure. Write failures remain visible without discarding edits. Use a manually saved session when autosave is unavailable.
Theme, UI scale, and accent are separate local interface preferences. They do not alter photo settings, presets, sessions, CLI processing, or export dimensions.
cmake --build --preset dev
ctest --preset dev
python3 scripts/test_cli.py build/headshotflow
# Optional native Qt screenshot matrix using synthetic inputs.
HEADSHOTFLOW_TEST_SCREENSHOTS=/tmp/headshotflow-ui-checks ctest --preset dev -R controllerpython3 scripts/benchmark.py --download
# Explicit opt-in only; requires the separately installed quality model.
python3 scripts/benchmark.py --quality --output ~/.cache/headshotflow-benchmarks/reports/qualityThe six pinned Commons portraits include attribution,
license links, checksums, and visual challenge categories. Downloads and reports
stay under ~/.cache/headshotflow-benchmarks, outside Git. The runner uses headshotflow_core
with fixed 360 × 480 PNG, 65% export / 55% removal context, zero feather, and
Standard sharpening. Each image has a cold model/cache run and three warmed runs;
OS disk caches are uncontrolled. Reports include stage timings, devices, cache
reuse, sampled RSS where available, and process-lifetime peak memory where
supported. GPU memory is explicitly unavailable. The source/mask/black/white
contact sheet needs visual review; no ground-truth accuracy score is calculated.
Derived images carry the source license and an attribution/changes file.
Local installation runs Fast whenever these public fixtures are cached. It never
implicitly downloads benchmark portraits or runs High Quality. Development needs
curl for downloading; the native runner builds with BUILD_TESTING=ON.
CI saves CTest text logs and JUnit results in a test-results-<platform> artifact,
including failed runs. Windows test executables also print assertions to the console.
Validation includes core/controller tests, CLI integration, and native Qt screenshots. Browser tools do not inspect this desktop interface. The screenshot above is Linux evidence; it does not establish Windows/macOS visual equivalence. See Building and distribution for packaging, installed-binary checks, platform dependencies, licensing, and signing.
src/ Shared engine, codecs, models, CLI, Qt controller, font loading
qml/ Desktop workspace and appearance controls
assets/ Embedded fonts, icons, model manifest, and notices
tests/ Core/controller tests and synthetic fixtures
scripts/ Asset fetch, validation, local installation, and packaging
packaging/aur/ Arch PKGBUILD and AUR metadata
cmake/ Runtime setup and dependency triplets
docs/ Quickstart, shared design, build notes, and native screenshot
.github/workflows/ Native desktop build/test/package matrix
Current functionality includes the two-pane editor, headroom-aware percentage zoom, sample portrait, screen sharpening, embedded Qt typography, and Arch/local installation workflows. Track bugs and proposed work in Issues; this README does not promise unimplemented features or a release schedule. Additional GPU providers, cloud processing, and animated/multipage image workflows are outside the current scope.
- Open an issue describing the problem or proposed change.
- Fork the repository and work on a focused branch.
- Follow AGENTS.md, DESIGN.md, and the build instructions.
Keep image processing in
headshotflow_coreso desktop and CLI behavior agree. - Run the relevant tests and include native screenshots for UI changes.
- Use a Conventional Commit subject and open a pull request with the change and validation results. Do not commit ONNX weights, build products, or private photos.
- Local processing: no accounts, analytics, uploads, or cloud inference. Only explicit model installation uses the app's network download path.
- Originals stay untouched: exports remove source EXIF/GPS metadata and include an sRGB profile. Batch exports also write a JSON report in the output folder. Session/report files contain local paths; share them deliberately.
- Framing is a heuristic: 8% headroom and the automatic head-size target are composition choices, not identity-photo certification. Hats, poses, cropped heads, and multiple subjects can require review.
- Masks need inspection: neither removal model guarantees perfect hair, transparent edges, or separation from a similar-colored background.
- Sharpening can emphasize noise: the current screen presets use an alpha-weighted luminance unsharp mask, 0.6px Gaussian sigma, a 1/255 detail threshold, and amounts 0.35/0.65/1.0. Adjustment is limited to ±0.1; alpha is unchanged.
- JPEG remains lossy: brightness uses a monotonic Oklab lightness curve with endpoint protection and gamut mapping, but encoding cannot guarantee that every tonal distinction survives compression.
- RAW support is bounded by LibRaw: development is not the camera maker's picture style. Temperature/tint are approximate; highlight recovery cannot restore clipped sensor data. Universal camera compatibility is not promised.
- HEIC input is SDR: PQ/HLG HDR HEIC must be converted to SDR first.
- Cancellation has stage boundaries: an active decoder or inference call finishes before cancellation is observed. High Quality may therefore take time to stop.
HeadshotFlow is licensed under Apache-2.0. Dependencies, fonts, and model weights retain their own licenses; see Third-party notices and the notices distributed with the application.
Built by Devon Labs. For support, bug reports, and feature requests, use HeadshotFlow Issues.
- Best-README-Template for the README structure.
- BiRefNet and rembg for portrait segmentation research and the published ONNX model.
- OpenCV Zoo for YuNet face detection.
- MODNet and Xenova for Fast portrait matting.
- Qt, ONNX Runtime, OpenCV, and the native image-codec projects.
- Inter, Space Grotesk, and Geist Mono, bundled under the SIL Open Font License.
- Strider's editorial workspace design, adapted in DESIGN.md.
