I’m using prodigy mark to label three types of entities in text. I can get the labels to appear in the interface by adding them to my prodigy.json (111), but I can’t get custom colors to show up. Am I setting them incorrectly?
Ah, sorry if this was confusing – the "labels" colors in the custom theme only apply to the text-based highlighted spans, not the colors of the bounding boxes. There's currently no easy way like this to customise those – but if we add them, they'd probably be a separate setting (to prevent overlaps with NER labels etc., because the colors here would usually be quite different).
(If you're setting pre-defined image "spans", you can currently add a "color" to them. But the colors for new labels in the manual annotation mode are currently picked automatically.)
Hello, Ines! You mentioned that there is no easy way to change the width of bounding box or the size of labels above bounding boxes. May you please tell me the hard way to customize these features?
It's actually not even that hard, just less intuitive, since there's no direct setting for it. You can add something like the following as the "global_css" of your prodigy.json or recipe config:
.prodigy-content svg path {
stroke-width: 1px;
}
.prodigy-content svg text {
font-size: 20px !important;
}
This overrides the stroke width of the paths (the boxes) and the font size of the text (the labels).
The only thing to keep in mind is that the sizes are relative to the original image and that the image may be resized in your browser if it's very large (to make sure it fits on the screen). So if your image is resized visually, the text and bounding box border will also be resized with it. This also means that if your images have very different sizes, it may be tricky to find a suitable override that works for all of them.
Hi, Ines! With updated prodigy this line doesn't work anymore and stroke width of the boxes doesn't change anymore. How can I change them again to be more thin?
(Alternatively, if you want to use the old version of the image UI without the new features, you can set "image_manual_legacy": true and use your old hack.)
Hi @ines thanks for link and explanations, but there's still one thing that I'm missing. Is it still not possible to assign colour per label for manual image annotation (bounding boxes). I would like that each annotation that has a "label1" has a "colour1" and an annotation that has a "label2" has a "colour2". Thanks for helping
Thanks @ines ! And I found a solution for my particular case, if somebody will have similar needs, you will need to edit config file prodigy.json which you can find in prodigy folder under you home directory ${HOME}/.prodigy/prodigy.json. And here's how it looks in my case: