The trigger
You run detection by pressing Submit in the bottom-right corner of the canvas during Stage 1. Nothing else triggers a full detection run — every other operation in ZeroCount is incremental.
Submit is only available when you have at least one AOI and a legend marker placed.
What happens in order
The detection pipeline has three stages of its own (separate from the UI's Stages 1/2/3):
- 1
Symbol extraction. ZeroCount reads the legend region with OCR and image segmentation. Each distinct symbol becomes a template — a small bitmap the pipeline will hunt for later. The legend is parsed once per Submit.
- 2
Template matching. For every AOI on the drawing, the pipeline scans for instances of each template using SIFT (a feature-matching algorithm). It's tolerant of rotation, scale, and partial overlap, but slows down with more templates and larger AOIs.
- 3
Grouping. Matched instances of the same template are clustered into a marker group. Group thumbnails are extracted from the legend so you recognise each group at a glance.
When all three finish, the editor automatically advances to Stage 2 and the marker tree appears in the sidebar.
How long it takes
Depends on the drawing. Rough guide:
- Small A3 layout, 5–10 symbol types — 15 to 30 seconds.
- A1 layout, 20–30 symbol types — 1 to 2 minutes.
- A0 or very dense drawing — 2 to 5 minutes.
A loading indicator appears in the toolbar while detection runs. The canvas stays interactive — you can pan and zoom, just not edit.
Don't reload the page during detection. The pipeline talks back to the browser over a WebSocket; a reload severs the connection and you'll have to re-submit.
What you get back
After detection finishes, the sidebar fills with marker groups:
- One Auto Count Symbol group per template the pipeline could find on the drawing.
- Each group is given a placeholder label like
Group 1,Group 2— rename them in Stage 3. - Each group has a thumbnail extracted from the legend so you can identify it at a glance.
- Marker counts appear next to each group's label.
The drawing canvas shows every marker as a coloured overlay on top of the original drawing. From here, Stage 2 takes over.
When detection fails
The pipeline fails closed — if it can't run, you stay in Stage 1 and get a toast or error. Common causes:
| Symptom | Likely cause | Fix |
|---|---|---|
| Detection finishes but no groups appear | Legend marker doesn't cover any usable symbols. | Re-position the legend marker; make sure it covers the symbol key tight to the edges. |
| Detection runs for ages then errors out | AOI covers a huge area at high resolution. | Trim the AOI to just the working drawing area. |
| Error toast: connection lost | WebSocket dropped mid-run. | Check the WS indicator in the toolbar. Wait a moment and Submit again. |
| Detection finishes but markers are wildly wrong | Drawing rotation doesn't match what OCR read. | Rotate the drawing (see Rotating files), then re-submit. |
| Pipeline reports "no templates extracted" | Legend region empty or unreadable. | Check the legend region covers actual symbols, not just text. |
If detection completes and the results are merely imperfect rather than wrong, you don't need to re-run — fix the issues by hand in Stage 2. See Stage 2.
Re-running detection
If you want a totally fresh run, you've got two paths:
- Add more AOIs / fix the legend, then Submit again — this augments the existing markers; it doesn't replace them. New markers get added to the relevant groups.
- Reset the drawing first. Use Reset Drawing from the Actions menu — this clears everything (markers, zones, AOIs, ignored colours) so your next Submit starts clean.