Skip to content

Project-Delilah/assets_of_a_yearner-flutter

Repository files navigation

Project Logo

Assets: of yearners

Yerner's asset generator — turn any photo into engraved goth cutouts, dreamy film scans, and rotating obsidian sculptures. Entirely on-device, no internet needed.

License: GPL-3.0 Platform Made with Flutter


What it does

Assets: of yearners is a fully offline goth-asset generator. Pick a photo, choose a mode, and the app produces a stylized asset you can save straight to your gallery. There are no accounts, no uploads, and no network calls — the ML model and every filter run on your device.

Modes

# Mode Output
01 Goth Cutout Engraved, grainy B&W die-cut of the subject on a transparent square canvas — background removed, autocontrast, heavy grain
02 Mystic Film Dreamy analog B&W photo — square crop, lifted hazy tone, soft glow, film grain, dark border
03 Background Removal Just the subject, cut out with a soft alpha mask — transparent PNG
04 3D Sculpt BETA The subject's silhouette reimagined as a glossy black rotating sculpture, exported as a looping GIF

Goth Cutout example Mystic Film example Background Removal example 3D Sculpt example

How it works

Everything happens in three files of Dart — no backend, no SDKs:

  1. Decode — the picked image is decoded and EXIF-rotated in a background isolate.
  2. Segment — a bundled u2netp ONNX model (~4.5 MB) runs on-device via onnxruntime to produce a soft alpha mask of the subject. Transparent inputs are flattened onto white first so dark subjects survive segmentation.
  3. Stylize — pure-Dart pixel pipelines (package:image) apply the chosen mode:
    • Goth Cutout / Background Removal use the mask directly (hard die-cut vs. soft alpha).
    • Mystic Film skips the mask and works on tone alone.
    • 3D Sculpt converts the silhouette into a signed distance field (Felzenszwalb–Huttenlocher distance transform), inflates it with a circular profile, bends it in depth with random sine warps, and renders 24 turntable frames with a tiny raymarcher — then encodes them as a looping GIF.

Every heavy step runs in a Dart isolate, so the UI stays smooth and the progress label ticks through each stage (removing background, engraving, frame 12/24, …).

Design

The interface follows an editorial monochrome design system (see design.md): pure black/white with felt-gray accents, sharp corners everywhere except full-pill buttons and tags, no shadows, whisper-weight display type, and a single chromatic gesture — the animated iridescent hero (sage → amber → oxblood) that collapses into the navbar on scroll.

Install

Android — grab the latest APK from Releases and sideload it. Release builds are produced by the GitHub Actions workflow and signed.

Linux desktop — build from source (below).

Build from source

Requires Flutter (stable channel, Dart SDK ≥ 3.12).

git clone https://github.com/Project-Delilah/assets_of_a_yearner-flutter
cd assets_of_a_yearner-flutter
flutter pub get

flutter run -d linux        # desktop
flutter build apk           # Android (needs your own signing config, see below)

Release signing reads android/key.properties; CI recreates that file from repository secrets (STORE_PASSWORD, KEY_PASSWORD). For a local release build, point it at your own keystore.

Launcher icons are generated from assets/icons/ with:

dart run flutter_launcher_icons

Tests

flutter test                                             # unit tests (filters, sculpt, isolates)
flutter test integration_test/onnx_pipeline_test.dart -d linux   # real ONNX inference

The integration test runs the actual u2netp model on fixture photos and writes its masks and rendered sculpt frames to build/it_out/ for eyeballing.

Project layout

lib/
  main.dart      # all UI + isolate trampolines for the processing pipeline
  filters.dart   # BgRemover (ONNX u2netp) + gothify / mystify / cutout filters
  sculpt3d.dart  # silhouette → SDF → raymarched turntable GIF
assets/
  models/u2netp.onnx   # bundled segmentation model
  examples/            # mode preview images
  icons/               # launcher icon set
design.md              # the design system the UI follows

Author

Sapan Gajjargithub.com/isg32

License

GPL-3.0 — free as in freedom. If you ship a modified version, ship the source too.