In general, I'd recommend using the blocks UI if you need to put together more complex interfaces with multiple elements: https://prodi.gy/docs/custom-interfaces So in your case, you could have two blocks: image and choice. In the choice block, you can set "image": None to prevent the image from being rendered twice (once in the image block and once in the choice block).
TypeError: Cannot read property '0' of undefined
at t.r.findLabelPosition (bundle.js:1)
at t.value (bundle.js:1)
at _i (bundle.js:1)
at wi (bundle.js:1)
at bundle.js:1
at Ra (bundle.js:1)
at Na (bundle.js:1)
at ys (bundle.js:1)
at gs (bundle.js:1)
at ws (bundle.js:1)
Thanks! It looks like it incorrectly interprets the spans as referring to text, not the image – I'll fix this for the next release. In the meantime, you should be able to work around this using the blocks interface, which also gives you more flexibility
I've tried this blocks config by forcing { 'image': None, 'spans': None }, and not changing the stream output from the above, and I still get the same error
blocks = [
{'view_id': 'image'},
{'view_id': 'choice', 'image': None, 'spans': None },
]
config = {
'choice_auto_accept': True,
'blocks': blocks,
}
return {
'config': config,
'dataset': output_dataset, # Name of dataset to save annotations
'stream': stream, # Incoming stream of examples
'view_id': 'blocks',
}
I just had a closer look at the error and it looks like the problem is that you seem to be using the legacy image manual interface that only supports "points" and not width/height/x/y? This should have failed more gracefully, sorry! So you can either convert your bounding boxes to a list of [x, y] coordinates or use the new image_manual interface (available in Prodigy v1.10+).
Okay, that's definitely weird then! I'll look into this in detail. It's somehow related to the bounding box detection, though, and for some reason, the app seems to assume it's a points-based box So this should hopefully help as a temporary workaround!
Edit: Just released v1.10.5, which fixes the underlying problem!