Skip to content

feat: add mirage, in-browser image description with the Mirage vision model - #61

Merged
nirokato merged 1 commit into
mainfrom
claude/vibrant-feynman-v9eotv
Nov 19, 2026
Merged

nirokato merged 1 commit into
mainfrom
claude/vibrant-feynman-v9eotv

Conversation

@nirokato

Copy link
Copy Markdown
Owner

Summary

Adds projects/mirage/, our own take on joemaddalone/mirage-demo. Drop, paste or browse a photo and the Mirage vision model returns objects (boxes, outlines, scores), readable text, a scene summary and object relations, drawn over the image. Inference runs in the browser; the image is never uploaded.

Merging creates the Pages project and DNS for mirage.apps.andymolenda.com and publishes the homepage with its new card.

How it is built

  • Written from scratch. The upstream repo has no license, so nothing is copied from it. The page credits it as the inspiration.
  • Browser version only. Upstream's server version shells out to a local cactus CLI, which cannot run on Pages.
  • Engine vendored. vendor/cactus.js + vendor/cactus.wasm are Cactus runtime 4.1.4 (1.3 MB, Apache-2.0, license in vendor/LICENSE.txt), unmodified and checked against the release manifest.json.
  • Weights not committed. worker.js fetches the 21.6 MB mirage.cact (Apache-2.0) from Hugging Face at a pinned commit, checks its SHA-256, and keeps it in Cache Storage.
  • Web Worker. Inference runs off the main thread, so the project is index.html + worker.js rather than a single file.
  • 900px container, like github-uptime, for the photo.

Also changed

  • tofu/variables.tf: mirage added to the projects set
  • projects/homepage/index.html: new card
  • CLAUDE.md: structure, projects table, and a mirage exception note

Testing

Driven end to end in headless Chromium against a local static server: cold load with weights download, warm run on a second image, reload with weights served from Cache Storage, hover and click-to-pin on canvas and lists, confidence filter, clear, and a 390px viewport. No console errors. A describe took about 2.5–3 s per image there.

There are no automated tests for this project.


Generated by Claude Code

… model

Our own take on joemaddalone/mirage-demo: drop in a photo and the Mirage
model returns objects, text, scene and relations, drawn over the image.
Inference runs in a Web Worker on Cactus's WebAssembly runtime (vendored,
Apache-2.0). Weights are fetched from Hugging Face at a pinned commit,
checked against a SHA-256 and kept in Cache Storage.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BoMPz7UrQa7V4x91joYfzc
@github-actions

Copy link
Copy Markdown
Contributor

OpenTofu Plan

