We’ve recently started using Prodigy to set up our in-house data labeling server. I am currently working on some custom recipes for us and wondered:
Is the built-in annotation interface templates available anywhere? In particular, I am interested to see the source for the image-manual interface - This one would be useful for us if we can make some modifications
Hi and thanks! The built-in annotation interfaces are components that are compiled into the app, so there’s no easy way to just edit them as templates. However, all built-in interfaces now support custom JavaScript passed in as the "javascript" config setting in the recipe, so you can tweak the interactions or perform additional updates by writing pretty straightforward vanilla JS and without having to worry much about the bigger pictur.
For now, I really only need to change the list of labels to a dropdown (we have 30+ labels for the project) and remove the polygon button so only bboxes are supported.
It’d be easy if I could just modify a image.manual(like) template.
Oh, that feature is actually built-in already – the naming is just a bit unfortunate, because I called it "ner_manual_label_style"(it was added before the manual image interface existed). So try setting "ner_manual_label_style": "dropdown" in your prodigy.json or in the "config" returned by your recipe.
You should be able to do this via the "global_css" config – you'd only have to find the auto-generated class name of that button and then set it to display: none. I'm happy to add a human-readable class name to it for the next release so the buttons are easier to target.
Alternatively, here's the hacky version: button[title="polygon (P, T)"] { display: none }. (Disclaimer: This is a bad practice and I normally wouldn't advocate for it – but it works )