Why I Started
I kept seeing people talk about Cactus Mirage and what it could do, so I wanted to see how well it actually held up in practice. Instead of just running a few test prompts or watching demos, I decided to build something real with it and see what happened.
That experiment turned into Object Chaos, a small browser-based game where players upload photos and complete object-finding challenges based on whatever the model detects. The idea was straightforward: let Mirage look at an image, identify what's inside, and turn those detections into gameplay. It also gave me a good excuse to test running a vision model directly in the browser without relying on a cloud inference API.
After building the game and throwing a bunch of different images at it, I walked away with a much more mixed opinion of Mirage than I expected.
How I Integrated Mirage
One of my main goals was keeping everything on the user's device. Object Chaos uses Cactus's WebAssembly runtime alongside the Mirage vision model, running inference inside a Web Worker so the main UI thread never freezes up during heavier processing.
flowchart TD
A["User"] --> B["Image input — File / Camera / Sample"]
B --> C["Browser image processing — Resize to 768px longest edge"]
C --> D["RGB pixel conversion"]
D --> E["Web worker"]
E --> F["Load Cactus WASM runtime"]
F --> G["Load Mirage model"]
G --> H["Hugging Face"]
G --> I["Cache Storage"]
H --> J["Cactus Mirage inference"]
I --> J
J --> K["Structured JSON response — Objects / Bounding boxes / Scores / OCR"]
K --> L["Mirage adapter"]
L --> M["Detection normalization"]
M --> N["Game logic"]
N --> O["Find the object — Timed challenges"]
N --> P["Object roast — Local templates"]
On the first run, the model downloads from Hugging Face and saves to Cache Storage for future sessions, while the runtime itself ships with the app. When a player selects an image, the browser resizes it to a 768px longest edge, converts it into raw RGB pixel data, and hands it off to the worker. Mirage then spits out structured JSON containing detected objects, bounding boxes, confidence scores, descriptions, and OCR text.
The best part of this setup is privacy—the photo never leaves the device. There are no uploads, no external inference APIs, and no backend servers involved.
The Adapter Layer
I didn't wire Mirage's raw model output directly into the game logic. Instead, I wrote an adapter in src/lib/mirage/adapter.ts to normalize everything into a clean, predictable structure for the app.
Each detected object gets mapped with:
- Object name and confidence score
- Normalized bounding box coordinates
- Object area and center position
- Color and material descriptions (when available)
- Position metadata returned by the model
The adapter also runs a few cleanup and filtering passes before anything reaches the game:
| Processing Step | Implementation |
|---|---|
| Minimum confidence | 0.45 |
| Minimum box area | 0.0015 |
| Maximum tappable area | 0.6 |
| Background filtering | Strips out generic scene/background labels |
| Duplicate merging | Uses label similarity and IoU overlap |
| Bounding box normalization | Fixed 1000 × 1000 coordinate grid |
One quirk I caught early on was that Mirage returns bounding boxes on a fixed 0–1000 grid rather than using the actual dimensions of the input image. You have to normalize coordinates against that fixed grid—dividing directly by image width or height throws all the boxes off.

I also added duplicate merging via Intersection over Union (IoU). If two detections clearly overlap on the same object, the adapter keeps whichever one has the higher confidence score. That cleanup helps a lot, though it obviously can't invent an object the model missed or fix a flat-out wrong label.
What I Found During Testing
Once I started feeding real photos into the game, Mirage's consistency became a real issue.
1. Missing Objects In one test, I uploaded a garden photo packed with chairs, flowers, plants, birdhouses, a table, and plenty of other clear items. Mirage only returned two detections. When your entire game loop depends on having objects to find, getting two hits out of a busy scene breaks the experience fast. My adapter can filter and organize whatever comes back, but it can't recover objects the model never saw.
2. Incorrect Classifications Other images produced plenty of detections, just not accurate ones. In one shot, a region around a bucket was labeled as a plant, and several bounding boxes didn't line up well with the actual items they were supposed to frame. Missing an object is one thing; confidently handing the app wrong data is another.
3. Misleading Confidence Scores
Confidence scores turned out to be a poor indicator of whether a prediction was actually right. In my testing notes, Mirage classified a dog as a cat with a 0.80 confidence score. An 80% score looks solid on paper, so relying on high thresholds alone won't save you from bad classifications.
A Look at the Test Results
To get a clearer baseline, I ran a 20-photo sweep through a Node inference harness covering kitchens, bedrooms, bookshelves, supermarkets, garages, gardens, classrooms, workshops, and outdoor scenes.
| Metric | Result |
|---|---|
| Images tested | 20 |
| Total detected objects | 174 |
| Average objects per image | 8.7 |
| Minimum objects in an image | 3 |
| Maximum objects in an image | 17 |
| OCR text lines | 59 |
| Average inference time | 2.32 seconds |
| Median inference time | 2.40 seconds |
| Fastest inference | 1.75 seconds |
| Slowest inference | 3.21 seconds |
Inference Latency (768px Node Harness)
xychart-beta
title "Mirage latency (seconds)"
x-axis [Average, Median, Minimum, Maximum]
y-axis "seconds" 0 --> 4
bar [2.32, 2.40, 1.75, 3.21]
These numbers are just from my local 768px harness tests rather than a formal benchmark against other vision models. Honestly, running locally in ~2.3 seconds is pretty respectable for browser-based inference. Speed wasn't my issue—detection reliability was.
Notable Detection Failures
| Input Scene | Model Output |
|---|---|
| Garage workbench | Identified as kitchen fixtures (range hood, stove, stainless steel sink) |
| Wall of hand tools | Labeled as grass, a metal ring, and a wooden stick |
| Dog photo | Classified as a cat (0.80 confidence) |
| Classroom | Returned eleven separate chair detections |
| Watermarked stock photo | Detected the watermark itself as an object |

Some of these mix-ups are understandable in isolation, while others are just weird. The classroom test is especially telling: the detections weren't technically wrong, it just flooded the output with repetitive chair predictions. Even with IoU merging in the adapter, redundant detections still slip through.
Why This Matters for Object Chaos
Object Chaos splits gameplay into two modes: Find the Object and Object Roast.
Find the Object builds timed prompts directly from Mirage's detections using object names, positions, categories, and OCR text—things like "Find the keyboard," "Find something in the top half," or "Find something that belongs in a kitchen." The generator verifies that every prompt is actually solvable (at least one matching target and one non-matching distraction) and avoids repeating the same prompt style back-to-back.
Object Roast runs entirely on deterministic local templates triggered by detected object names, attributes, duplicates, and counts—no secondary LLM calls required.
flowchart TD
A["Mirage output"] --> B["Detected objects"]
B --> C["Find object"]
B --> D["Object roast"]
C --> E["Challenges"]
D --> F["Roast rules"]
E --> G["Player game"]
F --> H["Final verdict"]
G --> I["Game experience"]
Because both modes rely completely on that initial detection pass, every model quirk hits the player directly. If Mirage misses a key object, it never enters the game. If it calls a bucket a plant, the game generates a prompt asking the player to find a plant where a bucket is sitting. If the bounding box is off-center, tapping the object feels broken. At that point, model accuracy stops being a benchmark metric and becomes a core UX bug.
What I Would Improve
If I keep pushing this project forward, there are a few things I want to test next:
- Higher input resolutions: Right now, images get downscaled to a 768px longest edge to keep inference snappy. Bumping that up—or testing different inference parameters—might help Mirage catch smaller objects that currently get lost in downscaling.
- Multi-pass inference: My adapter already includes a
mergeAnalyseshelper built to combine detections from two separate inference passes using bounding box overlap and confidence scores. Running dual passes on tricky scenes could help stabilize results. - Better fallback UX: Since no client-side vision model will ever be 100% accurate, the app itself needs to handle messy output better. Tighter duplicate merging, cleaner handling of overlapping boxes, letting players flag or correct bad labels, and giving clear feedback when a photo doesn't yield enough usable objects would all make the game far more forgiving.
My Take on Mirage
I get why people are excited about Cactus Mirage. Getting a capable vision model running locally via WebAssembly—with zero server costs and full user privacy—is genuinely cool, and its inference speed held up better than I expected in a browser environment.
That said, its object detection quality fell short of the hype. It handles obvious, everyday objects well enough, but it struggles with cluttered or unfamiliar scenes, misses plenty of visible items, and occasionally hallucinates labels with high confidence. I haven't tested every feature Mirage offers—my take is strictly based on using its object detection and OCR inside Object Chaos—but there's a massive gap between watching a curated demo and building real app logic on top of raw model outputs.
Final Thoughts
I built Object Chaos to see what Cactus Mirage was actually like beyond the social media buzz. Along the way, I learned a ton about WebAssembly runtimes, browser image pipelines, and just how much glue code it takes to turn raw vision outputs into something usable for an end user.
Did Mirage live up to my expectations? Not really, at least not for reliable object detection. Still, I'm glad I built it. You learn way more about a model's real strengths and rough edges by shipping an app around it than you ever will from reading benchmarks.
- Project: Object Chaos
- Source Code: GitHub Repository
- Model: Cactus Mirage
- Built: 2026