Plan output
cloudflare_pages_project.preview: Refreshing state... [id=andy-apps-preview]
data.cloudflare_zone.zone: Reading...
cloudflare_pages_project.project["weft"]: Refreshing state... [id=andy-apps-weft]
cloudflare_pages_project.project["homepage"]: Refreshing state... [id=andy-apps-homepage]
cloudflare_pages_project.project["bubble-share"]: Refreshing state... [id=andy-apps-bubble-share]
cloudflare_pages_project.project["clock"]: Refreshing state... [id=andy-apps-clock]
cloudflare_pages_project.project["zmk-keymap"]: Refreshing state... [id=andy-apps-zmk-keymap]
cloudflare_pages_project.project["peer-drop"]: Refreshing state... [id=andy-apps-peer-drop]
cloudflare_pages_project.project["trove"]: Refreshing state... [id=andy-apps-trove]
cloudflare_pages_project.project["github-uptime"]: Refreshing state... [id=andy-apps-github-uptime]
data.cloudflare_zone.zone: Read complete after 1s [id=a7f7a62f2c2b914baa9b82b9e41a29c5]
cloudflare_pages_domain.domain["trove"]: Refreshing state... [id=39c4bcf6-15b0-4e85-84c5-159df1259f47]
cloudflare_pages_domain.domain["bubble-share"]: Refreshing state... [id=3df37c0f-32b3-4824-a5de-8b421115e65a]
cloudflare_pages_domain.domain["peer-drop"]: Refreshing state... [id=69db182b-cd41-43ba-8c0c-bcfc92d974e9]
cloudflare_pages_domain.domain["zmk-keymap"]: Refreshing state... [id=34b8e5fe-0c6c-4a28-b763-6dda21d60d33]
cloudflare_pages_domain.domain["github-uptime"]: Refreshing state... [id=fb284235-5daa-48d3-96c8-9f710b9b7687]
cloudflare_pages_domain.domain["weft"]: Refreshing state... [id=df0069d6-a9c4-411d-b52b-88227318b108]
cloudflare_record.cname["clock"]: Refreshing state... [id=d0e16b835decb7bb06f5feb0736801e3]
cloudflare_pages_domain.domain["clock"]: Refreshing state... [id=74b72e0f-818d-420e-859a-f0437bd35828]
cloudflare_pages_domain.domain["homepage"]: Refreshing state... [id=2c55d7af-683f-4463-aa98-5bc7b1e707cd]
cloudflare_record.cname["trove"]: Refreshing state... [id=02e8ec2382004fdc15c5411d66ccaf7f]
cloudflare_record.cname["zmk-keymap"]: Refreshing state... [id=3de8a5e0f00ab4bf0533fd6cc8bd1114]
cloudflare_record.cname["bubble-share"]: Refreshing state... [id=65e4242902b2a43962fbd3107629d427]
cloudflare_record.cname["github-uptime"]: Refreshing state... [id=718eea7effa4afb5ed2eeb5d151ba098]
cloudflare_record.cname["peer-drop"]: Refreshing state... [id=569777844ae8c626fc232d14b0837470]
cloudflare_record.cname["weft"]: Refreshing state... [id=e2411dbb4de2318f0f00d1d47b584e4d]
cloudflare_record.cname["homepage"]: Refreshing state... [id=c2155ce7863f7e7689dc3f05367746e2]

OpenTofu used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

OpenTofu will perform the following actions:

  # cloudflare_pages_domain.domain["mirage"] will be created
  + resource "cloudflare_pages_domain" "domain" {
      + account_id   = "6050946b66172190524579962c958e5a"
      + domain       = "mirage.apps.andymolenda.com"
      + id           = (known after apply)
      + project_name = "andy-apps-mirage"
      + status       = (known after apply)
    }

  # cloudflare_pages_project.project["mirage"] will be created
  + resource "cloudflare_pages_project" "project" {
      + account_id        = "6050946b66172190524579962c958e5a"
      + created_on        = (known after apply)
      + domains           = (known after apply)
      + id                = (known after apply)
      + name              = "andy-apps-mirage"
      + production_branch = "main"
      + subdomain         = (known after apply)
    }

  # cloudflare_record.cname["mirage"] will be created
  + resource "cloudflare_record" "cname" {
      + allow_overwrite = true
      + content         = (known after apply)
      + created_on      = (known after apply)
      + hostname        = (known after apply)
      + id              = (known after apply)
      + metadata        = (known after apply)
      + modified_on     = (known after apply)
      + name            = "mirage.apps"
      + proxiable       = (known after apply)
      + proxied         = true
      + ttl             = (known after apply)
      + type            = "CNAME"
      + value           = (known after apply)
      + zone_id         = "a7f7a62f2c2b914baa9b82b9e41a29c5"
    }

Plan: 3 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  ~ project_urls = {
      + mirage        = "https://mirage.apps.andymolenda.com"
        # (8 unchanged attributes hidden)
    }

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: tfplan

To perform exactly these actions, run the following command to apply:
    tofu apply "tfplan"

@nirokato
nirokato merged commit 07e6a24 into main Nov 19, 2026
3 checks passed
@nirokato
nirokato deleted the claude/vibrant-feynman-v9eotv branch November 19, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants