Image Occlusion Enhanced [Official thread]

Glutanimate's Avatar

Glutanimate

13 Oct, 2016 12:25 AM

This is the new official support thread for Image Occlusion Enhanced (old thread). From now on please direct all of your questions about the add-on here.

Thank you!

  1. 1 Posted by dgbeecher on 13 Oct, 2016 01:34 AM

    dgbeecher's Avatar

    This looks like an awesome update. Thank you!!

    I've begun testing, and have one note right away. I'm using OS X 10.11.6. I receive the following error message when starting up Anki with the new plugin installed:

    Traceback (most recent call last):
      File "aqt/addons.pyc", line 41, in loadAddons
      File "~/Documents/Anki/addons/Image Occlusion Enhanced.py", line 4, in <module>
      File "~/Documents/Anki/addons/image_occlusion_enhanced/main.py", line 32, in <module>
      File "~/Documents/Anki/addons/image_occlusion_enhanced/ngen.py", line 33, in <module>
    ImportError: No module named uuid
    

    Is there something I can try that might fix this? Please let me know if I can help troubleshoot this problem.

  2. 2 Posted by Glutanimate on 13 Oct, 2016 07:24 AM

    Glutanimate's Avatar

    Hi dgbeecher,

    thanks for giving it a spin.

    That's a very weird error message you're seeing because 'uuid' should be part of the standard libraries Anki ships with (at least it is on Windows and Linux). I think I'll have to take a closer look at how Anki is is packaged on macOS. Are you using the latest Anki release?

    Again, thanks for the bug report. These are the type of things I can't test myself because I don't have a macOS machine available, so I really appreciate the feedback.

    I'll get back to you as soon as I have found a workaround.

  3. 3 Posted by Glutanimate on 13 Oct, 2016 08:24 AM

    Glutanimate's Avatar

    I've just released Beta 2 which should hopefully fix this error (by packaging a local version of 'uuid'). Please let me know if it works for you.

  4. 4 Posted by dgbeecher on 13 Oct, 2016 11:40 AM

    dgbeecher's Avatar

    Oops, I was using Anki 2.0.33. (Guess I forgot that Anki doesn't auto-update.) So I updated to 2.0.36, and -- just to see if that's what caused it -- tried Beta 1 of I/O, but encountered the same problem.

    The good news is, your Beta 2 installs and opens just fine! Thanks for fixing that so quickly.

    I'll give it more of a spin today and let you know if I encounter any other issues. Thanks again.

  5. 5 Posted by dgbeecher on 15 Oct, 2016 01:59 AM

    dgbeecher's Avatar

    This update is great! I've tried almost all of the features, and everything seems more solid and speedy and easy to use than before.

    I had only one issue, which I resolved but will report anyway. For a while, when I tried to edit a note, the IO editor would incompletely load: the image wouldn't scale properly, the labels wouldn't appear, and the tool buttons would be blank. I restarted Anki, and that fixed it.

    I'd like to share a tip for users who want to update notes created by previous versions of IO. Be careful about how to convert fields when using Anki's note type changing tool, because the initial suggestions are wrong. Here's what worked for me:

    • Question -> Question Mask
    • Answer -> Answer Mask
    • SVG -> Original Mask
    • Original Image -> Image
    • ...and the others are (even more) obvious.

    And here are a few observations (for curious users) about scheduling information. Updating notes to the new note type (and running the Convert to editable notes command) preserves scheduling. When using the new Edit Cards feature, adjusting labels and fields preserves scheduling, but adding or deleting labels actually adds or deletes cards, along with their scheduling information. This is completely logical, but I thought it was worth mentioning.

    There is only one thing I wish worked differently. Although all the cards I generate from one image always share the same text in the Header field, I often want different cards to have different text in the Remarks field. So I enter this text manually for each card, using the Anki Browser, because the IO Editor can only edit text for the entire batch of cards. The problem is, if I later need to edit one of these cards using the IO Editor, that card's Remarks text will get duplicated to the Remarks fields of all the other cards generated from the image, overwriting what is already there.

    Is it possible to avoid this? Here's one idea: allow the user to choose (perhaps via checkboxes in the Options interface) which fields will appear in the IO Editor's Fields tab. For fields that do appear in the IO Editor, anything entered there will affect every generated card (as per the current behavior). But for fields that do not appear the IO Editor, the only way to edit these fields will be via the Anki Browser, and hence these fields will be securely specific to each card.

    Does that make sense? If it's unclear what the point of this would be, I'm happy to describe my usage scenario in more detail. (And, no worries at all if you're not interested in adding this feature, or don't think it'd be possible!)

    Thanks again for a great plug-in!

    Devin

  6. 6 Posted by Glutanimate on 15 Oct, 2016 09:04 AM

    Glutanimate's Avatar

    Hey Devin,

    thanks a lot for testing the new beta so thoroughly. I've put more time into this than I care to admit, so I am glad you like it.

    I had only one issue, which I resolved but will report anyway. For a while, when I tried to edit a note, the IO editor would incompletely load: the image wouldn't scale properly, the labels wouldn't appear, and the tool buttons would be blank. I restarted Anki, and that fixed it.

    This is likely one of these longstanding compatibility issues between SVG-Edit and Anki's webview on OS X. These problems are very difficult to address for me, not only because I don't have access to an OS X machine, but also because the issue lies much deeper than IO or even Anki itself. I don't know if this is possible on OS X, but if you run into this issue again it might be worth exploring if you can start Anki from your terminal somehow. That would provide us with an error log that might make it possible to track the issue down.

    Here's one idea: allow the user to choose (perhaps via checkboxes in the Options interface) which fields will appear in the IO Editor's Fields tab. [...] Does that make sense? If it's unclear what the point of this would be, I'm happy to describe my usage scenario in more detail.

    No, that's a perfectly valid usage scenario. I used to do this myself when I first started with IO, but as the card volume increased and my time grew thin I quickly abandoned that practice, haha.

    In any case, I've added an option for this in Beta 3; not through checkboxes - because that would get complicated fast with user-defined fields - but as a simple text entry for a comma-separated field list.

    Here is the full changelog of Beta 3:

    • New options for labels and lines
    • New option for ignoring fields when editing
    • Line color and width should now be preserved when switching to a different tool
    • New error dialog that provides a help button
    • More verbose tooltips when generating notes
    • Lots of smaller bug fixes

    I'd appreciate it if you gave it a try to see if it covers your use case.


    PS: Thanks for providing some pointers on using the new features. I haven't had the time to update the documentation, yet, so this should come in very handy for other users willing to test the new release

  7. 7 Posted by pepsinoceline on 15 Oct, 2016 04:27 PM

    pepsinoceline's Avatar

    Hi!
    Okay, i feel like a dummy asking this BUT: i read how to install this add on (desperately need it for neuro anatomy) but i cannot find the "tools" section, it's not in my bar. I made a screenshot.
    Maybe it's because it's the most recent ANKI? I just downloaded it onto my mac OS sierra.
    Thanks if you can help :)
    Bye!

  8. 8 Posted by dgbeecher on 15 Oct, 2016 04:34 PM

    dgbeecher's Avatar

    Hi Céline,

    For some reason I'm not able to view the screenshot you attached. But maybe I can help anyway. The strange thing about Anki on Mac is that the menu bar changes depending on which window you have focused. If you have the "Add" or "Browser" windows focused, you won't see the Tools menu. But if you have the main window focused -- i.e., the place where you see your decks, or where you study your cards -- then the Tools window should appear.

    If you still don't see it, try navigating in the Finder to Documents -> Anki -> addons. This is, I believe, the default install location. So you will probably find the addons folder there. Quit Anki, drop the image_occlusion_enhanced file and folder here, launch Anki, and you should be good to go.

    Hope this helps!

    Devin

  9. 9 Posted by pepsinoceline on 15 Oct, 2016 04:59 PM

    pepsinoceline's Avatar

    Thank you for answering!
    I went to the view card thingy but the bar does not change.
    And then i went to applications in finder, view content and i cant find
    addons either.
    But i'm not super talented with computer so maybe that's why.

    Céline

  10. 10 Posted by dgbeecher on 15 Oct, 2016 05:05 PM

    dgbeecher's Avatar

    Oh! I was able to see these screenshots, and here's the problem: you're not using Anki! You're using something called "AnkiApp", which is not part of the Anki ecosystem. (See this Knowledge Base article.)

    Download the real Anki app from http://ankisrs.net, and then try everything again.

  11. 11 Posted by pepsinoceline on 15 Oct, 2016 05:28 PM

    pepsinoceline's Avatar

    Great! It works now, thank you very much!
    Have a nice weekend :)

  12. 12 Posted by dgbeecher on 15 Oct, 2016 11:21 PM

    dgbeecher's Avatar

    Hi Glutanimate,

    Thanks for the update! The comma-separated field list is a great solution for hiding fields from the IO Editor. I really appreciate this feature, but will keep in mind that, as was your experience, I may at some point no longer have time to edit cards individually.

    I found a few issues, all pretty minor, to report:

    1) If I add a field to the comma-separated list, it gets hidden from the IO Editor right away. But if I go back and delete a field from the list, I have to restart Anki before that field will appear again in the IO Editor. (If this is hard to fix, maybe just add a note about it in the Options interface?)

    2) When I click "Help" on the dialog that appears after clicking "Edit Cards", the "Instructions for editing" dialog appears, but then the "Edit Cards" dialog pops up again on top. It looks like this:

    Overlapping dialogs

    This is, of course, the opposite of how the dialogs should be displayed. It's possible to move the top one to read the bottom one, but the bottom one cannot be dismissed until the top one is closed.

    3) I took the plunge and updated all my old "Image Q/A" notes to the new "IO Card" format (backing up first of course!). This went well, except for two batches of cards, which both gave me the following error message when I ran the "Convert to Editable IO Enhanced Notes" command:

    Traceback (most recent call last):
      File "~/Documents/Anki/addons/image_occlusion_enhanced/nconvert.py", line 246, in <lambda>
        self.connect(a, SIGNAL("triggered()"), lambda b=self: onIoConvert(b))
      File "~/Documents/Anki/addons/image_occlusion_enhanced/nconvert.py", line 234, in onIoConvert
        conv.convertNotes(selected)
      File "~/Documents/Anki/addons/image_occlusion_enhanced/nconvert.py", line 44, in convertNotes
        occl_tp = self.getOcclTypeAndNodes(note)
      File "~/Documents/Anki/addons/image_occlusion_enhanced/nconvert.py", line 148, in getOcclTypeAndNodes
        svg_mlayer = self.layerNodesFrom(svg_node)[-1] # topmost layer
      File "~/Documents/Anki/addons/image_occlusion_enhanced/nconvert.py", line 185, in layerNodesFrom
        assert (layer_nodes[0].nodeName == 'g')
    AssertionError
    

    So I changed these cards back to the old "Image Q/A" note type and fiddled with them using IO v0.3.0, trying to figure out what was wrong.

    The problem with one batch of cards was some text, grouped with a rectangle, that I had added to the Shapes Layer. Once I deleted this text/rectangle group, and generated a new batch of cards, I was able to convert these to Editable IO Enhanced Notes.

    The problem with the other batch of cards was one arrow and two pieces of text that I had added to the Labels Layer. Once I deleted these three objects and generated new cards, I was able to convert these to Editable IO Enhanced Notes.

    That's all for now! But please, only spend time on these issues if you want to. IO is already so useful. I'm not sure how I'd learn anything in med school without it.

    Devin

  13. 13 Posted by Jay on 16 Oct, 2016 12:59 AM

    Jay's Avatar

    Hello,
    It seems I am encountering some bugs with the occlusion tool. When I drag a "cover" over an object, everything goes wonky. The cover goes in every direction besides the direction I am dragging it in, and the size is messed up as well. Also, this issue popped up out of nowhere. Restarting anki, as well as reinstalling the add-on, have proved to be of little use. Any ideas?
    Thanks!
    Jay

  14. 14 Posted by Glutanimate on 16 Oct, 2016 08:10 AM

    Glutanimate's Avatar

    @dgbeecher:

    Thanks for another detailed report. I'll try to look into these as soon as I find the time. Regarding the third issue, you wouldn't still have a backup of these notes anywhere, would you? It would help tremendously if you could upload one of the original mask SVGs here (you should be able to just drag and drop them out of the respective field)

    @Jay:

    Are you on macOS? If so, then this sounds like one of the usual issues the add-on has always been plagued by on OSX/macOS. I'm afraid there's no solution to this, but just for curiosity's sake: Which macOS version (if applicable) do you use? Does this also happen on the latest IO Enhanced beta?

  15. 15 Posted by dgbeecher on 16 Oct, 2016 01:57 PM

    dgbeecher's Avatar

    Yes, I did back up these notes. I moved them to a new deck and exported them, before I began to try to fix them. I'll attach the original mask SVGs here, along with the deck itself in case that'd be useful.

    Thanks!

    P.S. I'm glad I haven't encountered the issues @Jay is reporting. Sometimes the editor glitches briefly, but it usually calms down eventually ... or, if not, the problem is usually card-specific. (In fact, the card attached here with the SVG beginning 91cf is one of these that was glitchy to edit.) I'm still on OS X 10.11.6 El Capitan, if that makes a difference.

  16. 16 Posted by Jay on 16 Oct, 2016 02:41 PM

    Jay's Avatar

    Darn...
    I am on Mac OS Sierra v.10.12 and this is happening with the IO Enhanced Beta. I can still use the Occlusion tool if I mess around with it enough, it is just more time I have to spend per Occlusion.
    Oh well... still better than Quizlet!
    Thanks for the response :)
    - Jay

  17. 17 Posted by Glutanimate on 16 Oct, 2016 02:58 PM

    Glutanimate's Avatar

    @dgbeecher: Thanks for the files! I'll take a look at them as soon as I get the chance.

    @Jay: This does seem like one of these old elusive OS X bugs, but just to be sure: Are you seeing the same behavior across all versions of IO (2.0 and Enhanced stable included)? Do you have the latest Anki release installed (2.0.36)?

  18. 18 Posted by Glutanimate on 18 Oct, 2016 08:12 PM

    Glutanimate's Avatar

    Hey everyone,

    I've just released Beta 4. Here's the changelog:

    • Updated the default card template
      • The new template includes the two new extra fields and uses a more elaborate layout for all sections below the image. It also provides much needed adjustments of the styling for AnkiMobile and AnkiDroid
      • Important: This will overwrite any previous changes to the card templates you might have performed. If you've used a previous Beta and customized your template or styles please make sure to back them up before installing this version.
      • FWIW, drastic changes like this will only happen with Beta releases. If I ever see the need to change the template for a stable update I will implement it in a way that asks you for confirmation first.
    • Fixed a number of smaller issues (thanks to @dgbeecher for reporting these!)

    I'd appreciate it of you guys gave it a try. Edit: Would especially love to hear what you guys think of the new template and if you like how it looks on AnkiMobile/Ankidroid.

    I think we're getting very close to a stable release now. Updating the docs will be the next thing on my to-do list. I've started working on a few Wiki sections already and as soon as this is done we should finally be ready for a release on AnkiWeb.

  19. 19 Posted by mattsn0917 on 04 Nov, 2016 12:56 PM

    mattsn0917's Avatar

    Hello, I am having trouble with Image Occlusion. I have the latest version of Anki, and would like to use the add-on image occlusion for anatomy. After I install the add-on, I can see it under tools, but the option to use the card is not there when I try to make new cards. I only have basic and cloze cards available to make.

  20. 20 Posted by dgbeecher on 04 Nov, 2016 01:03 PM

    dgbeecher's Avatar

    Hi there,

    You do not use the ordinary Note Type button to make new Image Occlusion cards. Rather, you have to press the smaller greenish button that should have appeared in the note editor, to the far right of the Bold, Italic, etc. buttons. This link from the original I/O instructions can show you quickly what button to click. Glutanimate's video tutorials are also very helpful in getting started.

    Hope this helps.

  21. 21 Posted by dgbeecher on 05 Nov, 2016 06:26 PM

    dgbeecher's Avatar

    Hi Glutanimate,

    As you can probably tell, I don't have much to report about beta 4 -- it's been working great!

    But there is one strange issue that I will try to describe. I don't know if it's new to beta 4. I've encountered it (at least I believe it's the same issue) in two cases.

    First case:

    1. I decide, after already creating a set of I/O cards, that some shapes should be deleted. So I click the edit button, delete the shapes, click Edit Cards, and agree that I want to delete however many cards.
    2. I sync changes on Mac and iPhone.
    3. When these newly edited cards come up for review on iPhone, I find that the deleted shapes are still present on sibling cards (those which share the same original image).
    4. Strangely, this issue is not present on the Mac (i.e., the deleted shapes are absent from sibling cards).

    Second case:

    1. I decide, after already creating a set of I/O cards, that some shapes should be combined into one group. So I click the edit button, group the shapes, click Edit Cards, and agree that I want to delete and add however many cards.
    2. I sync changes on Mac and iPhone.
    3. When these newly edited cards come up for review on iPhone, I find that the shapes are not grouped like I had just edited them to be.
    4. Again, this issue is not present on the Mac.

    There is a strange extra twist to the second case. Still on the iPhone, I notice that if I edit the card, and either preview it or inspect the mask SVGs, what I see there actually does have the correct grouping, and does not match what I'm shown when actually studying the card! Here is an image of what I swear is the same card, seen in review mode on the left, and in edit -> preview mode on the right. (I don't know if this extra twist also happened in the first case, and I lost track of what those cards were, so I can't test it now.)

    In both cases, checking database/media on either Mac of iPhone did not fix the issue.

    In the second case, forcing a one-way sync from the Mac fixed the issue, thankfully. I'm not sure about the first case.

    I realize that this problem may be Mac-specific and thus hard for you to reproduce. Let me know if you need me to test anything. I feel that it has happened usually when I've edited older cards, rather than brand-new ones. Also, I think that I made multiple edits in both cases (deleting >1 mask; creating >1 group of masks).

    The issue is not a big deal, especially if it turns out that forcing a one-way sync reliably fixes it, which is something I'll try to figure out.

    Thanks!

    Devin

  22. 22 Posted by dgbeecher on 05 Nov, 2016 06:39 PM

    dgbeecher's Avatar

    Oh yeah, I also wanted to share some alternate text that you could perhaps use for the tooltips shown when generating cards. The following is based on your current tooltips and on tmbb's original documentation. I like it because the language helps the user understand what "(non)overlapping" means, and because it's a bit more consistent between the three buttons. It's totally up to you whether you want to use this text.

    • Generate cards with nonoverlapping information, where all labels are hidden on the front and just one is revealed on the back
    • Generate cards with partial overlapping information, where all labels are hidden on the front and all are revealed on the back
    • Generate cards with overlapping information, where just one label is hidden on the front and all are revealed on the back
  23. 23 Posted by Glutanimate on 05 Nov, 2016 07:22 PM

    Glutanimate's Avatar

    Hi Devin,

    thanks again for the detailed report. I actually made a few similar observations last week. Here's what I ended up writing on this in the wiki section on editing notes (which is yet to be published):

    Note Editing, the Media Collection, and Syncing

    Anki's default way of checking for updated media might lead to some unexpected behaviour when syncing. Here is how each kind of action will affect Anki:

    Textual changes

    Purely textual changes to your notes won't modify any of your media files and will sync without any hitch.

    Modifications to existing masks

    Modifications to your masks that don't create new shapes or delete existing ones will only update existing files in your media collection. Anki doesn't detect changes to these existing files as long as no new files are added or old ones removed. In practice this means that your modifications to existing shapes won't sync until you create new Image Occlusion notes or add other new images/files to Anki.

    I am currently investigating the possibility of forcing a sync whenever IO masks are updated.

    Modifications that create new masks

    These will create new files in your media collection that will be synced as usual. Please note that the add-on does not remove obsolete mask files automatically. You will have to use Anki for this by going to ToolsCheck Media and removing all unused entries there.

    Modifications that delete existing masks

    The same principle regarding unused files also applies here. Changes might only sync after performing a media check or after creating other Image Occlusions as elaborated above.

    The cases you describe fall into the last two categories. Based on what I observed before, I would have expected them to sync properly, or at the very least sync after a media check. Why this didn't happen I don't know.

    As for the extra twist, this is likely because Ankimobile caches media files in a similar way as Anki. My guess is that a (forced) restart might have shown the updated images in the reviewer.

    I'm pretty sure that all of this comes down to how Anki handles media syncing. Anki doesn't seem to expect media files to be modified in general use, so it doesn't sync the changes to mask files reliably. I thought I had figured out the conditions that would trigger a sync, but given your observations I think I'll have to dig a bit deeper. There must be some way to force Anki to do a file modification check. That's what the one-way sync might actually be doing in the background.

    In the meantime, here's another thing you could try if you run into sync issues again:

    Try placing a small text file in Anki's media collection (it should be located under ~/Documents/Anki/collection.media. The file can't be empty, otherwise it might not work). With the file in place, sync Anki and then switch to your phone. Restart AnkiMobile and then perform a sync. Are the changes visible now?


    Also, thanks for posting the updated tooltips. I'll include them in the next release. They're a considerable improvement over what we had before.

  24. 24 Posted by Glutanimate on 05 Nov, 2016 09:29 PM

    Glutanimate's Avatar

    Alright, this was much easier to fix than I anticipated:

    Turns out that Anki uses the modification time of the collection.media folder to determine whether or not to check all files for changes. So in order to force a sync all I had to do was to implement a small dummy file that gets written and deleted any time you perform an edit to your masks.

    I've tested this a few times with AnkiDroid and it seems to work perfectly. Though it does require restarting AnkiDroid to refresh the image cache, so please make sure to do that as well when using AnkiMobile.

    I've pushed a new beta release with this change and a few other things I've added since beta 4. Here's the full changelog:

    • New: Reveal all occluded areas when clicking image on answer side – This is a somewhat of an experimental change as there's no official support for JavaScript in Anki. Note: Normally this would require an update to the IO note type, but given that this is an experimental change I decided not to force the update. Instead, feel free to test this new feature on an empty Anki profile.
    • Fix: Force media sync when updating mask files
    • Fix: Handle deleted IO note type more graciously
    • Other: Updated tooltips for occlusion types (@dgbeecher)

    The mask reveal feature uses inline javascript in the template that might not work properly on some platforms. Please try to test this on OS X and iOS if you can. I'd really appreciate your feedback, not just on whether it's working, but also on whether this a useful addition.


    Talking about useful additions, I've come up with a few new features which I would like to discuss with you guys. The thing is, while I do think that these sound useful they would take quite a bit of time to implement, probably as long as the editing feature took. So I'd like to make sure that these are actually worth working on before going any further.

    Here's what I'm talking about: I think I've figured out a way to enter and store a caption for each mask shape right from within the masks editor. This would open up a number of new possibilities, the most important of which are the following:

    • a new image occlusion type where, instead of naming a hidden structure, you would be prompted to locate a specific label among all labels (E.g.: "Point out the Epiphysis!").
    • the ability to search your note collection for IO notes about that specific structure
    • the ability to type the answer for regular IO notes and check it against the label you've supplied

    I can't guarantee that all of these would make it into IO, but I do think that most of them are feasible.

    The question is: Would you use these features on a daily basis?

  25. 25 Posted by dgbeecher on 06 Nov, 2016 03:37 PM

    dgbeecher's Avatar

    Thanks for the explanation about media syncing; that is all interesting to know. I'm happy the fix turned out to be easy! I will test it and tell you if I run into anything again.

    About the "Reveal all occluded areas when clicking image" feature: It is a cool feature, and seems to work as expect on the Mac and iPhone.

    But it presents a problem for me on the iPhone, because I almost always answer cards by tapping directly on the answer side (on the left for Again, and anywhere else for Good ... is this not also a feature in AnkiDroid?). Although there are actual answer buttons on the bottom of the screen that I could train myself to use, I prefer to keep these buttons small (AnkiMobile offers an option for this), and to tap on the card instead. The problem, of course, is that I can't do this if the mask reveal feature takes over tap input here.

    So, I turned this feature off. I don't think I'll miss it, because I'm super happy with the other way to see the non-occluded original image: I just hit edit (on Mac or iPhone), and there it is at the top. (And thanks to your reordering of fields in the new IO note, I don't even have to scroll down to see the image.)


    I will think about the possible other new feature you described. As you probably remember, I often enter individual captions for different masks, either because the images I'm working with have only abbreviated labels and so I must copy/paste from the image key into a caption field ... or because I want to add additional information (or mnemonics) for different labels.

    Editing cards via the regular Anki Browser has been working well for this. And the "list of fields to hide in editing mode" option you introduced keeps me from accidentally overwriting anything with the IO Editor. I like the Anki Browser because it is fast and solid, whereas the IO Editor still has the occasional hiccup (probably related to what you said were issues between "SVG-Edit and Anki's webview on OS X"). The IO Editor also doesn't allow for pasting of images (yes, sometimes I do add images to the back of image occlusion cards...).

    Of the three possibilities you say this feature would open up ... #3 I wouldn't use, #2 I would appreciate (but I already get that whenever I enter captions manually), and #1 I don't quite understand. Is the prompt something I would type into the caption field? Or would the IO Editor somehow generate it automatically from the labels? (How would it do that when the labels are just part of the image, and not actual text?) How would the answer card reveal which label was the correct one? (Would it surround the label with just the border of a mask?) Finally, I can't see a serious advantage to this type of testing ... it seems to have less correlatioin to real-life use of knowledge than the cards I'm currently making with IO. (I could be wrong about this! I'm just a student, what do I know about real life ...)

    In theory, editing captions directly in the masks editor could be much easier than using the Anki Browser. I wouldn't have to pull up the preview window, navigate around looking for the card I want, and then scroll down to find the appropriate field to enter the caption, which is what I do now in the Browser (although I've gotten quick at it). Rather, I could see and edit all the labels/masks/captions in one place. That sounds great. If this feature were fast and reliable, I would certainly use it every day.

    In any case, I'd be happy to talk more about this as you think about whether to move forward on it or not.

    Thanks again for giving us this great tool!

  26. 26 Posted by Dee on 07 Nov, 2016 07:14 AM

    Dee's Avatar

    Been heavily relying on IO in my deck. Really looking forward to the new features, such as editing after creation.

    I'm not the most computer literate person so I don't really dare to try out the beta version yet. Would you by any chance have an ETA for IO to come out of beta?

    Cheers!

  27. 27 Posted by Glutanimate on 07 Nov, 2016 11:49 AM

    Glutanimate's Avatar

    @Dee:

    Probably this week, if everything goes well.

    @dgbeecher:

    Thanks for the valuable feedback. A lot of good points in there.

    But it presents a problem for me on the iPhone, because I almost always answer cards by tapping directly on the answer side (on the left for Again, and anywhere else for Good ... is this not also a feature in AnkiDroid?). Although there are actual answer buttons on the bottom of the screen that I could train myself to use, I prefer to keep these buttons small (AnkiMobile offers an option for this), and to tap on the card instead. The problem, of course, is that I can't do this if the mask reveal feature takes over tap input here.

    That's something I hadn't considered. Yes, I think AnkiDroid also offers gestures (though I don't think they're enabled by default).

    I don't think I'll miss it, because I'm super happy with the other way to see the non-occluded original image: I just hit edit (on Mac or iPhone), and there it is at the top. (And thanks to your reordering of fields in the new IO note, I don't even have to scroll down to see the image.)

    Good to know that AnkiMobile shows an image preview. This is not the case for AnkiDroid (you only see the HTML code), so this was one of the main reasons I decided to implement this feature.

    How about this: I could change it so that clicking on the header/title instead of the image itself triggers the mask reveal. Would this be something you think would not interfere too much with AnkiMobile's controls? Another option would be to create a separate button/link below the image.

    1 I don't quite understand. Is the prompt something I would type into the caption field? Or would the IO Editor somehow generate it automatically from the labels? (How would it do that when the labels are just part of the image, and not actual text?) How would the answer card reveal which label was the correct one? (Would it surround the label with just the border of a mask?)

    You would type the label into a text field that appears when selecting a shape (I would probably put it in the top panel of the masks editor next to the other tools that appear when selecting a shape). The label wouldn't appear on the image itself, but rather be saved as a hidden title element in the SVG file. On clicking the add button, IO would also save the label for each card in a Label field. The answer would have the respective label uncovered, or possibly highlighted as you said.

    As for the question prompt, it would use a stock question and simply insert the label, e.g. "Locate {{Label}}!".

    Finally, I can't see a serious advantage to this type of testing ... it seems to have less correlatioin to real-life use of knowledge than the cards I'm currently making with IO. (I could be wrong about this! I'm just a student, what do I know about real life ...)

    Yes, that was my main concern as well. I see this in a similar light as the overlapping occlusion type. It has its uses, but I can't see me using it myself too often.

    In theory, editing captions directly in the masks editor could be much easier than using the Anki Browser. I wouldn't have to pull up the preview window, navigate around looking for the card I want, and then scroll down to find the appropriate field to enter the caption, which is what I do now in the Browser (although I've gotten quick at it). Rather, I could see and edit all the labels/masks/captions in one place. That sounds great. If this feature were fast and reliable, I would certainly use it every day.

    I think it could definitely help you with your use case. But the limitations would be pretty imposing, e.g. no images, now text formatting, not even line breaks. So that would definitely diminish the usability of this feature quite a bit.

    But the main selling point of these new features still is the new occlusion mode to me. I think I'll have to ponder a bit more about its actual usefulness. If anyone else has an opinion on this, please feel free to chime in. I'm sure there are some use cases I haven't thought about, yet.

  28. 28 Posted by Glutanimate on 07 Nov, 2016 06:19 PM

    Glutanimate's Avatar

    Ok, getting very close to a stable release now. The Wiki and Readme are mostly done and I've also just released a new beta (hopefully the last one) with the following changes:

    • New: Use a button instead of clicking the image to reveal all masks. The old method interfered >with gesture support on mobile clients.
    • New: Default action hotkey (Ctrl+Return)
    • Other: Set Extra fields to be note-specific by default

    Please give it a try and let me know if there are any major issues remaining. If not I will proceed with the release.

  29. 29 Posted by dgbeecher on 07 Nov, 2016 07:32 PM

    dgbeecher's Avatar

    Using a button instead of clicking the image to reveal all masks is a great solution. Otherwise many of your AnkiMobile users would've been confused, because the tap-to-answer gestures are, I believe, enabled by default.

    I tested the button on the Mac and iPhone, and it is lovely. I thought I would want to disable it, because I've been happy enough clicking edit to see the original image. But the button is quite unobtrusive and easy to use, so I think I will keep it!

    One small suggestion: perhaps change the button text to Toggle All Masks ... just because, once the masks are hidden, the button also functions to bring them back.

    The wiki and readme look great: very comprehensive and clear! I found a mistake in the "Complimentary Add-Ons" section: the link to the "Maximum Images Height in Card Editor" add-on sends me to the "Frozen Fields" add-on instead. (Also, "complimentary" should be spelled "complementary".)

    Thanks for explaining the potential new individual mask/label feature a bit more.

    On clicking the add button, IO would also save the label for each card in a Label field.

    Would this field also be editable via the Anki Browser? If so, what would happen if I added images, text formatting, line breaks, etc. to this field via the Anki Browser, and then tried to view it in the IO Editor? I don't expect to be able to see the images or formatting (HTML code would be fine here), but I just wouldn't want the field to be overwritten at all. If Anki Browser and IO Editor play well enough together regarding the Label field, then I think this would be a helpful feature. I could see myself adding simple labels via the IO Editor when first making cards. Most of the time these would be enough. But if I wanted to expand on the labels later, I could do that via the Anki Browser.

    I will keep my eye out for situations in which the new occlusion mode would be useful. And I'm also interested in hearing what other users think. I may point my classmates toward this thread some time, perhaps when v1 comes out of beta.

    Thanks again!

  30. 30 Posted by Miriam Campeas on 09 Nov, 2016 01:27 AM

    Miriam Campeas's Avatar

    I received this error. Please assist:

    An error occurred in an add-on.
    Please post on the add-on forum:
    https://anki.tenderapp.com/discussions/add-ons

    Traceback (most recent call last):
      File "aqt/addons.pyc", line 41, in loadAddons
      File "/Users/Miriam/Documents/Anki/addons/Image Occlusion 2.py", line 4, in <module>
    ImportError: No module named image_occlusion_2.image_occlusion

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac