Anki add-on: Randomized Image Occlusion

Randomized Image Occlusion - image occlusion, but you can't cheat. An add-on for studying labelled diagrams: anatomy cross-sections, the brachial plexus, histology slides, bones, ECGs - anything you learn by naming the parts of a picture. Normally with Anki's image occlusion you hide a label on a diagram and try to recall it. The problem is that the hidden box always sits in the same spot , so after a few reps your brain quietly starts cheating: you remember "the box in the top-left is the aorta" from its position, not because you actually recognise the aorta. This add-on fixes that. Every single time a card comes up, it drops the answer box in a random place and draws an arrow to the actual structure on the image. You can't lean on where the box usually is: you have to follow the arrow and genuinely identify what it points at. The shuffling is purely visual: it never touches Anki's scheduling, FSRS, or your review history. Features Randomised placement + leader arrow on every single review. Forward / reverse / both - name the structure, locate it from its name, or a random mix of the two that re-rolls every review. Type-to-answer - type the label and let Anki grade it. Context labels - reveal the surrounding labels while you answer. Single-card mode - put a whole diagram on one card that cycles through every label in a fresh random order each review, with a running counter. Visual editor - click to drop markers, drag to reposition, and re-edit existing cards later from the Browse window. Works in light and dark mode , and on AnkiDroid / AnkiMobile - the renderer is baked into the card, so no add-on is needed on your phone. Requires Anki 23.10 or newer. How to use Open Tools → Randomized Image Occlusion… , load an image, click each structure to drop a labelled marker, pick a deck, then Save. You can also create cards straight from Anki's Add window: just click the Occlusion toolbar button, which opens the same editor (deck picker and all). Full instructions are in the README linked below. Documentation & source Documentation (README) Full changelog Source code (GitHub) Report a bug or request a feature If you'd like to get in touch directly - for example if you're running into issues on the GitHub page - please email me at matthewmiezaniec1@gmail.com . Changelog 1.1.1 Long labels stay readable. A long structure name used to push its answer box off the edge of the image - and clean off a phone screen, with the text cut off. Long labels now wrap onto several lines and the box is kept on the picture, while the question and answer sides still line up exactly. Accented answers are graded correctly. Typing café , Müller or Sjögren is now marked right even when the stored label and what you type use different Unicode forms - which happens across platforms and keyboards. Previously a visually identical, correct answer could be marked wrong. Reverse cards no longer give the answer away. With decoy dots turned off, a "locate the X" question side used to draw a single dot on the very structure you were being asked to find. It now stays hidden until you flip the card. Switching card mode no longer changes how a card is answered. Toggling between single- and multi-card mode used to silently overwrite your Type the answer choice, so a card you meant to reveal could be saved as a typed card - or the other way round. Saving is safer. Save is disabled while a card is being saved, so an impatient second click can't add a duplicate note; a failed save now reports the error and lets you try again; and cancelling mid-save no longer creates the card you just cancelled. Editing the same note twice is prevented. Opening one note in two edit dialogs at once used to let the second save silently overwrite the first. Also fixed: editing an older card no longer quietly switches its context labels off; the question and answer sides always agree on the randomised layout, even when the device's browser storage is full or unavailable; a label containing doubled cloze markers can no longer generate a phantom extra card; and invalid values in config.json can no longer freeze the reviewer or block card saving. Known limitation: in multi-card Type the answer mode Anki's own grader compares against an escaped copy of the label, so a label containing :: , {{ or }} (for example std::vector ) will not match what you type. Use reveal or single-card mode for those labels. 1.1.0 The both direction now works properly. Instead of doing nothing, every card randomly tests a structure forwards (name it) or backwards (locate it from its name), re-rolled each review - and in single-card mode each marker in the cycle gets its own random direction. Edit existing cards from the Browser (right-click → Edit with Randomized Image Occlusion ). Drag markers to reposition them in the editor. Create cards straight from Anki's Add window: the Occlusion toolbar button opens the same editor - deck picker and one-step Save included - so occlusion cards are made on the canvas instead of by hand-editing fields. Fixes: the Occlusion button no longer becomes unclickable after switching note types; undo-queue safety when an image or note goes missing mid-save; guaranteed-visible arrows on small images; graceful handling of invalid config values. 1.0.0 Initial release: randomised prompt-box placement with a leader arrow; forward/reverse/both directions; type-to-answer; context labels; decoy dots; single-card cycling mode; light/dark and mobile support; configurable colours and minimum arrow length. Built for Ezra, a medical student at the University of Glasgow, whose idea this grew out of.

GitHub repository: canon-regularis/randomized-image-occlusion
Repository description: ezra's super epic idea
Languages: Python, JavaScript, CSS, HTML